linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: clear SSID when stoping AP
@ 2013-04-10 11:47 Marek Puzyniak
  2013-04-10 12:38 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Marek Puzyniak @ 2013-04-10 11:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, johannes, Marek Puzyniak

When AP interface was stopped ssid and ssid_len from bss configuration
was not cleared. This caused a problem when after AP interface was stopped
another AP with shorter ssid was created. Previous ssid was not
overwriten by new one shorter.

Signed-off-by: Marek Puzyniak <marek.puzyniak@tieto.com>
---
 net/mac80211/cfg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c50c194..5c4cb08 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1048,6 +1048,8 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
 	ieee80211_free_keys(sdata);
 
 	sdata->vif.bss_conf.enable_beacon = false;
+	sdata->vif.bss_conf.ssid_len = 0;
+	memset(sdata->vif.bss_conf.ssid, 0, IEEE80211_MAX_SSID_LEN);
 	clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED);
 
-- 
1.7.0.4


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

* Re: [PATCH] mac80211: clear SSID when stoping AP
  2013-04-10 11:47 [PATCH] mac80211: clear SSID when stoping AP Marek Puzyniak
@ 2013-04-10 12:38 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2013-04-10 12:38 UTC (permalink / raw)
  To: Marek Puzyniak; +Cc: linville, linux-wireless

On Wed, 2013-04-10 at 13:47 +0200, Marek Puzyniak wrote:
> When AP interface was stopped ssid and ssid_len from bss configuration
> was not cleared. This caused a problem when after AP interface was stopped
> another AP with shorter ssid was created. Previous ssid was not
> overwriten by new one shorter.

I'll take the patch, sans the memset. If this was causing you trouble
you're most likely treating the SSID as a string, which it is not, so
you need to fix your driver.

johannes


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

end of thread, other threads:[~2013-04-10 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 11:47 [PATCH] mac80211: clear SSID when stoping AP Marek Puzyniak
2013-04-10 12:38 ` 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).