mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-30 19:20:26 -04:00
nl80211: add ability to report TX status for control port TX
This adds the necessary capabilities in nl80211 to allow drivers to assign a cookie to control port TX frames (returned via extack in the netlink ACK message of the command) and then later report the frame's status. Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de> Link: https://lore.kernel.org/r/20200508144202.7678-2-markus.theil@tu-ilmenau.de [use extack cookie instead of explicit message, recombine patches] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
committed by
Johannes Berg
parent
3c23215ba8
commit
dca9ca2d58
@@ -4069,7 +4069,8 @@ struct cfg80211_ops {
|
||||
struct net_device *dev,
|
||||
const u8 *buf, size_t len,
|
||||
const u8 *dest, const __be16 proto,
|
||||
const bool noencrypt);
|
||||
const bool noencrypt,
|
||||
u64 *cookie);
|
||||
|
||||
int (*get_ftm_responder_stats)(struct wiphy *wiphy,
|
||||
struct net_device *dev,
|
||||
@@ -7049,6 +7050,23 @@ static inline bool cfg80211_rx_mgmt(struct wireless_dev *wdev, int freq,
|
||||
void cfg80211_mgmt_tx_status(struct wireless_dev *wdev, u64 cookie,
|
||||
const u8 *buf, size_t len, bool ack, gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_control_port_tx_status - notification of TX status for control
|
||||
* port frames
|
||||
* @wdev: wireless device receiving the frame
|
||||
* @cookie: Cookie returned by cfg80211_ops::tx_control_port()
|
||||
* @buf: Data frame (header + body)
|
||||
* @len: length of the frame data
|
||||
* @ack: Whether frame was acknowledged
|
||||
* @gfp: context flags
|
||||
*
|
||||
* This function is called whenever a control port frame was requested to be
|
||||
* transmitted with cfg80211_ops::tx_control_port() to report the TX status of
|
||||
* the transmission attempt.
|
||||
*/
|
||||
void cfg80211_control_port_tx_status(struct wireless_dev *wdev, u64 cookie,
|
||||
const u8 *buf, size_t len, bool ack,
|
||||
gfp_t gfp);
|
||||
|
||||
/**
|
||||
* cfg80211_rx_control_port - notification about a received control port frame
|
||||
|
||||
@@ -1164,6 +1164,12 @@
|
||||
* dropped because it did not include a valid MME MIC while beacon
|
||||
* protection was enabled (BIGTK configured in station mode).
|
||||
*
|
||||
* @NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS: Report TX status of a control
|
||||
* port frame transmitted with %NL80211_CMD_CONTROL_PORT_FRAME.
|
||||
* %NL80211_ATTR_COOKIE identifies the TX command and %NL80211_ATTR_FRAME
|
||||
* includes the contents of the frame. %NL80211_ATTR_ACK flag is included
|
||||
* if the recipient acknowledged the frame.
|
||||
*
|
||||
* @NL80211_CMD_MAX: highest used command number
|
||||
* @__NL80211_CMD_AFTER_LAST: internal use
|
||||
*/
|
||||
@@ -1392,6 +1398,8 @@ enum nl80211_commands {
|
||||
|
||||
NL80211_CMD_UNPROT_BEACON,
|
||||
|
||||
NL80211_CMD_CONTROL_PORT_FRAME_TX_STATUS,
|
||||
|
||||
/* add new commands above here */
|
||||
|
||||
/* used to define NL80211_CMD_MAX below */
|
||||
@@ -5729,6 +5737,9 @@ enum nl80211_feature_flags {
|
||||
* report %NL80211_ATTR_SCAN_FREQ_KHZ, %NL80211_SCAN_FLAG_FREQ_KHZ must be
|
||||
* included in the scan request.
|
||||
*
|
||||
* @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS: The driver
|
||||
* can report tx status for control port over nl80211 tx operations.
|
||||
*
|
||||
* @NUM_NL80211_EXT_FEATURES: number of extended features.
|
||||
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
|
||||
*/
|
||||
@@ -5783,6 +5794,7 @@ enum nl80211_ext_feature_index {
|
||||
NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS,
|
||||
NL80211_EXT_FEATURE_BEACON_PROTECTION_CLIENT,
|
||||
NL80211_EXT_FEATURE_SCAN_FREQ_KHZ,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211_TX_STATUS,
|
||||
|
||||
/* add new features before the definition below */
|
||||
NUM_NL80211_EXT_FEATURES,
|
||||
|
||||
Reference in New Issue
Block a user