All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mac80211: fix managed mode channel context use
@ 2013-02-07 19:56 Johannes Berg
  2013-02-07 20:02 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2013-02-07 19:56 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

My commit f2d9d270c15ae0139b54a7e7466d738327e97e03
("mac80211: support VHT association") introduced a
very stupid bug: the loop to downgrade the channel
width never attempted to actually use it again so
it would downgrade all the way to 20_NOHT. Fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/mlme.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index a355292..3b9cb51 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3529,8 +3529,11 @@ static int ieee80211_prep_channel(struct ieee80211_sub_if_data *sdata,
 	 */
 	ret = ieee80211_vif_use_channel(sdata, &chandef,
 					IEEE80211_CHANCTX_SHARED);
-	while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT)
+	while (ret && chandef.width != NL80211_CHAN_WIDTH_20_NOHT) {
 		ifmgd->flags |= chandef_downgrade(&chandef);
+		ret = ieee80211_vif_use_channel(sdata, &chandef,
+						IEEE80211_CHANCTX_SHARED);
+	}
 	return ret;
 }
 
-- 
1.8.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: fix managed mode channel context use
  2013-02-07 19:56 [PATCH] mac80211: fix managed mode channel context use Johannes Berg
@ 2013-02-07 20:02 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-02-07 20:02 UTC (permalink / raw)
  To: linux-wireless

On Thu, 2013-02-07 at 20:56 +0100, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> My commit f2d9d270c15ae0139b54a7e7466d738327e97e03
> ("mac80211: support VHT association") introduced a
> very stupid bug: the loop to downgrade the channel
> width never attempted to actually use it again so
> it would downgrade all the way to 20_NOHT. Fix it.

Applied, of course (since it's even in the pull request already :) )

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-07 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07 19:56 [PATCH] mac80211: fix managed mode channel context use Johannes Berg
2013-02-07 20:02 ` Johannes Berg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.