Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 73541
b: refs/heads/master
c: 5b98b1f
h: refs/heads/master
i:
  73539: 5d4495c
v: v3
  • Loading branch information
Johannes Berg authored and David S. Miller committed Nov 11, 2007
1 parent 26db4de commit ed3a5d2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 56db6c52bb61509c114b9f1b1eecc7461229770a
refs/heads/master: 5b98b1f7daf6d52ccc446486aca0b8bc9a588b2c
2 changes: 1 addition & 1 deletion trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ struct ieee80211_if_vlan {
#define IEEE80211_STA_AUTO_SSID_SEL BIT(10)
#define IEEE80211_STA_AUTO_BSSID_SEL BIT(11)
#define IEEE80211_STA_AUTO_CHANNEL_SEL BIT(12)
#define IEEE80211_STA_PRIVACY_INVOKED BIT(13)
struct ieee80211_if_sta {
enum {
IEEE80211_DISABLED, IEEE80211_AUTHENTICATE,
Expand Down Expand Up @@ -259,7 +260,6 @@ struct ieee80211_if_sta {
unsigned long request;
struct sk_buff_head skb_queue;

int key_management_enabled;
unsigned long last_probe;

#define IEEE80211_AUTH_ALG_OPEN BIT(0)
Expand Down
16 changes: 9 additions & 7 deletions trunk/net/mac80211/ieee80211_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,19 +926,21 @@ static int ieee80211_ioctl_siwauth(struct net_device *dev,
case IW_AUTH_CIPHER_GROUP:
case IW_AUTH_WPA_ENABLED:
case IW_AUTH_RX_UNENCRYPTED_EAPOL:
case IW_AUTH_PRIVACY_INVOKED:
break;
case IW_AUTH_KEY_MGMT:
break;
case IW_AUTH_PRIVACY_INVOKED:
if (sdata->type != IEEE80211_IF_TYPE_STA)
ret = -EINVAL;
else {
sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED;
/*
* Key management was set by wpa_supplicant,
* we only need this to associate to a network
* that has privacy enabled regardless of not
* having a key.
* Privacy invoked by wpa_supplicant, store the
* value and allow associating to a protected
* network without having a key up front.
*/
sdata->u.sta.key_management_enabled = !!data->value;
if (data->value)
sdata->u.sta.flags |=
IEEE80211_STA_PRIVACY_INVOKED;
}
break;
case IW_AUTH_80211_AUTH_ALG:
Expand Down
18 changes: 11 additions & 7 deletions trunk/net/mac80211/ieee80211_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,24 +704,28 @@ static int ieee80211_privacy_mismatch(struct net_device *dev,
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sta_bss *bss;
int res = 0;
int bss_privacy;
int wep_privacy;
int privacy_invoked;

if (!ifsta || (ifsta->flags & IEEE80211_STA_MIXED_CELL) ||
ifsta->key_management_enabled)
if (!ifsta || (ifsta->flags & IEEE80211_STA_MIXED_CELL))
return 0;

bss = ieee80211_rx_bss_get(dev, ifsta->bssid, local->hw.conf.channel,
ifsta->ssid, ifsta->ssid_len);
if (!bss)
return 0;

if (ieee80211_sta_wep_configured(dev) !=
!!(bss->capability & WLAN_CAPABILITY_PRIVACY))
res = 1;
bss_privacy = !!(bss->capability & WLAN_CAPABILITY_PRIVACY);
wep_privacy = !!ieee80211_sta_wep_configured(dev);
privacy_invoked = !!(ifsta->flags & IEEE80211_STA_PRIVACY_INVOKED);

ieee80211_rx_bss_put(dev, bss);

return res;
if ((bss_privacy == wep_privacy) || (bss_privacy == privacy_invoked))
return 0;

return 1;
}


Expand Down

0 comments on commit ed3a5d2

Please sign in to comment.