diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-09 15:44:19 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-09 15:44:19 -0400 |
| commit | 63a07cb64ccc3ceae619d3298545d602ab5ecd38 (patch) | |
| tree | e14e76f552eecb8c8e9b5f377b809c74a01f6f28 /net | |
| parent | b95a56809343fb727c818ad1b9da14a17fa92ef6 (diff) | |
| parent | 327723edebbbd621ed35b0d63073685eb225563e (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits)
mac80211: fix deauth before assoc
iwlwifi: add missing rcu_read_lock
mac80211: fix function pointer check
wireless: remove my name from the maintainer list
ath5k: fix NULL pointer in antenna configuration
p54usb: Add device ID for Dell WLA3310 USB
wl1251: fix a memory leak in probe
ipmr: dont corrupt lists
8139too: fix buffer overrun in rtl8139_init_board
asix: check packet size against mtu+ETH_HLEN instead of ETH_FRAME_LEN
r8169: fix random mdio_write failures
ip6mr: fix a typo in ip6mr_for_each_table()
iwlwifi: move sysfs_create_group to post request firmware
iwlwifi: add name to Maintainers list
iwl3945: fix internal scan
iwl3945: enable stuck queue detection on 3945
ipv6: avoid high order allocations
ath5k: retain promiscuous setting
ath5k: depend on CONFIG_PM_SLEEP for suspend/resume functions
mac80211: process station blockack action frames from work
...
Diffstat (limited to 'net')
| -rw-r--r-- | net/ipv4/ipmr.c | 4 | ||||
| -rw-r--r-- | net/ipv6/ip6mr.c | 6 | ||||
| -rw-r--r-- | net/ipv6/mcast.c | 5 | ||||
| -rw-r--r-- | net/mac80211/driver-ops.h | 2 | ||||
| -rw-r--r-- | net/mac80211/mlme.c | 92 | ||||
| -rw-r--r-- | net/mac80211/rx.c | 3 |
6 files changed, 98 insertions, 14 deletions
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 856123fe32f9..757f25eb9b4b 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c | |||
| @@ -267,8 +267,10 @@ static void __net_exit ipmr_rules_exit(struct net *net) | |||
| 267 | { | 267 | { |
| 268 | struct mr_table *mrt, *next; | 268 | struct mr_table *mrt, *next; |
| 269 | 269 | ||
| 270 | list_for_each_entry_safe(mrt, next, &net->ipv4.mr_tables, list) | 270 | list_for_each_entry_safe(mrt, next, &net->ipv4.mr_tables, list) { |
| 271 | list_del(&mrt->list); | ||
| 271 | kfree(mrt); | 272 | kfree(mrt); |
| 273 | } | ||
| 272 | fib_rules_unregister(net->ipv4.mr_rules_ops); | 274 | fib_rules_unregister(net->ipv4.mr_rules_ops); |
| 273 | } | 275 | } |
| 274 | #else | 276 | #else |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 073071f2b75b..66078dad7fe8 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
| @@ -120,7 +120,7 @@ static void mroute_clean_tables(struct mr6_table *mrt); | |||
| 120 | static void ipmr_expire_process(unsigned long arg); | 120 | static void ipmr_expire_process(unsigned long arg); |
| 121 | 121 | ||
| 122 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES | 122 | #ifdef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES |
| 123 | #define ip6mr_for_each_table(mrt, met) \ | 123 | #define ip6mr_for_each_table(mrt, net) \ |
| 124 | list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list) | 124 | list_for_each_entry_rcu(mrt, &net->ipv6.mr6_tables, list) |
| 125 | 125 | ||
| 126 | static struct mr6_table *ip6mr_get_table(struct net *net, u32 id) | 126 | static struct mr6_table *ip6mr_get_table(struct net *net, u32 id) |
| @@ -254,8 +254,10 @@ static void __net_exit ip6mr_rules_exit(struct net *net) | |||
| 254 | { | 254 | { |
| 255 | struct mr6_table *mrt, *next; | 255 | struct mr6_table *mrt, *next; |
| 256 | 256 | ||
| 257 | list_for_each_entry_safe(mrt, next, &net->ipv6.mr6_tables, list) | 257 | list_for_each_entry_safe(mrt, next, &net->ipv6.mr6_tables, list) { |
| 258 | list_del(&mrt->list); | ||
| 258 | ip6mr_free_table(mrt); | 259 | ip6mr_free_table(mrt); |
| 260 | } | ||
| 259 | fib_rules_unregister(net->ipv6.mr6_rules_ops); | 261 | fib_rules_unregister(net->ipv6.mr6_rules_ops); |
| 260 | } | 262 | } |
| 261 | #else | 263 | #else |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 59f1881968c7..ab1622d7d409 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
| @@ -1356,7 +1356,10 @@ static struct sk_buff *mld_newpack(struct net_device *dev, int size) | |||
| 1356 | IPV6_TLV_PADN, 0 }; | 1356 | IPV6_TLV_PADN, 0 }; |
| 1357 | 1357 | ||
| 1358 | /* we assume size > sizeof(ra) here */ | 1358 | /* we assume size > sizeof(ra) here */ |
| 1359 | skb = sock_alloc_send_skb(sk, size + LL_ALLOCATED_SPACE(dev), 1, &err); | 1359 | size += LL_ALLOCATED_SPACE(dev); |
| 1360 | /* limit our allocations to order-0 page */ | ||
| 1361 | size = min_t(int, size, SKB_MAX_ORDER(0, 0)); | ||
| 1362 | skb = sock_alloc_send_skb(sk, size, 1, &err); | ||
| 1360 | 1363 | ||
| 1361 | if (!skb) | 1364 | if (!skb) |
| 1362 | return NULL; | 1365 | return NULL; |
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h index 4f2271316650..9c1da0809160 100644 --- a/net/mac80211/driver-ops.h +++ b/net/mac80211/driver-ops.h | |||
| @@ -349,7 +349,7 @@ static inline int drv_get_survey(struct ieee80211_local *local, int idx, | |||
| 349 | struct survey_info *survey) | 349 | struct survey_info *survey) |
| 350 | { | 350 | { |
| 351 | int ret = -EOPNOTSUPP; | 351 | int ret = -EOPNOTSUPP; |
| 352 | if (local->ops->conf_tx) | 352 | if (local->ops->get_survey) |
| 353 | ret = local->ops->get_survey(&local->hw, idx, survey); | 353 | ret = local->ops->get_survey(&local->hw, idx, survey); |
| 354 | /* trace_drv_get_survey(local, idx, survey, ret); */ | 354 | /* trace_drv_get_survey(local, idx, survey, ret); */ |
| 355 | return ret; | 355 | return ret; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 0839c4e8fd2e..f803f8b72a93 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
| @@ -1692,14 +1692,52 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
| 1692 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); | 1692 | rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len); |
| 1693 | break; | 1693 | break; |
| 1694 | case IEEE80211_STYPE_ACTION: | 1694 | case IEEE80211_STYPE_ACTION: |
| 1695 | if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT) | 1695 | switch (mgmt->u.action.category) { |
| 1696 | case WLAN_CATEGORY_BACK: { | ||
| 1697 | struct ieee80211_local *local = sdata->local; | ||
| 1698 | int len = skb->len; | ||
| 1699 | struct sta_info *sta; | ||
| 1700 | |||
| 1701 | rcu_read_lock(); | ||
| 1702 | sta = sta_info_get(sdata, mgmt->sa); | ||
| 1703 | if (!sta) { | ||
| 1704 | rcu_read_unlock(); | ||
| 1705 | break; | ||
| 1706 | } | ||
| 1707 | |||
| 1708 | local_bh_disable(); | ||
| 1709 | |||
| 1710 | switch (mgmt->u.action.u.addba_req.action_code) { | ||
| 1711 | case WLAN_ACTION_ADDBA_REQ: | ||
| 1712 | if (len < (IEEE80211_MIN_ACTION_SIZE + | ||
| 1713 | sizeof(mgmt->u.action.u.addba_req))) | ||
| 1714 | break; | ||
| 1715 | ieee80211_process_addba_request(local, sta, mgmt, len); | ||
| 1716 | break; | ||
| 1717 | case WLAN_ACTION_ADDBA_RESP: | ||
| 1718 | if (len < (IEEE80211_MIN_ACTION_SIZE + | ||
| 1719 | sizeof(mgmt->u.action.u.addba_resp))) | ||
| 1720 | break; | ||
| 1721 | ieee80211_process_addba_resp(local, sta, mgmt, len); | ||
| 1722 | break; | ||
| 1723 | case WLAN_ACTION_DELBA: | ||
| 1724 | if (len < (IEEE80211_MIN_ACTION_SIZE + | ||
| 1725 | sizeof(mgmt->u.action.u.delba))) | ||
| 1726 | break; | ||
| 1727 | ieee80211_process_delba(sdata, sta, mgmt, len); | ||
| 1728 | break; | ||
| 1729 | } | ||
| 1730 | local_bh_enable(); | ||
| 1731 | rcu_read_unlock(); | ||
| 1696 | break; | 1732 | break; |
| 1697 | 1733 | } | |
| 1698 | ieee80211_sta_process_chanswitch(sdata, | 1734 | case WLAN_CATEGORY_SPECTRUM_MGMT: |
| 1699 | &mgmt->u.action.u.chan_switch.sw_elem, | 1735 | ieee80211_sta_process_chanswitch(sdata, |
| 1700 | (void *)ifmgd->associated->priv, | 1736 | &mgmt->u.action.u.chan_switch.sw_elem, |
| 1701 | rx_status->mactime); | 1737 | (void *)ifmgd->associated->priv, |
| 1702 | break; | 1738 | rx_status->mactime); |
| 1739 | break; | ||
| 1740 | } | ||
| 1703 | } | 1741 | } |
| 1704 | mutex_unlock(&ifmgd->mtx); | 1742 | mutex_unlock(&ifmgd->mtx); |
| 1705 | 1743 | ||
| @@ -1722,9 +1760,45 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata, | |||
| 1722 | mutex_unlock(&ifmgd->mtx); | 1760 | mutex_unlock(&ifmgd->mtx); |
| 1723 | 1761 | ||
| 1724 | if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && | 1762 | if (skb->len >= 24 + 2 /* mgmt + deauth reason */ && |
| 1725 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) | 1763 | (fc & IEEE80211_FCTL_STYPE) == IEEE80211_STYPE_DEAUTH) { |
| 1726 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | 1764 | struct ieee80211_local *local = sdata->local; |
| 1765 | struct ieee80211_work *wk; | ||
| 1766 | |||
| 1767 | mutex_lock(&local->work_mtx); | ||
| 1768 | list_for_each_entry(wk, &local->work_list, list) { | ||
| 1769 | if (wk->sdata != sdata) | ||
| 1770 | continue; | ||
| 1771 | |||
| 1772 | if (wk->type != IEEE80211_WORK_ASSOC) | ||
| 1773 | continue; | ||
| 1774 | |||
| 1775 | if (memcmp(mgmt->bssid, wk->filter_ta, ETH_ALEN)) | ||
| 1776 | continue; | ||
| 1777 | if (memcmp(mgmt->sa, wk->filter_ta, ETH_ALEN)) | ||
| 1778 | continue; | ||
| 1727 | 1779 | ||
| 1780 | /* | ||
| 1781 | * Printing the message only here means we can't | ||
| 1782 | * spuriously print it, but it also means that it | ||
| 1783 | * won't be printed when the frame comes in before | ||
| 1784 | * we even tried to associate or in similar cases. | ||
| 1785 | * | ||
| 1786 | * Ultimately, I suspect cfg80211 should print the | ||
| 1787 | * messages instead. | ||
| 1788 | */ | ||
| 1789 | printk(KERN_DEBUG | ||
| 1790 | "%s: deauthenticated from %pM (Reason: %u)\n", | ||
| 1791 | sdata->name, mgmt->bssid, | ||
| 1792 | le16_to_cpu(mgmt->u.deauth.reason_code)); | ||
| 1793 | |||
| 1794 | list_del_rcu(&wk->list); | ||
| 1795 | free_work(wk); | ||
| 1796 | break; | ||
| 1797 | } | ||
| 1798 | mutex_unlock(&local->work_mtx); | ||
| 1799 | |||
| 1800 | cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len); | ||
| 1801 | } | ||
| 1728 | out: | 1802 | out: |
| 1729 | kfree_skb(skb); | 1803 | kfree_skb(skb); |
| 1730 | } | 1804 | } |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 5e0b65406c44..be9abc2e6348 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -1944,6 +1944,9 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx) | |||
| 1944 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) | 1944 | if (len < IEEE80211_MIN_ACTION_SIZE + 1) |
| 1945 | break; | 1945 | break; |
| 1946 | 1946 | ||
| 1947 | if (sdata->vif.type == NL80211_IFTYPE_STATION) | ||
| 1948 | return ieee80211_sta_rx_mgmt(sdata, rx->skb); | ||
| 1949 | |||
| 1947 | switch (mgmt->u.action.u.addba_req.action_code) { | 1950 | switch (mgmt->u.action.u.addba_req.action_code) { |
| 1948 | case WLAN_ACTION_ADDBA_REQ: | 1951 | case WLAN_ACTION_ADDBA_REQ: |
| 1949 | if (len < (IEEE80211_MIN_ACTION_SIZE + | 1952 | if (len < (IEEE80211_MIN_ACTION_SIZE + |
