All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] mac80211 fixes
@ 2013-06-11  8:44 Simon Wunderlich
  2013-06-11  8:44 ` [PATCH 1/2] mac80211: abort CAC in stop_ap() Simon Wunderlich
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Simon Wunderlich @ 2013-06-11  8:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich

Here are two small mac80211 fixes:
 * I've been seeing a warning when doing DFS tests, which was triggered
   by aborting the CAC when killing hostapd
 * the rate control fix was sent as part of the v3 series of
   "Add support for 5 and 10 MHz channels", but since it's an trivial
   yet important fix I'm adding it to this series too.

Cheers,
	Simon

Simon Wunderlich (2):
  mac80211: abort CAC in stop_ap()
  mac80211: Fix rate control mask matching call

 net/mac80211/cfg.c  |    6 ++++++
 net/mac80211/rate.c |    2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

-- 
1.7.10.4


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

* [PATCH 1/2] mac80211: abort CAC in stop_ap()
  2013-06-11  8:44 [PATCH 0/2] mac80211 fixes Simon Wunderlich
@ 2013-06-11  8:44 ` Simon Wunderlich
  2013-06-11  8:44 ` [PATCH 2/2] mac80211: Fix rate control mask matching call Simon Wunderlich
  2013-06-11 11:12 ` [PATCH 0/2] mac80211 fixes Johannes Berg
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Wunderlich @ 2013-06-11  8:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich

When a CAC is running and stop_ap is called (e.g. when hostapd is killed
while performing CAC), the CAC must be aborted immediately.
Otherwise ieee80211_stop_ap() will try to stop it when it's too late -
wdev->channel is already NULL and the abort event can not be generated.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
 net/mac80211/cfg.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 3062210..7f89fc0 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1071,6 +1071,12 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 	clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
 
+	if (sdata->wdev.cac_started) {
+		cancel_delayed_work_sync(&sdata->dfs_cac_timer_work);
+		WARN_ON(local->suspended);
+		cfg80211_cac_event(sdata->dev, NL80211_RADAR_CAC_ABORTED,
+				   GFP_KERNEL);
+	}
 	drv_stop_ap(sdata->local, sdata);
 
 	/* free all potentially still buffered bcast frames */
-- 
1.7.10.4


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

* [PATCH 2/2] mac80211: Fix rate control mask matching call
  2013-06-11  8:44 [PATCH 0/2] mac80211 fixes Simon Wunderlich
  2013-06-11  8:44 ` [PATCH 1/2] mac80211: abort CAC in stop_ap() Simon Wunderlich
@ 2013-06-11  8:44 ` Simon Wunderlich
  2013-06-11 11:12 ` [PATCH 0/2] mac80211 fixes Johannes Berg
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Wunderlich @ 2013-06-11  8:44 UTC (permalink / raw)
  To: Johannes Berg
  Cc: linux-wireless, Simon Wunderlich, Felix Fietkau, Mathias Kretschmer

The order of parameters was mixed up, introduced in commit
"mac80211: improve the rate control API"

Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
 net/mac80211/rate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index d3f414f..a02bef3 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -615,7 +615,7 @@ static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata,
 		if (rates[i].idx < 0)
 			break;
 
-		rate_idx_match_mask(&rates[i], sband, mask, chan_width,
+		rate_idx_match_mask(&rates[i], sband, chan_width, mask,
 				    mcs_mask);
 	}
 }
-- 
1.7.10.4


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

* Re: [PATCH 0/2] mac80211 fixes
  2013-06-11  8:44 [PATCH 0/2] mac80211 fixes Simon Wunderlich
  2013-06-11  8:44 ` [PATCH 1/2] mac80211: abort CAC in stop_ap() Simon Wunderlich
  2013-06-11  8:44 ` [PATCH 2/2] mac80211: Fix rate control mask matching call Simon Wunderlich
@ 2013-06-11 11:12 ` Johannes Berg
  2 siblings, 0 replies; 4+ messages in thread
From: Johannes Berg @ 2013-06-11 11:12 UTC (permalink / raw)
  To: Simon Wunderlich; +Cc: linux-wireless, Simon Wunderlich

On Tue, 2013-06-11 at 10:44 +0200, Simon Wunderlich wrote:
> Here are two small mac80211 fixes:
>  * I've been seeing a warning when doing DFS tests, which was triggered
>    by aborting the CAC when killing hostapd
>  * the rate control fix was sent as part of the v3 series of
>    "Add support for 5 and 10 MHz channels", but since it's an trivial
>    yet important fix I'm adding it to this series too.

Applied, thanks.

johannes


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

end of thread, other threads:[~2013-06-11 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11  8:44 [PATCH 0/2] mac80211 fixes Simon Wunderlich
2013-06-11  8:44 ` [PATCH 1/2] mac80211: abort CAC in stop_ap() Simon Wunderlich
2013-06-11  8:44 ` [PATCH 2/2] mac80211: Fix rate control mask matching call Simon Wunderlich
2013-06-11 11:12 ` [PATCH 0/2] mac80211 fixes 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.