linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
To: Felix Fietkau <nbd@openwrt.org>
Cc: <linville@tuxdriver.com>, <linux-wireless@vger.kernel.org>
Subject: Re: [PATCH v2] ath9k: Handle multiple keys while setting tx filters
Date: Wed, 21 May 2014 19:46:34 +0530	[thread overview]
Message-ID: <20140521141632.GA5922@qca.qualcomm.com> (raw)
In-Reply-To: <537C9B84.7000002@openwrt.org>

On Wed, May 21, 2014 at 02:26:44PM +0200, Felix Fietkau wrote:
> On 2014-05-21 13:29, Rajkumar Manoharan wrote:
> > The keycache index is used to abort transmission for given station
> > when it goes to sleep state. But the commit "ath9k_hw: Abort transmission
> > for sleeping station" is not handling multi-key station. Fix that.
> > 
> > Cc: Felix Fietkau <nbd@openwrt.org>
> > Signed-off-by: Rajkumar Manoharan <rmanohar@qti.qualcomm.com>
> > ---
> >  drivers/net/wireless/ath/ath9k/ath9k.h |  1 +
> >  drivers/net/wireless/ath/ath9k/main.c  | 52 +++++++++++++++++++++++++++-------
> >  2 files changed, 42 insertions(+), 11 deletions(-)
> > 
> > diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
> > index 47d442a..89be123 100644
> > --- a/drivers/net/wireless/ath/ath9k/main.c
> > +++ b/drivers/net/wireless/ath/ath9k/main.c
> > @@ -1494,6 +1498,19 @@ static int ath9k_sta_remove(struct ieee80211_hw *hw,
> >  	return 0;
> >  }
> >  
> > +static inline void ath9k_sta_set_tx_filter(struct ath_hw *ah,
> > +					   struct ath_node *an,
> > +					   bool set)
> I'd suggest dropping the 'inline' - just let the compiler figure out if
> it's worth inlining.
>
fine.
> > +{
> > +	int i;
> > +
> > +	for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) {
> > +		if (!an->key_idx[i])
> > +			continue;
> > +		ath9k_hw_set_tx_filter(ah, an->key_idx[i], set);
> > +	}
> > +}
> > +
> >  static void ath9k_sta_notify(struct ieee80211_hw *hw,
> >  			 struct ieee80211_vif *vif,
> >  			 enum sta_notify_cmd cmd,
> > @@ -1610,11 +1626,25 @@ static int ath9k_set_key(struct ieee80211_hw *hw,
> >  				key->flags |= IEEE80211_KEY_FLAG_SW_MGMT_TX;
> >  			ret = 0;
> >  		}
> > +		if (an && key->hw_key_idx) {
> > +			for (i = 0; i < ARRAY_SIZE(an->key_idx); i++) {
> > +				if (an->key_idx[i])
> > +					continue;
> > +				an->key_idx[i] = key->hw_key_idx;
> I think this should be moved inside the ret >= 0 test.
Since key->hw_key_idx is valid only when ret > 0, this change is moved
out of ret check to avoid additional indentation.

> You also need to add a break here to avoid the WARN_ON below.
> Did you test this patch?
> 
Oops..my bad.. Checked tx filtering functionality alone. missed
warnings..:(

-Rajkumar


  reply	other threads:[~2014-05-21 14:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-21 11:29 [PATCH v2] ath9k: Handle multiple keys while setting tx filters Rajkumar Manoharan
2014-05-21 12:26 ` Felix Fietkau
2014-05-21 14:16   ` Rajkumar Manoharan [this message]
2014-05-21 20:52     ` 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=20140521141632.GA5922@qca.qualcomm.com \
    --to=rmanohar@qti.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.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;
as well as URLs for NNTP newsgroup(s).