diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 13:55:33 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-11-07 13:55:33 -0500 |
commit | 94956eed14b4b16d401c8ad36d68df0608f968cb (patch) | |
tree | 60e4e1a3c2c44e8f6616db78cd6b22737b2a1f37 /net | |
parent | 50e696308c3fb18a4a0dae7b3a4d47469149c919 (diff) | |
parent | e45a618753d5a8bc9086382f73bbc2d6a3399250 (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')
-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 | ||||
-rw-r--r-- | net/wanrouter/wanproc.c | 2 |
8 files changed, 34 insertions, 19 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 940858a48cbd..2c7634296866 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -148,8 +148,6 @@ static int read_index_list(struct sock *sk) | |||
148 | 148 | ||
149 | hci_del_off_timer(d); | 149 | hci_del_off_timer(d); |
150 | 150 | ||
151 | set_bit(HCI_MGMT, &d->flags); | ||
152 | |||
153 | if (test_bit(HCI_SETUP, &d->flags)) | 151 | if (test_bit(HCI_SETUP, &d->flags)) |
154 | continue; | 152 | continue; |
155 | 153 | ||
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 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, |
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index f346395314ba..c43612ee96bb 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -81,7 +81,6 @@ static struct proc_dir_entry *proc_router; | |||
81 | * Iterator | 81 | * Iterator |
82 | */ | 82 | */ |
83 | static void *r_start(struct seq_file *m, loff_t *pos) | 83 | static void *r_start(struct seq_file *m, loff_t *pos) |
84 | __acquires(kernel_lock) | ||
85 | { | 84 | { |
86 | struct wan_device *wandev; | 85 | struct wan_device *wandev; |
87 | loff_t l = *pos; | 86 | loff_t l = *pos; |
@@ -103,7 +102,6 @@ static void *r_next(struct seq_file *m, void *v, loff_t *pos) | |||
103 | } | 102 | } |
104 | 103 | ||
105 | static void r_stop(struct seq_file *m, void *v) | 104 | static void r_stop(struct seq_file *m, void *v) |
106 | __releases(kernel_lock) | ||
107 | { | 105 | { |
108 | mutex_unlock(&config_mutex); | 106 | mutex_unlock(&config_mutex); |
109 | } | 107 | } |