From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Raja Mani <rmani@qti.qualcomm.com>
Cc: <ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2 1/8] ath10k: enhance swba event handler to adapt different size tim bitmap
Date: Wed, 1 Jul 2015 13:16:55 +0300 [thread overview]
Message-ID: <87h9poxjvs.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1434984747-24294-2-git-send-email-rmani@qti.qualcomm.com> (Raja Mani's message of "Mon, 22 Jun 2015 20:22:20 +0530")
Raja Mani <rmani@qti.qualcomm.com> writes:
> Due to 512 client support in 10.4 firmware, size of tim ie is going
> to be slightly higher than non 10.4 firmware. So, size of tim_bitmap
> what is carried in swba event from 10.4 firmware is bit higher.
>
> The only bottle neck to reuse existing swba handler
> ath10k_wmi_event_host_swba() for 10.4 is that code designed to deal
> with fixed size tim bitmap(ie, tim_info[].tim_bitmap in wmi_swba_ev_arg).
> This patch removes such size limitation and makes it more suitable
> to handle swba event which has different size tim bitmap.
>
> All existing swba event parsing functions are changed to adapt this
> change. Actual support to handle 10.4 swba event is added in next patch.
> Only preparation is made in this patch.
>
> Signed-off-by: Raja Mani <rmani@qti.qualcomm.com>
[...]
> --- a/drivers/net/wireless/ath/ath10k/wmi.c
> +++ b/drivers/net/wireless/ath/ath10k/wmi.c
> @@ -2874,33 +2874,38 @@ exit:
> static void ath10k_wmi_update_tim(struct ath10k *ar,
> struct ath10k_vif *arvif,
> struct sk_buff *bcn,
> - const struct wmi_tim_info *tim_info)
> + const struct wmi_tim_info_arg *tim_info)
> {
> struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)bcn->data;
> struct ieee80211_tim_ie *tim;
> u8 *ies, *ie;
> u8 ie_len, pvm_len;
> __le32 t;
> - u32 v;
> + u32 v, tim_len;
> +
> + /* When FW reports 0 in tim_len, ensure atleast first byte
> + * in tim_bitmap is considered for pvm calculation.
> + */
> + tim_len = tim_info->tim_len ? __le32_to_cpu(tim_info->tim_len) : 1;
>
> /* if next SWBA has no tim_changed the tim_bitmap is garbage.
> * we must copy the bitmap upon change and reuse it later */
> if (__le32_to_cpu(tim_info->tim_changed)) {
> int i;
>
> - BUILD_BUG_ON(sizeof(arvif->u.ap.tim_bitmap) !=
> - sizeof(tim_info->tim_bitmap));
> + WARN_ON(sizeof(arvif->u.ap.tim_bitmap) < tim_len);
I'm worried that this WARN_ON() spams too much so I changed it to:
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -2893,7 +2893,7 @@ static void ath10k_wmi_update_tim(struct ath10k *ar,
if (__le32_to_cpu(tim_info->tim_changed)) {
int i;
- WARN_ON(sizeof(arvif->u.ap.tim_bitmap) < tim_len);
+ WARN_ON_ONCE(sizeof(arvif->u.ap.tim_bitmap) < tim_len);
for (i = 0; i < tim_len; i++) {
t = tim_info->tim_bitmap[i / 4];
--
Kalle Valo
next prev parent reply other threads:[~2015-07-01 10:17 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 14:52 [PATCH v2 0/8] add beacon and htt msg support for 10.4 firmware Raja Mani
2015-06-22 14:52 ` [PATCH v2 1/8] ath10k: enhance swba event handler to adapt different size tim bitmap Raja Mani
2015-07-01 10:16 ` Kalle Valo [this message]
2015-07-01 10:21 ` rmani
2015-07-01 10:28 ` Kalle Valo
2015-07-01 11:18 ` Kalle Valo
2015-06-22 14:52 ` [PATCH v2 2/8] ath10k: handle 10.4 firmware wmi swba event Raja Mani
2015-06-22 14:52 ` [PATCH v2 3/8] ath10k: enable vdev and peer related operations for 10.4 fw Raja Mani
2015-06-22 14:52 ` [PATCH v2 4/8] ath10k: add scan support " Raja Mani
2015-06-22 14:52 ` [PATCH v2 5/8] ath10k: add 10.4 fw specific htt msg definitions Raja Mani
2015-07-01 10:38 ` Kalle Valo
2015-07-01 11:46 ` rmani
2015-06-22 14:52 ` [PATCH v2 6/8] ath10k: advertise 10.4 fw ap and sta iface combination to mac80211 Raja Mani
2015-06-22 14:52 ` [PATCH v2 7/8] ath10k: set max spatial stream to 4 for 10.4 fw Raja Mani
2015-06-22 14:52 ` [PATCH v2 8/8] ath10k: configure frag desc memory to target for qca99X0 Raja Mani
2015-06-22 23:41 ` Peter Oh
2015-06-23 5:48 ` rmani
2015-07-02 5:50 ` [PATCH v2 0/8] add beacon and htt msg support for 10.4 firmware Kalle Valo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h9poxjvs.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath10k@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=rmani@qti.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).