From 0f443dd9102406f4bbbd8d5863eeb6bf75820794 Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Tue, 12 May 2009 20:47:32 +0200 Subject: [PATCH] --- yaml --- r: 150293 b: refs/heads/master c: e0d61887c2ee19bb63f6a8c0e2c149184e879501 h: refs/heads/master i: 150291: 88c8f2af09f656082bae47bbb5ac6698178edfd1 v: v3 --- [refs] | 2 +- trunk/net/mac80211/ibss.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index dab657806afd..7fd8e339df0f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e0502de6fe85b66ee51647eb75bc5af3c885d712 +refs/heads/master: e0d61887c2ee19bb63f6a8c0e2c149184e879501 diff --git a/trunk/net/mac80211/ibss.c b/trunk/net/mac80211/ibss.c index aa537681f87c..c94a695d8488 100644 --- a/trunk/net/mac80211/ibss.c +++ b/trunk/net/mac80211/ibss.c @@ -499,6 +499,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) struct ieee80211_channel *chan = NULL; const u8 *bssid = NULL; int active_ibss; + u16 capability; active_ibss = ieee80211_sta_active_ibss(sdata); #ifdef CONFIG_MAC80211_IBSS_DEBUG @@ -509,6 +510,10 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) if (active_ibss) return; + capability = WLAN_CAPABILITY_IBSS; + if (sdata->default_key) + capability |= WLAN_CAPABILITY_PRIVACY; + if (ifibss->fixed_bssid) bssid = ifibss->bssid; if (ifibss->fixed_channel) @@ -517,8 +522,9 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) bssid = ifibss->bssid; bss = (void *)cfg80211_get_bss(local->hw.wiphy, chan, bssid, ifibss->ssid, ifibss->ssid_len, - WLAN_CAPABILITY_IBSS, - WLAN_CAPABILITY_IBSS); + capability, + WLAN_CAPABILITY_IBSS | + WLAN_CAPABILITY_PRIVACY); #ifdef CONFIG_MAC80211_IBSS_DEBUG if (bss)