diff options
-rw-r--r-- | net/mac80211/ibss.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index aa537681f87c..c94a695d8488 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -499,6 +499,7 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
499 | struct ieee80211_channel *chan = NULL; | 499 | struct ieee80211_channel *chan = NULL; |
500 | const u8 *bssid = NULL; | 500 | const u8 *bssid = NULL; |
501 | int active_ibss; | 501 | int active_ibss; |
502 | u16 capability; | ||
502 | 503 | ||
503 | active_ibss = ieee80211_sta_active_ibss(sdata); | 504 | active_ibss = ieee80211_sta_active_ibss(sdata); |
504 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 505 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
@@ -509,6 +510,10 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
509 | if (active_ibss) | 510 | if (active_ibss) |
510 | return; | 511 | return; |
511 | 512 | ||
513 | capability = WLAN_CAPABILITY_IBSS; | ||
514 | if (sdata->default_key) | ||
515 | capability |= WLAN_CAPABILITY_PRIVACY; | ||
516 | |||
512 | if (ifibss->fixed_bssid) | 517 | if (ifibss->fixed_bssid) |
513 | bssid = ifibss->bssid; | 518 | bssid = ifibss->bssid; |
514 | if (ifibss->fixed_channel) | 519 | if (ifibss->fixed_channel) |
@@ -517,8 +522,9 @@ static void ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata) | |||
517 | bssid = ifibss->bssid; | 522 | bssid = ifibss->bssid; |
518 | bss = (void *)cfg80211_get_bss(local->hw.wiphy, chan, bssid, | 523 | bss = (void *)cfg80211_get_bss(local->hw.wiphy, chan, bssid, |
519 | ifibss->ssid, ifibss->ssid_len, | 524 | ifibss->ssid, ifibss->ssid_len, |
520 | WLAN_CAPABILITY_IBSS, | 525 | capability, |
521 | WLAN_CAPABILITY_IBSS); | 526 | WLAN_CAPABILITY_IBSS | |
527 | WLAN_CAPABILITY_PRIVACY); | ||
522 | 528 | ||
523 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 529 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
524 | if (bss) | 530 | if (bss) |