From patchwork Wed Jul 6 10:22:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 9216049 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 00BAE607D9 for ; Wed, 6 Jul 2016 10:23:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E62C028809 for ; Wed, 6 Jul 2016 10:23:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DA4292880F; Wed, 6 Jul 2016 10:23:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B11928809 for ; Wed, 6 Jul 2016 10:23:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752978AbcGFKX2 (ORCPT ); Wed, 6 Jul 2016 06:23:28 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:34205 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbcGFKXY (ORCPT ); Wed, 6 Jul 2016 06:23:24 -0400 Received: by mail-lf0-f68.google.com with SMTP id l102so9622519lfi.1; Wed, 06 Jul 2016 03:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9dEA80EhwJ3KUMtkDZmRHazDUmou5SVcejAkx5skp1w=; b=rZ7eYBPPmNf1KV+KdY+hylCtlcrxU/SwE6g0osPELo6kG1zlagi2DY699Pgz2u4apc drkA/xQAcToMPPVGQ+/BSeYpILOGew/7kcLFgC4GbqyTMFhass7RVttbT4uYndPoWjHa ostiA2M1ULSNe2fsKqKdOwCnWkOP1BzmpvKGb7KKPs3RqEb0Tf1QJ6jnGMeHWcl/ClEE MAa0X2sRySyPS4ogNoYviwY5BBE0yF7nJkir2yFENIuiR+0B3NzfuHaek75ys+h6L9Fr wvDEhel6AjVlJOPaFypr1OYugoljkrxIDylEqsLGow4McDcbg6w1TKWZD+weYLy/4xWx rG9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=9dEA80EhwJ3KUMtkDZmRHazDUmou5SVcejAkx5skp1w=; b=ma/Uq5WS+bL0vAYVwySrd9q4Ex1S6SrcpOH+2br0kCVkCKkj20IiY3guHusO0QBiJR XChD0lCycFeyTOJGtw4oH5PoRk8zfmOHMcsf/U26BRSlctMRm9DMHKq+rMOnX0JvGQzJ ARUaVSlgpCyw8MvlgDaYyDHl77R97yG51s5nWmaI4qh0o9O1GbakH9VSgkv11FpZfY4O RUlDFX4yg4SUzYR55H0Ag+h2tA9+quNr8J7J9SE5Ijd1L8I0fZrxlzyRRVzuL+BCOEYo d8mB1TOgPvdE4gel7I6uvXFxyo8Po4lH/KaJHNJY0FJZlSH9jbvbb9qV6YX0GrtM8oFk eRWg== X-Gm-Message-State: ALyK8tJITH319gxWcD8HA+bT6DBHtAxjMnTWCA2O8qy5hb+DEE1MsO6p5XJ/XQY0qputow== X-Received: by 10.25.25.79 with SMTP id 76mr6103522lfz.14.1467800602884; Wed, 06 Jul 2016 03:23:22 -0700 (PDT) Received: from linux-samsung.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id s87sm6125707lfg.46.2016.07.06.03.23.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Jul 2016 03:23:22 -0700 (PDT) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Kalle Valo Cc: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , Arend van Spriel , Franky Lin , Hante Meuleman , Pieter-Paul Giesberts , "Franky (Zhenhui) Lin" , linux-wireless@vger.kernel.org (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), brcm80211-dev-list.pdl@broadcom.com (open list:BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER), netdev@vger.kernel.org (open list:NETWORKING DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] brcmfmac: respect hidden_ssid for AP interfaces Date: Wed, 6 Jul 2016 12:22:54 +0200 Message-Id: <1467800585-10678-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This was succesfully tested with 4366B1. A small workaround is needed for the main interface otherwise it would stuck at the hidden state. Signed-off-by: Rafał Miłecki --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c index 6e6066a..8d1328f 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c @@ -4662,6 +4662,15 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev, brcmf_err("SET SSID error (%d)\n", err); goto exit; } + + if (settings->hidden_ssid) { + err = brcmf_fil_iovar_int_set(ifp, "closednet", 1); + if (err) { + brcmf_err("closednet error (%d)\n", err); + goto exit; + } + } + brcmf_dbg(TRACE, "AP mode configuration complete\n"); } else if (dev_role == NL80211_IFTYPE_P2P_GO) { err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec); @@ -4720,6 +4729,10 @@ static int brcmf_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *ndev) return err; } + /* First BSS doesn't get a full reset */ + if (ifp->bsscfgidx == 0) + brcmf_fil_iovar_int_set(ifp, "closednet", 0); + memset(&join_params, 0, sizeof(join_params)); err = brcmf_fil_cmd_data_set(ifp, BRCMF_C_SET_SSID, &join_params, sizeof(join_params));