diff options
author | David S. Miller <davem@davemloft.net> | 2011-11-04 17:14:34 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-04 17:14:34 -0400 |
commit | 39b02648d251dbfa27b576d55eeab4cc62228d86 (patch) | |
tree | c442c1edb4242667d65340c20adee7da7afb66c2 /net | |
parent | 1583171492eb514e267c7b51e96846b38de0f544 (diff) | |
parent | 22097fd297c85ec6c2e700d506f231f7cae442e1 (diff) |
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 2 | ||||
-rw-r--r-- | net/bluetooth/mgmt.c | 2 | ||||
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 9 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 12 | ||||
-rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 18 | ||||
-rw-r--r-- | net/mac80211/work.c | 7 |
7 files changed, 34 insertions, 17 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index b84458dcc226..be84ae33ae36 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -613,7 +613,7 @@ static int hci_dev_do_close(struct hci_dev *hdev) | |||
613 | if (!test_bit(HCI_RAW, &hdev->flags)) { | 613 | if (!test_bit(HCI_RAW, &hdev->flags)) { |
614 | set_bit(HCI_INIT, &hdev->flags); | 614 | set_bit(HCI_INIT, &hdev->flags); |
615 | __hci_request(hdev, hci_reset_req, 0, | 615 | __hci_request(hdev, hci_reset_req, 0, |
616 | msecs_to_jiffies(250)); | 616 | msecs_to_jiffies(HCI_INIT_TIMEOUT)); |
617 | clear_bit(HCI_INIT, &hdev->flags); | 617 | clear_bit(HCI_INIT, &hdev->flags); |
618 | } | 618 | } |
619 | 619 | ||
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 5a94eec06caa..5caff4d47596 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -147,8 +147,6 @@ static int read_index_list(struct sock *sk) | |||
147 | 147 | ||
148 | hci_del_off_timer(d); | 148 | hci_del_off_timer(d); |
149 | 149 | ||
150 | set_bit(HCI_MGMT, &d->flags); | ||
151 | |||
152 | if (test_bit(HCI_SETUP, &d->flags)) | 150 | if (test_bit(HCI_SETUP, &d->flags)) |
153 | continue; | 151 | continue; |
154 | 152 | ||
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 38b618c96de6..4e32e18211f9 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -1802,6 +1802,11 @@ static inline void rfcomm_process_dlcs(struct rfcomm_session *s) | |||
1802 | continue; | 1802 | continue; |
1803 | } | 1803 | } |
1804 | 1804 | ||
1805 | if (test_bit(RFCOMM_ENC_DROP, &d->flags)) { | ||
1806 | __rfcomm_dlc_close(d, ECONNREFUSED); | ||
1807 | continue; | ||
1808 | } | ||
1809 | |||
1805 | if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) { | 1810 | if (test_and_clear_bit(RFCOMM_AUTH_ACCEPT, &d->flags)) { |
1806 | rfcomm_dlc_clear_timer(d); | 1811 | rfcomm_dlc_clear_timer(d); |
1807 | if (d->out) { | 1812 | if (d->out) { |
@@ -2077,7 +2082,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt) | |||
2077 | if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) { | 2082 | if (test_and_clear_bit(RFCOMM_SEC_PENDING, &d->flags)) { |
2078 | rfcomm_dlc_clear_timer(d); | 2083 | rfcomm_dlc_clear_timer(d); |
2079 | if (status || encrypt == 0x00) { | 2084 | if (status || encrypt == 0x00) { |
2080 | __rfcomm_dlc_close(d, ECONNREFUSED); | 2085 | set_bit(RFCOMM_ENC_DROP, &d->flags); |
2081 | continue; | 2086 | continue; |
2082 | } | 2087 | } |
2083 | } | 2088 | } |
@@ -2088,7 +2093,7 @@ static void rfcomm_security_cfm(struct hci_conn *conn, u8 status, u8 encrypt) | |||
2088 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); | 2093 | rfcomm_dlc_set_timer(d, RFCOMM_AUTH_TIMEOUT); |
2089 | continue; | 2094 | continue; |
2090 | } else if (d->sec_level == BT_SECURITY_HIGH) { | 2095 | } else if (d->sec_level == BT_SECURITY_HIGH) { |
2091 | __rfcomm_dlc_close(d, ECONNREFUSED); | 2096 | set_bit(RFCOMM_ENC_DROP, &d->flags); |
2092 | continue; | 2097 | continue; |
2093 | } | 2098 | } |
2094 | } | 2099 | } |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index ebd7fb101fbf..d06c65fa5526 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -832,6 +832,12 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
832 | if (is_multicast_ether_addr(mac)) | 832 | if (is_multicast_ether_addr(mac)) |
833 | return -EINVAL; | 833 | return -EINVAL; |
834 | 834 | ||
835 | /* Only TDLS-supporting stations can add TDLS peers */ | ||
836 | if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) && | ||
837 | !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) && | ||
838 | sdata->vif.type == NL80211_IFTYPE_STATION)) | ||
839 | return -ENOTSUPP; | ||
840 | |||
835 | sta = sta_info_alloc(sdata, mac, GFP_KERNEL); | 841 | sta = sta_info_alloc(sdata, mac, GFP_KERNEL); |
836 | if (!sta) | 842 | if (!sta) |
837 | return -ENOMEM; | 843 | return -ENOMEM; |
@@ -841,12 +847,6 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
841 | 847 | ||
842 | sta_apply_parameters(local, sta, params); | 848 | sta_apply_parameters(local, sta, params); |
843 | 849 | ||
844 | /* Only TDLS-supporting stations can add TDLS peers */ | ||
845 | if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && | ||
846 | !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) && | ||
847 | sdata->vif.type == NL80211_IFTYPE_STATION)) | ||
848 | return -ENOTSUPP; | ||
849 | |||
850 | rate_control_rate_init(sta); | 850 | rate_control_rate_init(sta); |
851 | 851 | ||
852 | layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN || | 852 | layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN || |
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 4c3d1f591bec..ea10a51babda 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -389,6 +389,7 @@ struct ieee80211_if_managed { | |||
389 | 389 | ||
390 | unsigned long timers_running; /* used for quiesce/restart */ | 390 | unsigned long timers_running; /* used for quiesce/restart */ |
391 | bool powersave; /* powersave requested for this iface */ | 391 | bool powersave; /* powersave requested for this iface */ |
392 | bool broken_ap; /* AP is broken -- turn off powersave */ | ||
392 | enum ieee80211_smps_mode req_smps, /* requested smps mode */ | 393 | enum ieee80211_smps_mode req_smps, /* requested smps mode */ |
393 | ap_smps, /* smps mode AP thinks we're in */ | 394 | ap_smps, /* smps mode AP thinks we're in */ |
394 | driver_smps_mode; /* smps mode request */ | 395 | driver_smps_mode; /* smps mode request */ |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index ba2da11a997b..17258feaab9b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -637,6 +637,9 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata) | |||
637 | if (!mgd->powersave) | 637 | if (!mgd->powersave) |
638 | return false; | 638 | return false; |
639 | 639 | ||
640 | if (mgd->broken_ap) | ||
641 | return false; | ||
642 | |||
640 | if (!mgd->associated) | 643 | if (!mgd->associated) |
641 | return false; | 644 | return false; |
642 | 645 | ||
@@ -1489,10 +1492,21 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk, | |||
1489 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); | 1492 | capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); |
1490 | 1493 | ||
1491 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) | 1494 | if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) |
1492 | printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " | 1495 | printk(KERN_DEBUG |
1493 | "set\n", sdata->name, aid); | 1496 | "%s: invalid AID value 0x%x; bits 15:14 not set\n", |
1497 | sdata->name, aid); | ||
1494 | aid &= ~(BIT(15) | BIT(14)); | 1498 | aid &= ~(BIT(15) | BIT(14)); |
1495 | 1499 | ||
1500 | ifmgd->broken_ap = false; | ||
1501 | |||
1502 | if (aid == 0 || aid > IEEE80211_MAX_AID) { | ||
1503 | printk(KERN_DEBUG | ||
1504 | "%s: invalid AID value %d (out of range), turn off PS\n", | ||
1505 | sdata->name, aid); | ||
1506 | aid = 0; | ||
1507 | ifmgd->broken_ap = true; | ||
1508 | } | ||
1509 | |||
1496 | pos = mgmt->u.assoc_resp.variable; | 1510 | pos = mgmt->u.assoc_resp.variable; |
1497 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); | 1511 | ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); |
1498 | 1512 | ||
diff --git a/net/mac80211/work.c b/net/mac80211/work.c index 94472eb34d76..6c53b6d1002b 100644 --- a/net/mac80211/work.c +++ b/net/mac80211/work.c | |||
@@ -1084,14 +1084,13 @@ static void ieee80211_work_work(struct work_struct *work) | |||
1084 | continue; | 1084 | continue; |
1085 | if (wk->chan != local->tmp_channel) | 1085 | if (wk->chan != local->tmp_channel) |
1086 | continue; | 1086 | continue; |
1087 | if (ieee80211_work_ct_coexists(wk->chan_type, | 1087 | if (!ieee80211_work_ct_coexists(wk->chan_type, |
1088 | local->tmp_channel_type)) | 1088 | local->tmp_channel_type)) |
1089 | continue; | 1089 | continue; |
1090 | remain_off_channel = true; | 1090 | remain_off_channel = true; |
1091 | } | 1091 | } |
1092 | 1092 | ||
1093 | if (!remain_off_channel && local->tmp_channel) { | 1093 | if (!remain_off_channel && local->tmp_channel) { |
1094 | bool on_oper_chan = ieee80211_cfg_on_oper_channel(local); | ||
1095 | local->tmp_channel = NULL; | 1094 | local->tmp_channel = NULL; |
1096 | /* If tmp_channel wasn't operating channel, then | 1095 | /* If tmp_channel wasn't operating channel, then |
1097 | * we need to go back on-channel. | 1096 | * we need to go back on-channel. |
@@ -1101,7 +1100,7 @@ static void ieee80211_work_work(struct work_struct *work) | |||
1101 | * we still need to do a hardware config. Currently, | 1100 | * we still need to do a hardware config. Currently, |
1102 | * we cannot be here while scanning, however. | 1101 | * we cannot be here while scanning, however. |
1103 | */ | 1102 | */ |
1104 | if (ieee80211_cfg_on_oper_channel(local) && !on_oper_chan) | 1103 | if (!ieee80211_cfg_on_oper_channel(local)) |
1105 | ieee80211_hw_config(local, 0); | 1104 | ieee80211_hw_config(local, 0); |
1106 | 1105 | ||
1107 | /* At the least, we need to disable offchannel_ps, | 1106 | /* At the least, we need to disable offchannel_ps, |