From patchwork Wed Apr 10 11:47:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Puzyniak X-Patchwork-Id: 2420771 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 103D83FCA5 for ; Wed, 10 Apr 2013 11:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935612Ab3DJLsj (ORCPT ); Wed, 10 Apr 2013 07:48:39 -0400 Received: from ebb06.tieto.com ([131.207.168.38]:53501 "EHLO ebb06.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752173Ab3DJLsi (ORCPT ); Wed, 10 Apr 2013 07:48:38 -0400 X-AuditID: 83cfa826-b7fab6d0000009df-52-5165519315b2 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb06.tieto.com (SMTP Mailer) with SMTP id 98.89.02527.39155615; Wed, 10 Apr 2013 14:48:36 +0300 (EEST) Received: from localhost.localdomain (10.28.19.90) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.297.1; Wed, 10 Apr 2013 14:48:02 +0300 From: Marek Puzyniak To: CC: , , Marek Puzyniak Subject: [PATCH] mac80211: clear SSID when stoping AP Date: Wed, 10 Apr 2013 13:47:45 +0200 Message-ID: <1365594465-6405-1-git-send-email-marek.puzyniak@tieto.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrIIsWRmVeSWpSXmKPExsXSfL5DSXdKYGqgQetsFouPGz6xWLxZcYfd YmuPhAOzR3/vNhaPK99XM3p83iQXwBzFZZOSmpNZllqkb5fAlXHt5X3mghPsFX3rOtgbGHew dTFyckgImEjce3KNHcIWk7hwbz1YXEhgFaPEjH6eLkYuIHspo8TT4wdYQBJsAvoSnTuOgdki AjIS/27MZQaxmQXyJD6dPAMWFxYwlfiyYysjiM0ioCqxoHcGK4jNK+Au8bFnJdRiBYnWZYfY IeKCEidnPmGBmCMhcfDFC2aII1Qlrsz6wz6BkW8WkrJZSMoWMDKtYuRPTUoyMNMryUwtyddL zs/dxAgOqRVqOxifPZA6xCjAwajEw7vAMCVQiDWxrLgy9xCjJAeTkihvm19qoBBfUn5KZUZi cUZ8UWlOavEhRgkOZiUR3rs+QDnelMTKqtSifJiUNAeLkjjvA02glEB6YklqdmpqQWoRTFaG g0NJgtfPHygrWJSanlqRlplTgpBm4uAEGc4DNLwdZDFvcUFibnFmOkT+FKOilDhvOkizAEgi ozQPrhcW868YxYFeEeY1AqniAaYLuO5XQIOZgAYb9qeADC5JREhJNTAuNpn+JOS6wal2Tf8Z 7qZ9W9+xs13Tn/vWMkyH4WJC/QEed1e9DqvW+65qkq6bv8RqZV1v/9PBqLBsKfu/uw/42Tua mBb8ucz7ctvsQwYN28V8Vpb/6L6w/ePPUs/Obdds1TkuJuzPD8ndPEWyueexzCcvPmURq93/ Z1bZm589OWGr6tv8Fd5KLMUZiYZazEXFiQCUDpfG1AIAAA== Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 --- 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);