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>
This commit is contained in:

committed by
John W. Linville

parent
dad8233021
commit
e6d6e3420d
@@ -1572,64 +1572,70 @@ void cfg80211_unlink_bss(struct wiphy *wiphy, struct cfg80211_bss *bss);
|
||||
* @dev: network device
|
||||
* @buf: authentication frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function is called whenever an authentication has been processed in
|
||||
* station mode. The driver is required to call either this function or
|
||||
* cfg80211_send_auth_timeout() to indicate the result of cfg80211_ops::auth()
|
||||
* call.
|
||||
*/
|
||||
void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
|
||||
void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_send_auth_timeout - notification of timed out authentication
|
||||
* @dev: network device
|
||||
* @addr: The MAC address of the device with which the authentication timed out
|
||||
* @gfp: allocation flags
|
||||
*/
|
||||
void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
|
||||
void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_send_rx_assoc - notification of processed association
|
||||
* @dev: network device
|
||||
* @buf: (re)association response frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function is called whenever a (re)association response has been
|
||||
* processed in station mode. The driver is required to call either this
|
||||
* function or cfg80211_send_assoc_timeout() to indicate the result of
|
||||
* cfg80211_ops::assoc() call.
|
||||
*/
|
||||
void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len);
|
||||
void cfg80211_send_rx_assoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_send_assoc_timeout - notification of timed out association
|
||||
* @dev: network device
|
||||
* @addr: The MAC address of the device with which the association timed out
|
||||
* @gfp: allocation flags
|
||||
*/
|
||||
void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr);
|
||||
void cfg80211_send_assoc_timeout(struct net_device *dev, const u8 *addr, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_send_deauth - notification of processed deauthentication
|
||||
* @dev: network device
|
||||
* @buf: deauthentication frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function is called whenever deauthentication has been processed in
|
||||
* station mode. This includes both received deauthentication frames and
|
||||
* locally generated ones.
|
||||
*/
|
||||
void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len);
|
||||
void cfg80211_send_deauth(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_send_disassoc - notification of processed disassociation
|
||||
* @dev: network device
|
||||
* @buf: disassociation response frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function is called whenever disassociation has been processed in
|
||||
* station mode. This includes both received disassociation frames and locally
|
||||
* generated ones.
|
||||
*/
|
||||
void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len);
|
||||
void cfg80211_send_disassoc(struct net_device *dev, const u8 *buf, size_t len, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_hold_bss - exclude bss from expiration
|
||||
@@ -1655,6 +1661,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
|
||||
* @key_type: The key type that the received frame used
|
||||
* @key_id: Key identifier (0..3)
|
||||
* @tsc: The TSC value of the frame that generated the MIC failure (6 octets)
|
||||
* @gfp: allocation flags
|
||||
*
|
||||
* This function is called whenever the local MAC detects a MIC failure in a
|
||||
* received frame. This matches with MLME-MICHAELMICFAILURE.indication()
|
||||
@@ -1662,7 +1669,7 @@ void cfg80211_unhold_bss(struct cfg80211_bss *bss);
|
||||
*/
|
||||
void cfg80211_michael_mic_failure(struct net_device *dev, const u8 *addr,
|
||||
enum nl80211_key_type key_type, int key_id,
|
||||
const u8 *tsc);
|
||||
const u8 *tsc, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_ibss_joined - notify cfg80211 that device joined an IBSS
|
||||
|
Reference in New Issue
Block a user