Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

cfg80211: use proper allocation flags

Instead of hardcoding GFP_ATOMIC everywhere, add a
new function parameter that gets the flags from the
caller. Obviously then I need to update all callers
(all of them in mac80211), and it turns out that now
it's ok to use GFP_KERNEL in almost all places.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Johannes Berg and committed by
John W. Linville
e6d6e342 dad82330

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