2013-06-11 08:44:50

by Simon Wunderlich

[permalink] [raw]
Subject: [PATCH 0/2] mac80211 fixes

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



2013-06-11 11:12:58

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH 0/2] mac80211 fixes

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


2013-06-11 08:44:50

by Simon Wunderlich

[permalink] [raw]
Subject: [PATCH 1/2] mac80211: abort CAC in stop_ap()

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 <[email protected]>
---
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


2013-06-11 08:44:50

by Simon Wunderlich

[permalink] [raw]
Subject: [PATCH 2/2] mac80211: Fix rate control mask matching call

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

Cc: Felix Fietkau <[email protected]>
Signed-off-by: Simon Wunderlich <[email protected]>
Signed-off-by: Mathias Kretschmer <[email protected]>
---
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