aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-11-07 13:55:33 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-11-07 13:55:33 -0500
commit94956eed14b4b16d401c8ad36d68df0608f968cb (patch)
tree60e4e1a3c2c44e8f6616db78cd6b22737b2a1f37 /net/mac80211
parent50e696308c3fb18a4a0dae7b3a4d47469149c919 (diff)
parente45a618753d5a8bc9086382f73bbc2d6a3399250 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits) forcedeth: fix a few sparse warnings (variable shadowing) forcedeth: Improve stats counters forcedeth: remove unneeded stats updates forcedeth: Acknowledge only interrupts that are being processed forcedeth: fix race when unloading module MAINTAINERS/rds: update maintainer wanrouter: Remove kernel_lock annotations usbnet: fix oops in usbnet_start_xmit ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined etherh: Add MAINTAINERS entry for etherh bonding: comparing a u8 with -1 is always false sky2: fix regression on Yukon Optima netlink: clarify attribute length check documentation netlink: validate NLA_MSECS length i825xx:xscale:8390:freescale: Fix Kconfig dependancies macvlan: receive multicast with local address tg3: Update version to 3.121 tg3: Eliminate timer race with reset_task tg3: Schedule at most one tg3_reset_task run tg3: Obtain PCI function number from device ...
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/cfg.c12
-rw-r--r--net/mac80211/ieee80211_i.h1
-rw-r--r--net/mac80211/mlme.c18
-rw-r--r--net/mac80211/work.c7
4 files changed, 26 insertions, 12 deletions
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 96f9fae32495..72c8bea81a6c 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -639,6 +639,9 @@ static bool ieee80211_powersave_allowed(struct ieee80211_sub_if_data *sdata)
639 if (!mgd->powersave) 639 if (!mgd->powersave)
640 return false; 640 return false;
641 641
642 if (mgd->broken_ap)
643 return false;
644
642 if (!mgd->associated) 645 if (!mgd->associated)
643 return false; 646 return false;
644 647
@@ -1491,10 +1494,21 @@ static bool ieee80211_assoc_success(struct ieee80211_work *wk,
1491 capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info); 1494 capab_info = le16_to_cpu(mgmt->u.assoc_resp.capab_info);
1492 1495
1493 if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14))) 1496 if ((aid & (BIT(15) | BIT(14))) != (BIT(15) | BIT(14)))
1494 printk(KERN_DEBUG "%s: invalid aid value %d; bits 15:14 not " 1497 printk(KERN_DEBUG
1495 "set\n", sdata->name, aid); 1498 "%s: invalid AID value 0x%x; bits 15:14 not set\n",
1499 sdata->name, aid);
1496 aid &= ~(BIT(15) | BIT(14)); 1500 aid &= ~(BIT(15) | BIT(14));
1497 1501
1502 ifmgd->broken_ap = false;
1503
1504 if (aid == 0 || aid > IEEE80211_MAX_AID) {
1505 printk(KERN_DEBUG
1506 "%s: invalid AID value %d (out of range), turn off PS\n",
1507 sdata->name, aid);
1508 aid = 0;
1509 ifmgd->broken_ap = true;
1510 }
1511
1498 pos = mgmt->u.assoc_resp.variable; 1512 pos = mgmt->u.assoc_resp.variable;
1499 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems); 1513 ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), &elems);
1500 1514
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,