From: Felix Fietkau <nbd@openwrt.org>
To: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH] ath9k_hw: Abort transmission for sleeping station
Date: Tue, 20 May 2014 09:00:28 +0200 [thread overview]
Message-ID: <537AFD8C.2090302@openwrt.org> (raw)
In-Reply-To: <1400480077-18619-1-git-send-email-rmanohar@qti.qualcomm.com>
On 2014-05-19 08:14, Rajkumar Manoharan wrote:
> The data transmission to the power save station should be aborted
> immediately, whenever the station informs sleep state. Right now
> the frames queued into into hardware are being transmitted until
> the hardware detects the power save station based excessive retries
> of the data frames due to unacknowlegdement. Then remaining frames
> are returned with filetered status and might be retried later by
> driver or mac80211.
>
> Per WFA certification testing, AP should not send out more than two
> frames after processing nullfunc with PM bit set from associated
> station. To speed up tx filtering, the pending frames in hardware
> queues for given station will be aborted immediately via tx filter
> registers. This transmit filters can be ignored if the descriptor
> is having invalid destination index or clear destination mask set.
>
> Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
> ---
> drivers/net/wireless/ath/ath9k/mac.c | 22 ++++++++++++++++++++++
> drivers/net/wireless/ath/ath9k/mac.h | 1 +
> drivers/net/wireless/ath/ath9k/main.c | 8 ++++++++
> drivers/net/wireless/ath/ath9k/reg.h | 3 ---
> 4 files changed, 31 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> index 8d7b9b6..47d442a 100644
> --- a/drivers/net/wireless/ath/ath9k/main.c
> +++ b/drivers/net/wireless/ath/ath9k/main.c
> @@ -1593,6 +1597,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
> ath9k_del_ps_key(sc, vif, sta);
>
> ret = ath_key_config(common, vif, sta, key);
> + if (sta && (ret > 0))
> + ((struct ath_node *)sta->drv_priv)->ps_key = ret;
> if (ret >= 0) {
> key->hw_key_idx = ret;
> /* push IV and Michael MIC generation to stack */
> @@ -1607,6 +1613,8 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
> break;
> case DISABLE_KEY:
> ath_key_delete(common, key);
> + if (sta)
> + ((struct ath_node *)sta->drv_priv)->ps_key = 0;
> break;
> default:
> ret = -EINVAL;
I think this part won't work if you have multiple keys for the same STA.
Also, it will leak the previous ps_key if it was auto-assigned for an
unencrypted sta.
- Felix
next prev parent reply other threads:[~2014-05-20 7:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-19 6:14 [PATCH] ath9k_hw: Abort transmission for sleeping station Rajkumar Manoharan
2014-05-20 7:00 ` Felix Fietkau [this message]
2014-05-20 9:35 ` Felix Fietkau
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=537AFD8C.2090302@openwrt.org \
--to=nbd@openwrt.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=rmanohar@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).