aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/cfg80211.h21
-rw-r--r--net/mac80211/event.c5
-rw-r--r--net/mac80211/ieee80211_i.h3
-rw-r--r--net/mac80211/mlme.c30
-rw-r--r--net/mac80211/rx.c3
-rw-r--r--net/mac80211/wpa.c3
-rw-r--r--net/wireless/mlme.c30
-rw-r--r--net/wireless/nl80211.c48
-rw-r--r--net/wireless/nl80211.h14
9 files changed, 91 insertions, 66 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index dba7874d1963..1696ff647a08 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1572,64 +1572,70 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
1572 * @dev: network device 1572 * @dev: network device
1573 * @buf: authentication frame (header + body) 1573 * @buf: authentication frame (header + body)
1574 * @len: length of the frame data 1574 * @len: length of the frame data
1575 * @gfp: allocation flags
1575 * 1576 *
1576 * This function is called whenever an authentication has been processed in 1577 * This function is called whenever an authentication has been processed in
1577 * station mode. The driver is required to call either this function or 1578 * station mode. The driver is required to call either this function or
1578 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth() 1579 * cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth()
1579 * call. 1580 * call.
1580 */ 1581 */
1581void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len); 1582void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
1582 1583
1583/** 1584/**
1584 * cfg80211_send_auth_timeout - notification of timed out authentication 1585 * cfg80211_send_auth_timeout - notification of timed out authentication
1585 * @dev: network device 1586 * @dev: network device
1586 * @addr: The MAC address of the device with which the authentication timed out 1587 * @addr: The MAC address of the device with which the authentication timed out
1588 * @gfp: allocation flags
1587 */ 1589 */
1588void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 1590void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp);
1589 1591
1590/** 1592/**
1591 * cfg80211_send_rx_assoc - notification of processed association 1593 * cfg80211_send_rx_assoc - notification of processed association
1592 * @dev: network device 1594 * @dev: network device
1593 * @buf: (re)association response frame (header + body) 1595 * @buf: (re)association response frame (header + body)
1594 * @len: length of the frame data 1596 * @len: length of the frame data
1597 * @gfp: allocation flags
1595 * 1598 *
1596 * This function is called whenever a (re)association response has been 1599 * This function is called whenever a (re)association response has been
1597 * processed in station mode. The driver is required to call either this 1600 * processed in station mode. The driver is required to call either this
1598 * function or cfg80211_send_assoc_timeout() to indicate the result of 1601 * function or cfg80211_send_assoc_timeout() to indicate the result of
1599 * cfg80211_ops::assoc() call. 1602 * cfg80211_ops::assoc() call.
1600 */ 1603 */
1601void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len); 1604void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
1602 1605
1603/** 1606/**
1604 * cfg80211_send_assoc_timeout - notification of timed out association 1607 * cfg80211_send_assoc_timeout - notification of timed out association
1605 * @dev: network device 1608 * @dev: network device
1606 * @addr: The MAC address of the device with which the association timed out 1609 * @addr: The MAC address of the device with which the association timed out
1610 * @gfp: allocation flags
1607 */ 1611 */
1608void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr); 1612void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp);
1609 1613
1610/** 1614/**
1611 * cfg80211_send_deauth - notification of processed deauthentication 1615 * cfg80211_send_deauth - notification of processed deauthentication
1612 * @dev: network device 1616 * @dev: network device
1613 * @buf: deauthentication frame (header + body) 1617 * @buf: deauthentication frame (header + body)
1614 * @len: length of the frame data 1618 * @len: length of the frame data
1619 * @gfp: allocation flags
1615 * 1620 *
1616 * This function is called whenever deauthentication has been processed in 1621 * This function is called whenever deauthentication has been processed in
1617 * station mode. This includes both received deauthentication frames and 1622 * station mode. This includes both received deauthentication frames and
1618 * locally generated ones. 1623 * locally generated ones.
1619 */ 1624 */
1620void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len); 1625void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
1621 1626
1622/** 1627/**
1623 * cfg80211_send_disassoc - notification of processed disassociation 1628 * cfg80211_send_disassoc - notification of processed disassociation
1624 * @dev: network device 1629 * @dev: network device
1625 * @buf: disassociation response frame (header + body) 1630 * @buf: disassociation response frame (header + body)
1626 * @len: length of the frame data 1631 * @len: length of the frame data
1632 * @gfp: allocation flags
1627 * 1633 *
1628 * This function is called whenever disassociation has been processed in 1634 * This function is called whenever disassociation has been processed in
1629 * station mode. This includes both received disassociation frames and locally 1635 * station mode. This includes both received disassociation frames and locally
1630 * generated ones. 1636 * generated ones.
1631 */ 1637 */
1632void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len); 1638void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
1633 1639
1634/** 1640/**
1635 * cfg80211_hold_bss - exclude bss from expiration 1641 * cfg80211_hold_bss - exclude bss from expiration
@@ -1655,6 +1661,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
1655 * @key_type: The key type that the received frame used 1661 * @key_type: The key type that the received frame used
1656 * @key_id: Key identifier (0..3) 1662 * @key_id: Key identifier (0..3)
1657 * @tsc: The TSC value of the frame that generated the MIC failure (6 octets) 1663 * @tsc: The TSC value of the frame that generated the MIC failure (6 octets)
1664 * @gfp: allocation flags
1658 * 1665 *
1659 * This function is called whenever the local MAC detects a MIC failure in a 1666 * This function is called whenever the local MAC detects a MIC failure in a
1660 * received frame. This matches with MLME-MICHAELMICFAILURE.indication() 1667 * received frame. This matches with MLME-MICHAELMICFAILURE.indication()
@@ -1662,7 +1669,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
1662 */ 1669 */
1663void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, 1670void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
1664 enum nl80211_key_type key_type, int key_id, 1671 enum nl80211_key_type key_type, int key_id,
1665 const u8 *tsc); 1672 const u8 *tsc, gfp_t gfp);
1666 1673
1667/** 1674/**
1668 * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS 1675 * cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS
diff --git a/net/mac80211/event.c b/net/mac80211/event.c
index 3ac636285fb1..01ae759518f6 100644
--- a/net/mac80211/event.c
+++ b/net/mac80211/event.c
@@ -16,11 +16,12 @@
16 * driver or is still in the frame), it should provide that information. 16 * driver or is still in the frame), it should provide that information.
17 */ 17 */
18void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, 18void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
19 struct ieee80211_hdr *hdr, const u8 *tsc) 19 struct ieee80211_hdr *hdr, const u8 *tsc,
20 gfp_t gfp)
20{ 21{
21 cfg80211_michael_mic_failure(sdata->dev, hdr->addr2, 22 cfg80211_michael_mic_failure(sdata->dev, hdr->addr2,
22 (hdr->addr1[0] & 0x01) ? 23 (hdr->addr1[0] & 0x01) ?
23 NL80211_KEYTYPE_GROUP : 24 NL80211_KEYTYPE_GROUP :
24 NL80211_KEYTYPE_PAIRWISE, 25 NL80211_KEYTYPE_PAIRWISE,
25 keyidx, tsc); 26 keyidx, tsc, gfp);
26} 27}
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c65c65a9e697..e0323e540a03 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1088,7 +1088,8 @@ u8 *ieee80211_get_bssid(struct ieee80211_hdr *hdr, size_t len,
1088int ieee80211_frame_duration(struct ieee80211_local *local, size_t len, 1088int ieee80211_frame_duration(struct ieee80211_local *local, size_t len,
1089 int rate, int erp, int short_preamble); 1089 int rate, int erp, int short_preamble);
1090void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx, 1090void mac80211_ev_michael_mic_failure(struct ieee80211_sub_if_data *sdata, int keyidx,
1091 struct ieee80211_hdr *hdr, const u8 *tsc); 1091 struct ieee80211_hdr *hdr, const u8 *tsc,
1092 gfp_t gfp);
1092void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata); 1093void ieee80211_set_wmm_default(struct ieee80211_sub_if_data *sdata);
1093void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb, 1094void ieee80211_tx_skb(struct ieee80211_sub_if_data *sdata, struct sk_buff *skb,
1094 int encrypt); 1095 int encrypt);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 5e25d320deae..383392b04282 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -419,9 +419,11 @@ static void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
419 mgmt->u.deauth.reason_code = cpu_to_le16(reason); 419 mgmt->u.deauth.reason_code = cpu_to_le16(reason);
420 420
421 if (stype == IEEE80211_STYPE_DEAUTH) 421 if (stype == IEEE80211_STYPE_DEAUTH)
422 cfg80211_send_deauth(sdata->dev, (u8 *) mgmt, skb->len); 422 cfg80211_send_deauth(sdata->dev, (u8 *) mgmt, skb->len,
423 GFP_KERNEL);
423 else 424 else
424 cfg80211_send_disassoc(sdata->dev, (u8 *) mgmt, skb->len); 425 cfg80211_send_disassoc(sdata->dev, (u8 *) mgmt, skb->len,
426 GFP_KERNEL);
425 ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED); 427 ieee80211_tx_skb(sdata, skb, ifmgd->flags & IEEE80211_STA_MFP_ENABLED);
426} 428}
427 429
@@ -1006,7 +1008,8 @@ static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata)
1006 sdata->dev->name, ifmgd->bssid); 1008 sdata->dev->name, ifmgd->bssid);
1007 ifmgd->state = IEEE80211_STA_MLME_DISABLED; 1009 ifmgd->state = IEEE80211_STA_MLME_DISABLED;
1008 ieee80211_recalc_idle(local); 1010 ieee80211_recalc_idle(local);
1009 cfg80211_send_auth_timeout(sdata->dev, ifmgd->bssid); 1011 cfg80211_send_auth_timeout(sdata->dev, ifmgd->bssid,
1012 GFP_KERNEL);
1010 1013
1011 /* 1014 /*
1012 * Most likely AP is not in the range so remove the 1015 * Most likely AP is not in the range so remove the
@@ -1055,7 +1058,8 @@ static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata)
1055 sdata->dev->name, ifmgd->bssid); 1058 sdata->dev->name, ifmgd->bssid);
1056 ifmgd->state = IEEE80211_STA_MLME_DISABLED; 1059 ifmgd->state = IEEE80211_STA_MLME_DISABLED;
1057 ieee80211_recalc_idle(local); 1060 ieee80211_recalc_idle(local);
1058 cfg80211_send_auth_timeout(sdata->dev, ifmgd->bssid); 1061 cfg80211_send_auth_timeout(sdata->dev, ifmgd->bssid,
1062 GFP_KERNEL);
1059 ieee80211_rx_bss_remove(sdata, ifmgd->bssid, 1063 ieee80211_rx_bss_remove(sdata, ifmgd->bssid,
1060 sdata->local->hw.conf.channel->center_freq, 1064 sdata->local->hw.conf.channel->center_freq,
1061 ifmgd->ssid, ifmgd->ssid_len); 1065 ifmgd->ssid, ifmgd->ssid_len);
@@ -1243,7 +1247,8 @@ static void ieee80211_associate(struct ieee80211_sub_if_data *sdata)
1243 sdata->dev->name, ifmgd->bssid); 1247 sdata->dev->name, ifmgd->bssid);
1244 ifmgd->state = IEEE80211_STA_MLME_DISABLED; 1248 ifmgd->state = IEEE80211_STA_MLME_DISABLED;
1245 ieee80211_recalc_idle(local); 1249 ieee80211_recalc_idle(local);
1246 cfg80211_send_assoc_timeout(sdata->dev, ifmgd->bssid); 1250 cfg80211_send_assoc_timeout(sdata->dev, ifmgd->bssid,
1251 GFP_KERNEL);
1247 ieee80211_rx_bss_remove(sdata, ifmgd->bssid, 1252 ieee80211_rx_bss_remove(sdata, ifmgd->bssid,
1248 sdata->local->hw.conf.channel->center_freq, 1253 sdata->local->hw.conf.channel->center_freq,
1249 ifmgd->ssid, ifmgd->ssid_len); 1254 ifmgd->ssid, ifmgd->ssid_len);
@@ -1517,12 +1522,14 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
1517 case WLAN_AUTH_LEAP: 1522 case WLAN_AUTH_LEAP:
1518 case WLAN_AUTH_FT: 1523 case WLAN_AUTH_FT:
1519 ieee80211_auth_completed(sdata); 1524 ieee80211_auth_completed(sdata);
1520 cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len); 1525 cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len,
1526 GFP_KERNEL);
1521 break; 1527 break;
1522 case WLAN_AUTH_SHARED_KEY: 1528 case WLAN_AUTH_SHARED_KEY:
1523 if (ifmgd->auth_transaction == 4) { 1529 if (ifmgd->auth_transaction == 4) {
1524 ieee80211_auth_completed(sdata); 1530 ieee80211_auth_completed(sdata);
1525 cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len); 1531 cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len,
1532 GFP_KERNEL);
1526 } else 1533 } else
1527 ieee80211_auth_challenge(sdata, mgmt, len); 1534 ieee80211_auth_challenge(sdata, mgmt, len);
1528 break; 1535 break;
@@ -1560,7 +1567,7 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
1560 1567
1561 ieee80211_set_disassoc(sdata, true, false, 0); 1568 ieee80211_set_disassoc(sdata, true, false, 0);
1562 ifmgd->flags &= ~IEEE80211_STA_AUTHENTICATED; 1569 ifmgd->flags &= ~IEEE80211_STA_AUTHENTICATED;
1563 cfg80211_send_deauth(sdata->dev, (u8 *) mgmt, len); 1570 cfg80211_send_deauth(sdata->dev, (u8 *) mgmt, len, GFP_KERNEL);
1564} 1571}
1565 1572
1566 1573
@@ -1591,7 +1598,7 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
1591 } 1598 }
1592 1599
1593 ieee80211_set_disassoc(sdata, false, false, reason_code); 1600 ieee80211_set_disassoc(sdata, false, false, reason_code);
1594 cfg80211_send_disassoc(sdata->dev, (u8 *) mgmt, len); 1601 cfg80211_send_disassoc(sdata->dev, (u8 *) mgmt, len, GFP_KERNEL);
1595} 1602}
1596 1603
1597 1604
@@ -1660,7 +1667,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1660 * association next time. This works around some broken APs 1667 * association next time. This works around some broken APs
1661 * which do not correctly reject reassociation requests. */ 1668 * which do not correctly reject reassociation requests. */
1662 ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET; 1669 ifmgd->flags &= ~IEEE80211_STA_PREV_BSSID_SET;
1663 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len); 1670 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len,
1671 GFP_KERNEL);
1664 if (ifmgd->flags & IEEE80211_STA_EXT_SME) { 1672 if (ifmgd->flags & IEEE80211_STA_EXT_SME) {
1665 /* Wait for SME to decide what to do next */ 1673 /* Wait for SME to decide what to do next */
1666 ifmgd->state = IEEE80211_STA_MLME_DISABLED; 1674 ifmgd->state = IEEE80211_STA_MLME_DISABLED;
@@ -1823,7 +1831,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
1823 ifmgd->last_beacon = jiffies; 1831 ifmgd->last_beacon = jiffies;
1824 1832
1825 ieee80211_associated(sdata); 1833 ieee80211_associated(sdata);
1826 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len); 1834 cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len, GFP_KERNEL);
1827} 1835}
1828 1836
1829 1837
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 0563b6969a21..ec5acc6dc021 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1863,7 +1863,8 @@ static void ieee80211_rx_michael_mic_report(struct net_device *dev,
1863 !ieee80211_is_auth(hdr->frame_control)) 1863 !ieee80211_is_auth(hdr->frame_control))
1864 goto ignore; 1864 goto ignore;
1865 1865
1866 mac80211_ev_michael_mic_failure(rx->sdata, keyidx, hdr, NULL); 1866 mac80211_ev_michael_mic_failure(rx->sdata, keyidx, hdr, NULL,
1867 GFP_ATOMIC);
1867 ignore: 1868 ignore:
1868 dev_kfree_skb(rx->skb); 1869 dev_kfree_skb(rx->skb);
1869 rx->skb = NULL; 1870 rx->skb = NULL;
diff --git a/net/mac80211/wpa.c b/net/mac80211/wpa.c
index dcfae8884b86..70778694877b 100644
--- a/net/mac80211/wpa.c
+++ b/net/mac80211/wpa.c
@@ -122,7 +122,8 @@ ieee80211_rx_h_michael_mic_verify(struct ieee80211_rx_data *rx)
122 return RX_DROP_UNUSABLE; 122 return RX_DROP_UNUSABLE;
123 123
124 mac80211_ev_michael_mic_failure(rx->sdata, rx->key->conf.keyidx, 124 mac80211_ev_michael_mic_failure(rx->sdata, rx->key->conf.keyidx,
125 (void *) skb->data, NULL); 125 (void *) skb->data, NULL,
126 GFP_ATOMIC);
126 return RX_DROP_UNUSABLE; 127 return RX_DROP_UNUSABLE;
127 } 128 }
128 129
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index e56bbea10fc8..c4e6d4b84a46 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -12,35 +12,35 @@
12#include "core.h" 12#include "core.h"
13#include "nl80211.h" 13#include "nl80211.h"
14 14
15void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len) 15void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
16{ 16{
17 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 17 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
18 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 18 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
19 nl80211_send_rx_auth(rdev, dev, buf, len); 19 nl80211_send_rx_auth(rdev, dev, buf, len, gfp);
20} 20}
21EXPORT_SYMBOL(cfg80211_send_rx_auth); 21EXPORT_SYMBOL(cfg80211_send_rx_auth);
22 22
23void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len) 23void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
24{ 24{
25 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 25 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 26 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
27 nl80211_send_rx_assoc(rdev, dev, buf, len); 27 nl80211_send_rx_assoc(rdev, dev, buf, len, gfp);
28} 28}
29EXPORT_SYMBOL(cfg80211_send_rx_assoc); 29EXPORT_SYMBOL(cfg80211_send_rx_assoc);
30 30
31void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len) 31void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
32{ 32{
33 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 33 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
34 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 34 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
35 nl80211_send_deauth(rdev, dev, buf, len); 35 nl80211_send_deauth(rdev, dev, buf, len, gfp);
36} 36}
37EXPORT_SYMBOL(cfg80211_send_deauth); 37EXPORT_SYMBOL(cfg80211_send_deauth);
38 38
39void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len) 39void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp)
40{ 40{
41 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 41 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
42 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 42 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
43 nl80211_send_disassoc(rdev, dev, buf, len); 43 nl80211_send_disassoc(rdev, dev, buf, len, gfp);
44} 44}
45EXPORT_SYMBOL(cfg80211_send_disassoc); 45EXPORT_SYMBOL(cfg80211_send_disassoc);
46 46
@@ -53,33 +53,33 @@ static void cfg80211_wext_disconnected(struct net_device *dev)
53#endif 53#endif
54} 54}
55 55
56void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr) 56void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp)
57{ 57{
58 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 58 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
59 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 59 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
60 nl80211_send_auth_timeout(rdev, dev, addr); 60 nl80211_send_auth_timeout(rdev, dev, addr, gfp);
61 cfg80211_wext_disconnected(dev); 61 cfg80211_wext_disconnected(dev);
62} 62}
63EXPORT_SYMBOL(cfg80211_send_auth_timeout); 63EXPORT_SYMBOL(cfg80211_send_auth_timeout);
64 64
65void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr) 65void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp)
66{ 66{
67 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 67 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
68 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 68 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
69 nl80211_send_assoc_timeout(rdev, dev, addr); 69 nl80211_send_assoc_timeout(rdev, dev, addr, gfp);
70 cfg80211_wext_disconnected(dev); 70 cfg80211_wext_disconnected(dev);
71} 71}
72EXPORT_SYMBOL(cfg80211_send_assoc_timeout); 72EXPORT_SYMBOL(cfg80211_send_assoc_timeout);
73 73
74void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr, 74void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
75 enum nl80211_key_type key_type, int key_id, 75 enum nl80211_key_type key_type, int key_id,
76 const u8 *tsc) 76 const u8 *tsc, gfp_t gfp)
77{ 77{
78 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy; 78 struct wiphy *wiphy = dev->ieee80211_ptr->wiphy;
79 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy); 79 struct cfg80211_registered_device *rdev = wiphy_to_dev(wiphy);
80#ifdef CONFIG_WIRELESS_EXT 80#ifdef CONFIG_WIRELESS_EXT
81 union iwreq_data wrqu; 81 union iwreq_data wrqu;
82 char *buf = kmalloc(128, GFP_ATOMIC); 82 char *buf = kmalloc(128, gfp);
83 83
84 if (buf) { 84 if (buf) {
85 sprintf(buf, "MLME-MICHAELMICFAILURE.indication(" 85 sprintf(buf, "MLME-MICHAELMICFAILURE.indication("
@@ -93,6 +93,6 @@ void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
93 } 93 }
94#endif 94#endif
95 95
96 nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc); 96 nl80211_michael_mic_failure(rdev, dev, addr, key_type, key_id, tsc, gfp);
97} 97}
98EXPORT_SYMBOL(cfg80211_michael_mic_failure); 98EXPORT_SYMBOL(cfg80211_michael_mic_failure);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 7946b82c5716..01523ba81baf 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3832,12 +3832,12 @@ nla_put_failure:
3832static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev, 3832static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev,
3833 struct net_device *netdev, 3833 struct net_device *netdev,
3834 const u8 *buf, size_t len, 3834 const u8 *buf, size_t len,
3835 enum nl80211_commands cmd) 3835 enum nl80211_commands cmd, gfp_t gfp)
3836{ 3836{
3837 struct sk_buff *msg; 3837 struct sk_buff *msg;
3838 void *hdr; 3838 void *hdr;
3839 3839
3840 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); 3840 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
3841 if (!msg) 3841 if (!msg)
3842 return; 3842 return;
3843 3843
@@ -3856,7 +3856,7 @@ static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev,
3856 return; 3856 return;
3857 } 3857 }
3858 3858
3859 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, GFP_ATOMIC); 3859 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
3860 return; 3860 return;
3861 3861
3862 nla_put_failure: 3862 nla_put_failure:
@@ -3865,42 +3865,45 @@ static void nl80211_send_mlme_event(struct cfg80211_registered_device *rdev,
3865} 3865}
3866 3866
3867void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev, 3867void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev,
3868 struct net_device *netdev, const u8 *buf, size_t len) 3868 struct net_device *netdev, const u8 *buf,
3869 size_t len, gfp_t gfp)
3869{ 3870{
3870 nl80211_send_mlme_event(rdev, netdev, buf, len, 3871 nl80211_send_mlme_event(rdev, netdev, buf, len,
3871 NL80211_CMD_AUTHENTICATE); 3872 NL80211_CMD_AUTHENTICATE, gfp);
3872} 3873}
3873 3874
3874void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev, 3875void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
3875 struct net_device *netdev, const u8 *buf, 3876 struct net_device *netdev, const u8 *buf,
3876 size_t len) 3877 size_t len, gfp_t gfp)
3877{ 3878{
3878 nl80211_send_mlme_event(rdev, netdev, buf, len, NL80211_CMD_ASSOCIATE); 3879 nl80211_send_mlme_event(rdev, netdev, buf, len,
3880 NL80211_CMD_ASSOCIATE, gfp);
3879} 3881}
3880 3882
3881void nl80211_send_deauth(struct cfg80211_registered_device *rdev, 3883void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
3882 struct net_device *netdev, const u8 *buf, size_t len) 3884 struct net_device *netdev, const u8 *buf,
3885 size_t len, gfp_t gfp)
3883{ 3886{
3884 nl80211_send_mlme_event(rdev, netdev, buf, len, 3887 nl80211_send_mlme_event(rdev, netdev, buf, len,
3885 NL80211_CMD_DEAUTHENTICATE); 3888 NL80211_CMD_DEAUTHENTICATE, gfp);
3886} 3889}
3887 3890
3888void nl80211_send_disassoc(struct cfg80211_registered_device *rdev, 3891void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
3889 struct net_device *netdev, const u8 *buf, 3892 struct net_device *netdev, const u8 *buf,
3890 size_t len) 3893 size_t len, gfp_t gfp)
3891{ 3894{
3892 nl80211_send_mlme_event(rdev, netdev, buf, len, 3895 nl80211_send_mlme_event(rdev, netdev, buf, len,
3893 NL80211_CMD_DISASSOCIATE); 3896 NL80211_CMD_DISASSOCIATE, gfp);
3894} 3897}
3895 3898
3896static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev, 3899static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev,
3897 struct net_device *netdev, int cmd, 3900 struct net_device *netdev, int cmd,
3898 const u8 *addr) 3901 const u8 *addr, gfp_t gfp)
3899{ 3902{
3900 struct sk_buff *msg; 3903 struct sk_buff *msg;
3901 void *hdr; 3904 void *hdr;
3902 3905
3903 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); 3906 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
3904 if (!msg) 3907 if (!msg)
3905 return; 3908 return;
3906 3909
@@ -3920,7 +3923,7 @@ static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev,
3920 return; 3923 return;
3921 } 3924 }
3922 3925
3923 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, GFP_ATOMIC); 3926 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
3924 return; 3927 return;
3925 3928
3926 nla_put_failure: 3929 nla_put_failure:
@@ -3929,16 +3932,19 @@ static void nl80211_send_mlme_timeout(struct cfg80211_registered_device *rdev,
3929} 3932}
3930 3933
3931void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev, 3934void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev,
3932 struct net_device *netdev, const u8 *addr) 3935 struct net_device *netdev, const u8 *addr,
3936 gfp_t gfp)
3933{ 3937{
3934 nl80211_send_mlme_timeout(rdev, netdev, NL80211_CMD_AUTHENTICATE, 3938 nl80211_send_mlme_timeout(rdev, netdev, NL80211_CMD_AUTHENTICATE,
3935 addr); 3939 addr, gfp);
3936} 3940}
3937 3941
3938void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev, 3942void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
3939 struct net_device *netdev, const u8 *addr) 3943 struct net_device *netdev, const u8 *addr,
3944 gfp_t gfp)
3940{ 3945{
3941 nl80211_send_mlme_timeout(rdev, netdev, NL80211_CMD_ASSOCIATE, addr); 3946 nl80211_send_mlme_timeout(rdev, netdev, NL80211_CMD_ASSOCIATE,
3947 addr, gfp);
3942} 3948}
3943 3949
3944void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev, 3950void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
@@ -3978,12 +3984,12 @@ void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
3978void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev, 3984void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
3979 struct net_device *netdev, const u8 *addr, 3985 struct net_device *netdev, const u8 *addr,
3980 enum nl80211_key_type key_type, int key_id, 3986 enum nl80211_key_type key_type, int key_id,
3981 const u8 *tsc) 3987 const u8 *tsc, gfp_t gfp)
3982{ 3988{
3983 struct sk_buff *msg; 3989 struct sk_buff *msg;
3984 void *hdr; 3990 void *hdr;
3985 3991
3986 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC); 3992 msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
3987 if (!msg) 3993 if (!msg)
3988 return; 3994 return;
3989 3995
@@ -4007,7 +4013,7 @@ void nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
4007 return; 4013 return;
4008 } 4014 }
4009 4015
4010 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, GFP_ATOMIC); 4016 genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
4011 return; 4017 return;
4012 4018
4013 nla_put_failure: 4019 nla_put_failure:
diff --git a/net/wireless/nl80211.h b/net/wireless/nl80211.h
index cf0d271f7e1f..662c216e8d4f 100644
--- a/net/wireless/nl80211.h
+++ b/net/wireless/nl80211.h
@@ -15,27 +15,27 @@ void nl80211_send_scan_aborted(struct cfg80211_registered_device *rdev,
15void nl80211_send_reg_change_event(struct regulatory_request *request); 15void nl80211_send_reg_change_event(struct regulatory_request *request);
16void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev, 16void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev,
17 struct net_device *netdev, 17 struct net_device *netdev,
18 const u8 *buf, size_t len); 18 const u8 *buf, size_t len, gfp_t gfp);
19void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev, 19void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
20 struct net_device *netdev, 20 struct net_device *netdev,
21 const u8 *buf, size_t len); 21 const u8 *buf, size_t len, gfp_t gfp);
22void nl80211_send_deauth(struct cfg80211_registered_device *rdev, 22void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
23 struct net_device *netdev, 23 struct net_device *netdev,
24 const u8 *buf, size_t len); 24 const u8 *buf, size_t len, gfp_t gfp);
25void nl80211_send_disassoc(struct cfg80211_registered_device *rdev, 25void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
26 struct net_device *netdev, 26 struct net_device *netdev,
27 const u8 *buf, size_t len); 27 const u8 *buf, size_t len, gfp_t gfp);
28void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev, 28void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev,
29 struct net_device *netdev, 29 struct net_device *netdev,
30 const u8 *addr); 30 const u8 *addr, gfp_t gfp);
31void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev, 31void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
32 struct net_device *netdev, 32 struct net_device *netdev,
33 const u8 *addr); 33 const u8 *addr, gfp_t gfp);
34void 34void
35nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev, 35nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
36 struct net_device *netdev, const u8 *addr, 36 struct net_device *netdev, const u8 *addr,
37 enum nl80211_key_type key_type, 37 enum nl80211_key_type key_type,
38 int key_id, const u8 *tsc); 38 int key_id, const u8 *tsc, gfp_t gfp);
39 39
40void 40void
41nl80211_send_beacon_hint_event(struct wiphy *wiphy, 41nl80211_send_beacon_hint_event(struct wiphy *wiphy,