Return-path: Received: from cp-out11.libero.it ([212.52.84.111]:51700 "EHLO cp-out11.libero.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752121AbYKZWST (ORCPT ); Wed, 26 Nov 2008 17:18:19 -0500 From: Fabio Rossi To: "John W. Linville" Subject: [PATCH] mac80211: accept empty strings for hidden SSIDs Date: Wed, 26 Nov 2008 22:44:23 +0100 Cc: linux-wireless@vger.kernel.org, Johannes Berg , Michael Wu MIME-Version: 1.0 Message-Id: <200811262244.23980.rossi.f@inwind.it> (sfid-20081126_231825_110899_5C66C6E2) Content-Type: text/plain; charset="us-ascii" Sender: linux-wireless-owner@vger.kernel.org List-ID: Some access points (e.g. Sitecom WL-174) use an empty string as hidden SSID. Signed-off-by: Fabio Rossi --- diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 88b0b4d..dc59f76 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c @@ -2023,7 +2023,7 @@ static int ieee80211_sta_match_ssid(struct ieee80211_if_sta *ifsta, } } - if (hidden_ssid && ifsta->ssid_len == ssid_len) + if (hidden_ssid && (ifsta->ssid_len == ssid_len || ssid_len == 0)) return 1; if (ssid_len == 1 && ssid[0] == ' ')