* [RFC] mac80211: update the channel context after channel switch
@ 2014-11-27 13:41 Emmanuel Grumbach
2014-11-30 13:14 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Emmanuel Grumbach @ 2014-11-27 13:41 UTC (permalink / raw)
To: linux-wireless; +Cc: michal.kazior, Emmanuel Grumbach
When the channel switch has been made, a vif is now using
the channel context which was reserved. When that happens,
we need to update the channel context since its parameters
may change.
I hit a case in which I switched to a 40Mhz channel but the
reserved channel context was still on 20Mhz. The rate control
would try to send 40Mhz packets on a 20Mhz channel context and
that made iwlwifi's firmware unhappy.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
---
This is a second version of the patch I sent earlier.
I think the first version is more generic.
Luca / Michal / Whoever, please share your thoughts on which version
should be merged.
---
net/mac80211/chan.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 4c74e8d..eadc1a0 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -993,6 +993,10 @@ ieee80211_vif_use_reserved_reassign(struct ieee80211_sub_if_data *sdata)
sdata->vif.bss_conf.chandef = sdata->reserved_chandef;
+ ieee80211_recalc_smps_chanctx(local, new_ctx);
+ ieee80211_recalc_radar_chanctx(local, new_ctx);
+ ieee80211_recalc_chanctx_min_def(local, new_ctx);
+
if (changed)
ieee80211_bss_info_change_notify(sdata, changed);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [RFC] mac80211: update the channel context after channel switch
2014-11-27 13:41 [RFC] mac80211: update the channel context after channel switch Emmanuel Grumbach
@ 2014-11-30 13:14 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2014-11-30 13:14 UTC (permalink / raw)
To: Emmanuel Grumbach; +Cc: linux-wireless, michal.kazior
On Thu, 2014-11-27 at 15:41 +0200, Emmanuel Grumbach wrote:
> When the channel switch has been made, a vif is now using
> the channel context which was reserved. When that happens,
> we need to update the channel context since its parameters
> may change.
>
> I hit a case in which I switched to a 40Mhz channel but the
> reserved channel context was still on 20Mhz. The rate control
> would try to send 40Mhz packets on a 20Mhz channel context and
> that made iwlwifi's firmware unhappy.
>
> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
> ---
> This is a second version of the patch I sent earlier.
> I think the first version is more generic.
I prefer this version
1) if there really is a chanctx that can be in use and reserved at the
same time, it seems strange to mix the two concepts for the actual
operation of the chanctx
2) semantically, the reservation is so that nothing can steal the
chanctx, we don't really care much about the contents until we need it.
Please resend with [PATCH] and I'll merge it.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-30 13:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-27 13:41 [RFC] mac80211: update the channel context after channel switch Emmanuel Grumbach
2014-11-30 13:14 ` Johannes Berg
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).