Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Michal Kazior <michal.kazior@tieto.com>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
Date: Thu, 9 May 2013 10:07:59 +0200	[thread overview]
Message-ID: <518B595F.4070908@tieto.com> (raw)
In-Reply-To: <3078A9B976EF864C8DDD0C499FFD07913139B7B8C3@EXMB01.eu.tieto.com>

On 09/05/13 09:47, Janusz.Dziedzic at tieto.com wrote:
>> -----Original Message-----
>> From: Kalle Valo [mailto:kvalo at qca.qualcomm.com]
>> Sent: 9 maja 2013 09:17
>> To: Dziedzic Janusz
>> Cc: ath9k-devel at lists.ath9k.org
>> Subject: Re: [ath9k-devel] [PATCH 3/3] ath10k: enable STA UAPSD support
>>
>> Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:
>>
>>> Enable UAPSD support for STA mode.
>>>
>>> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
>>
>> Same here, please explain briefly what you have tested.
>>
>>> --- a/drivers/net/wireless/ath/ath10k/mac.c
>>> +++ b/drivers/net/wireless/ath/ath10k/mac.c
>>> @@ -2296,6 +2296,68 @@ static int ath10k_sta_state(struct ieee80211_hw
>> *hw,
>>>   	return ret;
>>>   }
>>>
>>> +#define SET_UAPSD(enable, out, flags) do {	\
>>> +	if ((enable))				\
>>> +		(out) |= (flags);		\
>>> +	else					\
>>> +		(out) &= ~(flags);		\
>>> +} while (0)
>>
>> Why the macro? To workaround a long line warning from checkpatch?
>>
>> If that's a problem we could increate line length limit, for example to
>> 85 or 90. In some cases the 80 char limit is a bit too excessive. Would that
>> help?
>
> 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.


-- Pozdrawiam / Best regards, Michal Kazior.

  reply	other threads:[~2013-05-09  8:07 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 [this message]
2013-05-09  8:47         ` Kalle Valo
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=518B595F.4070908@tieto.com \
    --to=michal.kazior@tieto.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