From: Kalle Valo <kvalo@qca.qualcomm.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
Date: Thu, 9 May 2013 11:47:10 +0300 [thread overview]
Message-ID: <87a9o4wne9.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <518B595F.4070908@tieto.com> (Michal Kazior's message of "Thu, 9 May 2013 10:07:59 +0200")
Michal Kazior <michal.kazior@tieto.com> writes:
>> Not really. This is because we have to set/clean this flags for every ACs.
>> So, this is just to prevent code duplication.
>>
>> case IEEE80211_AC_VO:
>> if (enable)
>> ...
>> else
>> ....
>> break;
>> case IEEE80211_AC_VI:
>> if (enable)
>> ....
>> else
>> ....
>> break;
>> .....
>>
>> I can remove this macro and create inline function instead.
>
> Hmm, but since this is per-ac can't we do the following?
>
> switch (ac) {
> case IEEE80211_AC_VO:
> val = WMI_STA_PS_UAPSD_AC3_DELIVERY_EN |
> WMI_STA_PS_UAPSD_AC3_TRIGGER_EN;
> break;
> // ..
> }
>
> if (enable)
> arvif->u.sta.uapsd |= val;
> else
> arvif->u.sta.uapsd &= ~val;
>
>
> No macros and no code duplication.
Yes, much better. I hate macros :)
--
Kalle Valo
next prev parent reply other threads:[~2013-05-09 8:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 7:49 [ath9k-devel] [PATCH 0/3] UAPSD support for STA/AP mode Janusz Dziedzic
2013-05-08 7:49 ` [ath9k-devel] [PATCH 1/3] ath10k: WMI add AP PS Janusz Dziedzic
2013-05-09 7:09 ` Kalle Valo
2013-05-09 7:35 ` Janusz.Dziedzic at tieto.com
2013-05-09 8:31 ` Kalle Valo
2013-05-08 7:49 ` [ath9k-devel] [PATCH 2/3] ath10k: add AP UAPSD support Janusz Dziedzic
2013-05-09 7:11 ` Kalle Valo
2013-05-08 7:49 ` [ath9k-devel] [PATCH 3/3] ath10k: enable STA " Janusz Dziedzic
2013-05-09 7:17 ` Kalle Valo
2013-05-09 7:47 ` Janusz.Dziedzic at tieto.com
2013-05-09 8:07 ` Michal Kazior
2013-05-09 8:47 ` Kalle Valo [this message]
2013-05-09 9:12 ` [ath9k-devel] [PATCH 0/3] UAPSD support for STA/AP mode Janusz.Dziedzic at tieto.com
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=87a9o4wne9.fsf@kamboji.qca.qualcomm.com \
--to=kvalo@qca.qualcomm.com \
--cc=ath9k-devel@lists.ath9k.org \
/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