| Seq | Timestamp | Type | Name | Duration |
|---|---|---|---|---|
| 0/0 | 2026/07/29 20:04 | flow | patch-triage |
0mArgs:null Results: {
"EnableConfigs": [
"CFG80211",
"MAC80211",
"MAC80211_HWSIM"
],
"FocusSymbols": [
"nl80211_remain_on_channel",
"nl80211_tx_mgmt",
"nl80211_probe_peer",
"nl80211_tx_control_port",
"ieee80211_remain_on_channel",
"ieee80211_mgmt_tx",
"ieee80211_tx_control_port"
],
"Reasoning": "The patch changes how cookies are assigned for various cfg80211 operations (remain-on-channel, mgmt_tx, probe_peer, tx_control_port), moving the assignment from individual drivers to the cfg80211 core. This is a functional change in the core 802.11 stack that can be reached via nl80211 netlink commands and tested using the mac80211_hwsim software-emulated radio driver.",
"WorthFuzzing": true
} |
| 1/1 | 2026/07/29 20:04 | action | read-patch-diff |
0mArgs:null Results: {
"PatchDiff": "commit 5ac606e88ae3e700ded33c06ce372d9749ccae77\nAuthor: syz-cluster \u003ctriage@syzkaller.com\u003e\nDate: Wed Jul 29 20:04:43 2026 +0000\n\n syz-cluster: applied patch under review\n\ndiff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c\nindex ecde91159b546..34025d64d6158 100644\n--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c\n+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c\n@@ -3034,20 +3034,14 @@ static int ath6kl_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t struct ieee80211_channel *chan,\n \t\t\t\t unsigned int duration,\n-\t\t\t\t u64 *cookie, const u8 *rx_addr)\n+\t\t\t\t u64 cookie, const u8 *rx_addr)\n {\n \tstruct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);\n \tstruct ath6kl *ar = ath6kl_priv(vif-\u003endev);\n-\tu32 id;\n \n \t/* TODO: if already pending or ongoing remain-on-channel,\n \t * return -EBUSY */\n-\tid = ++vif-\u003elast_roc_id;\n-\tif (id == 0) {\n-\t\t/* Do not use 0 as the cookie value */\n-\t\tid = ++vif-\u003elast_roc_id;\n-\t}\n-\t*cookie = id;\n+\tvif-\u003elast_roc_id = cookie;\n \n \treturn ath6kl_wmi_remain_on_chnl_cmd(ar-\u003ewmi, vif-\u003efw_vif_idx,\n \t\t\t\t\t chan-\u003ecenter_freq, duration);\n@@ -3106,6 +3100,7 @@ static int ath6kl_send_go_probe_resp(struct ath6kl_vif *vif,\n \n static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,\n \t\t\t\t u32 id,\n+\t\t\t\t u64 cookie,\n \t\t\t\t u32 freq,\n \t\t\t\t u32 wait,\n \t\t\t\t const u8 *buf,\n@@ -3138,6 +3133,7 @@ static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,\n \n \t\t\tINIT_LIST_HEAD(\u0026mgmt_buf-\u003elist);\n \t\t\tmgmt_buf-\u003eid = id;\n+\t\t\tmgmt_buf-\u003ecookie = cookie;\n \t\t\tmgmt_buf-\u003efreq = freq;\n \t\t\tmgmt_buf-\u003ewait = wait;\n \t\t\tmgmt_buf-\u003elen = len;\n@@ -3190,7 +3186,7 @@ static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)\n }\n \n static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tstruct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);\n \tstruct ath6kl *ar = ath6kl_priv(vif-\u003endev);\n@@ -3222,7 +3218,6 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t * Send Probe Response frame in GO mode using a separate WMI\n \t\t * command to allow the target to fill in the generic IEs.\n \t\t */\n-\t\t*cookie = 0; /* TX status not supported */\n \t\treturn ath6kl_send_go_probe_resp(vif, buf, len, freq);\n \t}\n \n@@ -3235,16 +3230,15 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\tid = vif-\u003esend_action_id++;\n \t}\n \n-\t*cookie = id;\n-\n \t/* AP mode Power saving processing */\n \tif (vif-\u003enw_type == AP_NETWORK) {\n-\t\tqueued = ath6kl_mgmt_powersave_ap(vif, id, freq, wait, buf, len,\n-\t\t\t\t\t\t \u0026more_data, no_cck);\n+\t\tqueued = ath6kl_mgmt_powersave_ap(vif, id, cookie, freq, wait,\n+\t\t\t\t\t\t buf, len, \u0026more_data, no_cck);\n \t\tif (queued)\n \t\t\treturn 0;\n \t}\n \n+\tar-\u003ewmi-\u003elast_mgmt_tx_cookie = cookie;\n \treturn ath6kl_wmi_send_mgmt_cmd(ar-\u003ewmi, vif-\u003efw_vif_idx, id, freq,\n \t\t\t\t\twait, buf, len, no_cck);\n }\ndiff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h\nindex 77e052336eb5b..a0b236eeeab54 100644\n--- a/drivers/net/wireless/ath/ath6kl/core.h\n+++ b/drivers/net/wireless/ath/ath6kl/core.h\n@@ -404,6 +404,7 @@ struct ath6kl_mgmt_buff {\n \tu32 freq;\n \tu32 wait;\n \tu32 id;\n+\tu64 cookie;\n \tbool no_cck;\n \tsize_t len;\n \tu8 buf[];\n@@ -631,8 +632,8 @@ struct ath6kl_vif {\n \tstruct cfg80211_scan_request *scan_req;\n \tenum sme_state sme_state;\n \tint reconnect_flag;\n-\tu32 last_roc_id;\n-\tu32 last_cancel_roc_id;\n+\tu64 last_roc_id;\n+\tu64 last_cancel_roc_id;\n \tu32 send_action_id;\n \tbool probe_req_report;\n \tu16 assoc_bss_beacon_int;\ndiff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c\nindex 8afc6589fc51e..9c023d7ce3059 100644\n--- a/drivers/net/wireless/ath/ath6kl/main.c\n+++ b/drivers/net/wireless/ath/ath6kl/main.c\n@@ -898,6 +898,7 @@ void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid)\n \t\tspin_unlock_bh(\u0026conn-\u003epsq_lock);\n \n \t\tconn-\u003esta_flags |= STA_PS_POLLED;\n+\t\tar-\u003ewmi-\u003elast_mgmt_tx_cookie = mgmt_buf-\u003ecookie;\n \t\tath6kl_wmi_send_mgmt_cmd(ar-\u003ewmi, vif-\u003efw_vif_idx,\n \t\t\t\t\t mgmt_buf-\u003eid, mgmt_buf-\u003efreq,\n \t\t\t\t\t mgmt_buf-\u003ewait, mgmt_buf-\u003ebuf,\ndiff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c\nindex 97fdac7237e26..b4d3c5cff8811 100644\n--- a/drivers/net/wireless/ath/ath6kl/txrx.c\n+++ b/drivers/net/wireless/ath/ath6kl/txrx.c\n@@ -1469,6 +1469,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)\n \t\t\t\t\tspin_unlock_bh(\u0026conn-\u003epsq_lock);\n \t\t\t\t\tidx = vif-\u003efw_vif_idx;\n \n+\t\t\t\t\tar-\u003ewmi-\u003elast_mgmt_tx_cookie = mgmt-\u003ecookie;\n \t\t\t\t\tath6kl_wmi_send_mgmt_cmd(ar-\u003ewmi,\n \t\t\t\t\t\t\t\t idx,\n \t\t\t\t\t\t\t\t mgmt-\u003eid,\ndiff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c\nindex c0c455d6e2dcc..888bbbb5d17a0 100644\n--- a/drivers/net/wireless/ath/ath6kl/wmi.c\n+++ b/drivers/net/wireless/ath/ath6kl/wmi.c\n@@ -584,7 +584,7 @@ static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len,\n \tath6kl_dbg(ATH6KL_DBG_WMI, \"tx_status: id=%x ack_status=%u\\n\",\n \t\t id, ev-\u003eack_status);\n \tif (wmi-\u003elast_mgmt_tx_frame) {\n-\t\tcfg80211_mgmt_tx_status(\u0026vif-\u003ewdev, id,\n+\t\tcfg80211_mgmt_tx_status(\u0026vif-\u003ewdev, wmi-\u003elast_mgmt_tx_cookie,\n \t\t\t\t\twmi-\u003elast_mgmt_tx_frame,\n \t\t\t\t\twmi-\u003elast_mgmt_tx_frame_len,\n \t\t\t\t\t!!ev-\u003eack_status, GFP_ATOMIC);\ndiff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h\nindex 8fbece3fdad9f..89ce2abbb1cdc 100644\n--- a/drivers/net/wireless/ath/ath6kl/wmi.h\n+++ b/drivers/net/wireless/ath/ath6kl/wmi.h\n@@ -125,6 +125,7 @@ struct wmi {\n \n \tu8 *last_mgmt_tx_frame;\n \tsize_t last_mgmt_tx_frame_len;\n+\tu64 last_mgmt_tx_cookie;\n \tu8 saved_pwr_mode;\n };\n \ndiff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c\nindex 5f2bd9a31faf6..9ac33d827f801 100644\n--- a/drivers/net/wireless/ath/wil6210/cfg80211.c\n+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c\n@@ -1432,7 +1432,7 @@ static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,\n \n int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t\t u64 *cookie)\n+\t\t\t u64 cookie)\n {\n \tconst u8 *buf = params-\u003ebuf;\n \tsize_t len = params-\u003elen;\n@@ -1488,8 +1488,7 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t */\n \ttx_status = (rc == 0);\n \trc = (rc == -EAGAIN) ? 0 : rc;\n-\tcfg80211_mgmt_tx_status(wdev, cookie ? *cookie : 0, buf, len,\n-\t\t\t\ttx_status, GFP_KERNEL);\n+\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, tx_status, GFP_KERNEL);\n \n \treturn rc;\n }\n@@ -1735,7 +1734,7 @@ static int wil_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t struct ieee80211_channel *chan,\n \t\t\t\t unsigned int duration,\n-\t\t\t\t u64 *cookie, const u8 *rx_addr)\n+\t\t\t\t u64 cookie, const u8 *rx_addr)\n {\n \tstruct wil6210_priv *wil = wiphy_to_wil(wiphy);\n \tint rc;\n@@ -2381,7 +2380,7 @@ void wil_probe_client_flush(struct wil6210_vif *vif)\n \n static int wil_cfg80211_probe_peer(struct wiphy *wiphy,\n \t\t\t\t struct net_device *dev,\n-\t\t\t\t const u8 *peer, u64 *cookie)\n+\t\t\t\t const u8 *peer, u64 cookie)\n {\n \tstruct wil6210_priv *wil = wiphy_to_wil(wiphy);\n \tstruct wil6210_vif *vif = ndev_to_vif(dev);\n@@ -2399,13 +2398,12 @@ static int wil_cfg80211_probe_peer(struct wiphy *wiphy,\n \t\treturn -ENOMEM;\n \n \treq-\u003ecid = cid;\n-\treq-\u003ecookie = cid;\n+\treq-\u003ecookie = cookie;\n \n \tmutex_lock(\u0026vif-\u003eprobe_client_mutex);\n \tlist_add_tail(\u0026req-\u003elist, \u0026vif-\u003eprobe_client_pending);\n \tmutex_unlock(\u0026vif-\u003eprobe_client_mutex);\n \n-\t*cookie = req-\u003ecookie;\n \tqueue_work(wil-\u003ewq_service, \u0026vif-\u003eprobe_client_worker);\n \treturn 0;\n }\ndiff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c\nindex b8cb736a71852..e06e45323272c 100644\n--- a/drivers/net/wireless/ath/wil6210/debugfs.c\n+++ b/drivers/net/wireless/ath/wil6210/debugfs.c\n@@ -985,7 +985,7 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf,\n \tparams.buf = frame;\n \tparams.len = len;\n \n-\trc = wil_cfg80211_mgmt_tx(wiphy, wdev, \u0026params, NULL);\n+\trc = wil_cfg80211_mgmt_tx(wiphy, wdev, \u0026params, 0);\n \n \tkfree(frame);\n \twil_info(wil, \"-\u003e %d\\n\", rc);\ndiff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c\nindex f20caf1a3905b..acd8a2e351032 100644\n--- a/drivers/net/wireless/ath/wil6210/p2p.c\n+++ b/drivers/net/wireless/ath/wil6210/p2p.c\n@@ -124,7 +124,7 @@ int wil_p2p_search(struct wil6210_vif *vif,\n \n int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,\n \t\t unsigned int duration, struct ieee80211_channel *chan,\n-\t\t u64 *cookie)\n+\t\t u64 cookie)\n {\n \tstruct wil6210_vif *vif = wdev_to_vif(wil, wdev);\n \tstruct wil_p2p_info *p2p = \u0026vif-\u003ep2p;\n@@ -144,7 +144,7 @@ int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,\n \t}\n \n \tmemcpy(\u0026p2p-\u003elisten_chan, chan, sizeof(*chan));\n-\t*cookie = ++p2p-\u003ecookie;\n+\tp2p-\u003ecookie = cookie;\n \tp2p-\u003elisten_duration = duration;\n \n \tmutex_lock(\u0026wil-\u003evif_mutex);\n@@ -166,7 +166,7 @@ int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,\n \tif (vif-\u003emid == 0)\n \t\twil-\u003eradio_wdev = wdev;\n \n-\tcfg80211_ready_on_channel(wdev, *cookie, chan, duration,\n+\tcfg80211_ready_on_channel(wdev, cookie, chan, duration,\n \t\t\t\t GFP_KERNEL);\n \n out:\ndiff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h\nindex 31e107c81e2d4..f8e60be631ca5 100644\n--- a/drivers/net/wireless/ath/wil6210/wil6210.h\n+++ b/drivers/net/wireless/ath/wil6210/wil6210.h\n@@ -1301,7 +1301,7 @@ int wil_p2p_search(struct wil6210_vif *vif,\n \t\t struct cfg80211_scan_request *request);\n int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,\n \t\t unsigned int duration, struct ieee80211_channel *chan,\n-\t\t u64 *cookie);\n+\t\t u64 cookie);\n u8 wil_p2p_stop_discovery(struct wil6210_vif *vif);\n int wil_p2p_cancel_listen(struct wil6210_vif *vif, u64 cookie);\n void wil_p2p_listen_expired(struct work_struct *work);\n@@ -1317,7 +1317,7 @@ int wmi_stop_discovery(struct wil6210_vif *vif);\n \n int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t\t u64 *cookie);\n+\t\t\t u64 cookie);\n void wil_cfg80211_ap_recovery(struct wil6210_priv *wil);\n int wil_cfg80211_iface_combinations_from_fw(\n \tstruct wil6210_priv *wil,\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c\nindex 20f7fccd61215..8093724e6d224 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c\n@@ -5554,7 +5554,7 @@ brcmf_cfg80211_update_mgmt_frame_registrations(struct wiphy *wiphy,\n \n int\n brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tstruct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);\n \tstruct ieee80211_channel *chan = params-\u003echan;\n@@ -5573,8 +5573,6 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \n \tbrcmf_dbg(TRACE, \"Enter\\n\");\n \n-\t*cookie = 0;\n-\n \tmgmt = (const struct ieee80211_mgmt *)buf;\n \n \tif (!ieee80211_is_mgmt(mgmt-\u003eframe_control)) {\n@@ -5605,7 +5603,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t\t\t BRCMF_VNDR_IE_PRBRSP_FLAG,\n \t\t\t\t\t \u0026buf[ie_offset],\n \t\t\t\t\t ie_len);\n-\t\tcfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,\n+\t\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,\n \t\t\t\t\tGFP_KERNEL);\n \t} else if (ieee80211_is_action(mgmt-\u003eframe_control)) {\n \t\tif (len \u003e BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {\n@@ -5621,7 +5619,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t}\n \t\taction_frame = \u0026af_params-\u003eaction_frame;\n \t\t/* Add the packet Id */\n-\t\taction_frame-\u003epacket_id = cpu_to_le32(*cookie);\n+\t\taction_frame-\u003epacket_id = cpu_to_le32(cookie);\n \t\t/* Add BSSID */\n \t\tmemcpy(\u0026action_frame-\u003eda[0], \u0026mgmt-\u003eda[0], ETH_ALEN);\n \t\tmemcpy(\u0026af_params-\u003ebssid[0], \u0026mgmt-\u003ebssid[0], ETH_ALEN);\n@@ -5649,12 +5647,12 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t le16_to_cpu(action_frame-\u003elen));\n \n \t\tbrcmf_dbg(TRACE, \"Action frame, cookie=%lld, len=%d, channel=%d\\n\",\n-\t\t\t *cookie, le16_to_cpu(action_frame-\u003elen),\n+\t\t\t cookie, le16_to_cpu(action_frame-\u003elen),\n \t\t\t le32_to_cpu(af_params-\u003echannel));\n \n \t\tack = brcmf_p2p_send_action_frame(vif-\u003eifp, af_params);\n \n-\t\tcfg80211_mgmt_tx_status(wdev, *cookie, buf, len, ack,\n+\t\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, ack,\n \t\t\t\t\tGFP_KERNEL);\n free:\n \t\tkfree(af_params);\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h\nindex 6ceb301429054..63e534523f518 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h\n@@ -497,6 +497,6 @@ void brcmf_cfg80211_free_vif(struct net_device *ndev);\n \n int brcmf_set_wsec(struct brcmf_if *ifp, const u8 *key, u16 key_len, u16 flags);\n int brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie);\n+\t\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie);\n \n #endif /* BRCMFMAC_CFG80211_H */\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c\nindex ce09d44fa73cf..49b33efe22b41 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c\n@@ -100,7 +100,7 @@ static int brcmf_cyw_activate_events(struct brcmf_if *ifp)\n \n static\n int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tstruct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);\n \tstruct ieee80211_channel *chan = params-\u003echan;\n@@ -123,7 +123,6 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \tif (!ieee80211_is_auth(mgmt-\u003eframe_control))\n \t\treturn brcmf_cfg80211_mgmt_tx(wiphy, wdev, params, cookie);\n \n-\t*cookie = 0;\n \tvif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);\n \n \treinit_completion(\u0026vif-\u003emgmt_tx);\n@@ -155,7 +154,7 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \n \tmemcpy(\u0026mf_params-\u003eda[0], \u0026mgmt-\u003eda[0], ETH_ALEN);\n \tmemcpy(\u0026mf_params-\u003ebssid[0], \u0026mgmt-\u003ebssid[0], ETH_ALEN);\n-\tmf_params-\u003epacket_id = cpu_to_le32(*cookie);\n+\tmf_params-\u003epacket_id = cpu_to_le32(cookie);\n \tmemcpy(mf_params-\u003edata, \u0026buf[DOT11_MGMT_HDR_LEN],\n \t le16_to_cpu(mf_params-\u003elen));\n \n@@ -187,8 +186,7 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t}\n \n tx_status:\n-\tcfg80211_mgmt_tx_status(wdev, *cookie, buf, len, ack,\n-\t\t\t\tGFP_KERNEL);\n+\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, ack, GFP_KERNEL);\n free:\n \tkfree(mf_params);\n \treturn err;\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c\nindex c7d7b35ab1253..32a015d6b7698 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c\n@@ -979,10 +979,8 @@ brcmf_p2p_discover_listen(struct brcmf_p2p_info *p2p, u16 channel, u32 duration)\n \tp2p-\u003ecfg-\u003ed11inf.encchspec(\u0026ch);\n \terr = brcmf_p2p_set_discover_state(vif-\u003eifp, WL_P2P_DISC_ST_LISTEN,\n \t\t\t\t\t ch.chspec, (u16)duration);\n-\tif (!err) {\n+\tif (!err)\n \t\tset_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, \u0026p2p-\u003estatus);\n-\t\tp2p-\u003eremain_on_channel_cookie++;\n-\t}\n exit:\n \treturn err;\n }\n@@ -1000,7 +998,7 @@ brcmf_p2p_discover_listen(struct brcmf_p2p_info *p2p, u16 channel, u32 duration)\n */\n int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t\tstruct ieee80211_channel *channel,\n-\t\t\t\tunsigned int duration, u64 *cookie,\n+\t\t\t\tunsigned int duration, u64 cookie,\n \t\t\t\tconst u8 *rx_addr)\n {\n \tstruct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);\n@@ -1020,8 +1018,8 @@ int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\tgoto exit;\n \n \tmemcpy(\u0026p2p-\u003eremain_on_channel, channel, sizeof(*channel));\n-\t*cookie = p2p-\u003eremain_on_channel_cookie;\n-\tcfg80211_ready_on_channel(wdev, *cookie, channel, duration, GFP_KERNEL);\n+\tp2p-\u003eremain_on_channel_cookie = cookie;\n+\tcfg80211_ready_on_channel(wdev, cookie, channel, duration, GFP_KERNEL);\n \n exit:\n \treturn err;\ndiff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h\nindex 9f3f01ade2b77..7078009491707 100644\n--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h\n+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h\n@@ -157,7 +157,7 @@ int brcmf_p2p_scan_prep(struct wiphy *wiphy,\n \t\t\tstruct brcmf_cfg80211_vif *vif);\n int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t\tstruct ieee80211_channel *channel,\n-\t\t\t\tunsigned int duration, u64 *cookie,\n+\t\t\t\tunsigned int duration, u64 cookie,\n \t\t\t\tconst u8 *rx_addr);\n int brcmf_p2p_notify_listen_complete(struct brcmf_if *ifp,\n \t\t\t\t const struct brcmf_event_msg *e,\ndiff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c\nindex 99d96088e364c..de9953ecbefd6 100644\n--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c\n+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c\n@@ -196,7 +196,7 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)\n */\n static int\n mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tconst u8 *buf = params-\u003ebuf;\n \tsize_t len = params-\u003elen;\n@@ -259,14 +259,13 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \ttx_info-\u003epkt_len = pkt_len;\n \n \tmwifiex_form_mgmt_frame(skb, buf, len);\n-\t*cookie = get_random_u32() | 1;\n \n \tif (ieee80211_is_action(mgmt-\u003eframe_control))\n \t\tskb = mwifiex_clone_skb_for_tx_status(priv,\n \t\t\t\t\t\t skb,\n-\t\t\t\tMWIFIEX_BUF_FLAG_ACTION_TX_STATUS, cookie);\n+\t\t\t\tMWIFIEX_BUF_FLAG_ACTION_TX_STATUS, \u0026cookie);\n \telse\n-\t\tcfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,\n+\t\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,\n \t\t\t\t\tGFP_ATOMIC);\n \n \tmwifiex_queue_tx_pkt(priv, skb);\n@@ -304,13 +303,13 @@ static int\n mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t struct ieee80211_channel *chan,\n-\t\t\t\t unsigned int duration, u64 *cookie,\n+\t\t\t\t unsigned int duration, u64 cookie,\n \t\t\t\t const u8 *rx_addr)\n {\n \tstruct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev-\u003enetdev);\n \tint ret;\n \n-\tif (!chan || !cookie) {\n+\tif (!chan) {\n \t\tmwifiex_dbg(priv-\u003eadapter, ERROR, \"Invalid parameter for ROC\\n\");\n \t\treturn -EINVAL;\n \t}\n@@ -326,15 +325,14 @@ mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t\t duration);\n \n \tif (!ret) {\n-\t\t*cookie = get_random_u32() | 1;\n-\t\tpriv-\u003eroc_cfg.cookie = *cookie;\n+\t\tpriv-\u003eroc_cfg.cookie = cookie;\n \t\tpriv-\u003eroc_cfg.chan = *chan;\n \n-\t\tcfg80211_ready_on_channel(wdev, *cookie, chan,\n+\t\tcfg80211_ready_on_channel(wdev, cookie, chan,\n \t\t\t\t\t duration, GFP_ATOMIC);\n \n \t\tmwifiex_dbg(priv-\u003eadapter, INFO,\n-\t\t\t \"info: ROC, cookie = 0x%llx\\n\", *cookie);\n+\t\t\t \"info: ROC, cookie = 0x%llx\\n\", cookie);\n \t}\n \n \treturn ret;\n@@ -4560,7 +4558,7 @@ mwifiex_cfg80211_disassociate(struct wiphy *wiphy,\n static int\n mwifiex_cfg80211_probe_peer(struct wiphy *wiphy,\n \t\t\t struct net_device *dev, const u8 *peer,\n-\t\t\t u64 *cookie)\n+\t\t\t u64 cookie)\n {\n \t/* hostapd looks for NL80211_CMD_PROBE_CLIENT support; otherwise,\n \t * it requires monitor-mode support (which mwifiex doesn't support).\ndiff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c\nindex 6654fce4ded84..bb2748a193294 100644\n--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c\n+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c\n@@ -1100,24 +1100,19 @@ static void wilc_wfi_remain_on_channel_expired(struct wilc_vif *vif, u64 cookie)\n static int remain_on_channel(struct wiphy *wiphy,\n \t\t\t struct wireless_dev *wdev,\n \t\t\t struct ieee80211_channel *chan,\n-\t\t\t unsigned int duration, u64 *cookie,\n+\t\t\t unsigned int duration, u64 cookie,\n \t\t\t const u8 *rx_addr)\n {\n \tint ret = 0;\n \tstruct wilc_vif *vif = netdev_priv(wdev-\u003enetdev);\n \tstruct wilc_priv *priv = \u0026vif-\u003epriv;\n-\tu64 id;\n \n \tif (wdev-\u003eiftype == NL80211_IFTYPE_AP) {\n \t\tnetdev_dbg(vif-\u003endev, \"Required while in AP mode\\n\");\n \t\treturn ret;\n \t}\n \n-\tid = ++priv-\u003einc_roc_cookie;\n-\tif (id == 0)\n-\t\tid = ++priv-\u003einc_roc_cookie;\n-\n-\tret = wilc_remain_on_channel(vif, id, chan-\u003ehw_value,\n+\tret = wilc_remain_on_channel(vif, cookie, chan-\u003ehw_value,\n \t\t\t\t wilc_wfi_remain_on_channel_expired);\n \tif (ret)\n \t\treturn ret;\n@@ -1125,12 +1120,11 @@ static int remain_on_channel(struct wiphy *wiphy,\n \tvif-\u003ewilc-\u003eop_ch = chan-\u003ehw_value;\n \n \tpriv-\u003eremain_on_ch_params.listen_ch = chan;\n-\tpriv-\u003eremain_on_ch_params.listen_cookie = id;\n-\t*cookie = id;\n+\tpriv-\u003eremain_on_ch_params.listen_cookie = cookie;\n \tpriv-\u003ep2p_listen_state = true;\n \tpriv-\u003eremain_on_ch_params.listen_duration = duration;\n \n-\tcfg80211_ready_on_channel(wdev, *cookie, chan, duration, GFP_KERNEL);\n+\tcfg80211_ready_on_channel(wdev, cookie, chan, duration, GFP_KERNEL);\n \tmod_timer(\u0026vif-\u003ehif_drv-\u003eremain_on_ch_timer,\n \t\t jiffies + msecs_to_jiffies(duration + 1000));\n \n@@ -1153,7 +1147,7 @@ static int cancel_remain_on_channel(struct wiphy *wiphy,\n static int mgmt_tx(struct wiphy *wiphy,\n \t\t struct wireless_dev *wdev,\n \t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t u64 *cookie)\n+\t\t u64 cookie)\n {\n \tstruct ieee80211_channel *chan = params-\u003echan;\n \tunsigned int wait = params-\u003ewait;\n@@ -1170,8 +1164,7 @@ static int mgmt_tx(struct wiphy *wiphy,\n \tconst u8 *vendor_ie;\n \tint ret = 0;\n \n-\t*cookie = get_random_u32();\n-\tpriv-\u003etx_cookie = *cookie;\n+\tpriv-\u003etx_cookie = cookie;\n \tmgmt = (const struct ieee80211_mgmt *)buf;\n \n \tif (!ieee80211_is_mgmt(mgmt-\u003eframe_control))\ndiff --git a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c\nindex 4f9e20f728114..c820f08d28355 100644\n--- a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c\n+++ b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c\n@@ -150,7 +150,7 @@ nxpwifi_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)\n /* cfg80211 operation handler to transmit a management frame. */\n static int\n nxpwifi_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tconst u8 *buf = params-\u003ebuf;\n \tsize_t len = params-\u003elen;\n@@ -212,14 +212,13 @@ nxpwifi_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \ttx_info-\u003epkt_len = pkt_len;\n \n \tnxpwifi_form_mgmt_frame(skb, buf, len);\n-\t*cookie = nxpwifi_roc_cookie(priv-\u003eadapter);\n \n \tif (ieee80211_is_action(mgmt-\u003eframe_control))\n \t\tskb = nxpwifi_clone_skb_for_tx_status(priv,\n \t\t\t\t\t\t skb,\n-\t\t\t\tNXPWIFI_BUF_FLAG_ACTION_TX_STATUS, cookie);\n+\t\t\t\tNXPWIFI_BUF_FLAG_ACTION_TX_STATUS, \u0026cookie);\n \telse\n-\t\tcfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,\n+\t\tcfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,\n \t\t\t\t\tGFP_ATOMIC);\n \n \tnxpwifi_queue_tx_pkt(priv, skb);\n@@ -254,14 +253,14 @@ static int\n nxpwifi_cfg80211_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t struct ieee80211_channel *chan,\n-\t\t\t\t unsigned int duration, u64 *cookie,\n+\t\t\t\t unsigned int duration, u64 cookie,\n \t\t\t\t const u8 *rx_addr)\n {\n \tstruct nxpwifi_private *priv = nxpwifi_netdev_get_priv(wdev-\u003enetdev);\n \tstruct nxpwifi_adapter *adapter = priv-\u003eadapter;\n \tint ret;\n \n-\tif (!chan || !cookie) {\n+\tif (!chan) {\n \t\tnxpwifi_dbg(adapter, ERROR, \"Invalid parameter for ROC\\n\");\n \t\treturn -EINVAL;\n \t}\n@@ -277,15 +276,14 @@ nxpwifi_cfg80211_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t\t duration);\n \n \tif (!ret) {\n-\t\t*cookie = nxpwifi_roc_cookie(adapter);\n-\t\tpriv-\u003eroc_cfg.cookie = *cookie;\n+\t\tpriv-\u003eroc_cfg.cookie = cookie;\n \t\tpriv-\u003eroc_cfg.chan = *chan;\n \n-\t\tcfg80211_ready_on_channel(wdev, *cookie, chan,\n+\t\tcfg80211_ready_on_channel(wdev, cookie, chan,\n \t\t\t\t\t duration, GFP_ATOMIC);\n \n \t\tnxpwifi_dbg(adapter, INFO,\n-\t\t\t \"info: ROC, cookie = 0x%llx\\n\", *cookie);\n+\t\t\t \"info: ROC, cookie = 0x%llx\\n\", cookie);\n \t}\n \n \treturn ret;\n@@ -3618,7 +3616,7 @@ nxpwifi_cfg80211_disassociate(struct wiphy *wiphy,\n static int\n nxpwifi_cfg80211_probe_peer(struct wiphy *wiphy,\n \t\t\t struct net_device *dev, const u8 *peer,\n-\t\t\t u64 *cookie)\n+\t\t\t u64 cookie)\n {\n \t/*\n \t * hostapd looks for NL80211_CMD_PROBE_CLIENT support; otherwise,\ndiff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c\nindex 9e44c85d2051c..45e2b7ae96333 100644\n--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c\n+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c\n@@ -446,7 +446,7 @@ qtnf_update_mgmt_frame_registrations(struct wiphy *wiphy,\n \n static int\n qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tstruct qtnf_vif *vif = qtnf_netdev_get_priv(wdev-\u003enetdev);\n \tconst struct ieee80211_mgmt *mgmt_frame = (void *)params-\u003ebuf;\n@@ -454,8 +454,6 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \tu16 flags = 0;\n \tu16 freq;\n \n-\t*cookie = short_cookie;\n-\n \tif (params-\u003eoffchan)\n \t\tflags |= QLINK_FRAME_TX_FLAG_OFFCHAN;\n \ndiff --git a/include/net/cfg80211.h b/include/net/cfg80211.h\nindex 15c08b24502fd..7b346226fe748 100644\n--- a/include/net/cfg80211.h\n+++ b/include/net/cfg80211.h\n@@ -5107,7 +5107,8 @@ struct mgmt_frame_regs {\n * @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup).\n *\n * @probe_peer: probe a connected peer (AP: STA MAC required; STA: no MAC),\n- *\tmust return a cookie that is later passed to cfg80211_probe_status().\n+ *\tmust use the @cookie as provided which is later passed to\n+ *\tcfg80211_probe_status().\n *\n * @set_noack_map: Set the NoAck Map for the TIDs.\n *\n@@ -5218,7 +5219,8 @@ struct mgmt_frame_regs {\n * user space\n *\n * @tx_control_port: TX a control port frame (EAPoL). The noencrypt parameter\n- *\ttells the driver that the frame should not be encrypted.\n+ *\ttells the driver that the frame should not be encrypted. A @cookie\n+ *\tvalue of 0 means the caller does not want TX status reporting.\n *\n * @get_ftm_responder_stats: Retrieve FTM responder statistics, if available.\n *\tStatistics should be cumulative, currently no way to reset is provided.\n@@ -5455,14 +5457,14 @@ struct cfg80211_ops {\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t struct ieee80211_channel *chan,\n \t\t\t\t unsigned int duration,\n-\t\t\t\t u64 *cookie, const u8 *rx_addr);\n+\t\t\t\t u64 cookie, const u8 *rx_addr);\n \tint\t(*cancel_remain_on_channel)(struct wiphy *wiphy,\n \t\t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t\t u64 cookie);\n \n \tint\t(*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t\t u64 *cookie);\n+\t\t\t u64 cookie);\n \tint\t(*mgmt_tx_cancel_wait)(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev,\n \t\t\t\t u64 cookie);\n@@ -5509,7 +5511,7 @@ struct cfg80211_ops {\n \t\t\t const u8 *peer, enum nl80211_tdls_operation oper);\n \n \tint\t(*probe_peer)(struct wiphy *wiphy, struct net_device *dev,\n-\t\t\t const u8 *peer, u64 *cookie);\n+\t\t\t const u8 *peer, u64 cookie);\n \n \tint\t(*set_noack_map)(struct wiphy *wiphy,\n \t\t\t\t struct net_device *dev,\n@@ -5607,7 +5609,7 @@ struct cfg80211_ops {\n \t\t\t\t const u8 *buf, size_t len,\n \t\t\t\t const u8 *dest, const __be16 proto,\n \t\t\t\t const bool noencrypt, int link_id,\n-\t\t\t\t u64 *cookie);\n+\t\t\t\t u64 cookie);\n \n \tint\t(*get_ftm_responder_stats)(struct wiphy *wiphy,\n \t\t\t\tstruct net_device *dev,\ndiff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c\nindex df68a5bdeb2f0..310c14560065d 100644\n--- a/net/mac80211/cfg.c\n+++ b/net/mac80211/cfg.c\n@@ -4827,19 +4827,6 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,\n \treturn __ieee80211_channel_switch(wiphy, dev, params);\n }\n \n-u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local)\n-{\n-\tlockdep_assert_wiphy(local-\u003ehw.wiphy);\n-\n-\tlocal-\u003eroc_cookie_counter++;\n-\n-\t/* wow, you wrapped 64 bits ... more likely a bug */\n-\tif (WARN_ON(local-\u003eroc_cookie_counter == 0))\n-\t\tlocal-\u003eroc_cookie_counter++;\n-\n-\treturn local-\u003eroc_cookie_counter;\n-}\n-\n int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,\n \t\t\t u64 *cookie, gfp_t gfp)\n {\n@@ -4864,7 +4851,6 @@ int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,\n \tIEEE80211_SKB_CB(skb)-\u003estatus_data_idr = 1;\n \tIEEE80211_SKB_CB(skb)-\u003estatus_data = id;\n \n-\t*cookie = ieee80211_mgmt_tx_cookie(local);\n \tIEEE80211_SKB_CB(ack_skb)-\u003eack.cookie = *cookie;\n \n \treturn 0;\n@@ -4950,7 +4936,7 @@ static int ieee80211_set_rekey_data(struct wiphy *wiphy,\n }\n \n static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,\n-\t\t\t\tconst u8 *peer, u64 *cookie)\n+\t\t\t\tconst u8 *peer, u64 cookie)\n {\n \tstruct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n@@ -5057,7 +5043,7 @@ static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,\n \tif (qos)\n \t\tnullfunc-\u003eqos_ctrl = cpu_to_le16(7);\n \n-\tret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_ATOMIC);\n+\tret = ieee80211_attach_ack_skb(local, skb, \u0026cookie, GFP_ATOMIC);\n \tif (ret) {\n \t\tkfree_skb(skb);\n \t\treturn ret;\ndiff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h\nindex 11f449e8ff003..4f1f52f6edcbb 100644\n--- a/net/mac80211/ieee80211_i.h\n+++ b/net/mac80211/ieee80211_i.h\n@@ -1708,8 +1708,6 @@ struct ieee80211_local {\n \tstruct list_head roc_list;\n \tstruct wiphy_work hw_roc_start, hw_roc_done;\n \tunsigned long hw_roc_start_time;\n-\tu64 roc_cookie_counter;\n-\n \tstruct idr ack_status_frames;\n \tspinlock_t ack_status_lock;\n \n@@ -1989,7 +1987,6 @@ u64 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);\n \n void ieee80211_handle_queued_frames(struct ieee80211_local *local);\n \n-u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local);\n int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,\n \t\t\t u64 *cookie, gfp_t gfp);\n \n@@ -2151,12 +2148,12 @@ void ieee80211_roc_purge(struct ieee80211_local *local,\n \t\t\t struct ieee80211_sub_if_data *sdata);\n int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t\tstruct ieee80211_channel *chan,\n-\t\t\t\tunsigned int duration, u64 *cookie,\n+\t\t\t\tunsigned int duration, u64 cookie,\n \t\t\t\tconst u8 *rx_addr);\n int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev, u64 cookie);\n int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie);\n+\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie);\n int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,\n \t\t\t\t struct wireless_dev *wdev, u64 cookie);\n \n@@ -2235,7 +2232,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,\n \t\t\t\t struct net_device *dev,\n \t\t\t\t u32 info_flags,\n \t\t\t\t u32 ctrl_flags,\n-\t\t\t\t u64 *cookie);\n+\t\t\t\t u64 cookie);\n struct sk_buff *\n ieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,\n \t\t\t struct sk_buff *skb, u32 info_flags);\n@@ -2249,7 +2246,7 @@ void ieee80211_clear_fast_xmit(struct sta_info *sta);\n int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,\n \t\t\t const u8 *buf, size_t len,\n \t\t\t const u8 *dest, __be16 proto, bool unencrypted,\n-\t\t\t int link_id, u64 *cookie);\n+\t\t\t int link_id, u64 cookie);\n int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,\n \t\t\t const u8 *buf, size_t len);\n void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,\ndiff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c\nindex 2bceb73717c66..7acef80d5f1fb 100644\n--- a/net/mac80211/offchannel.c\n+++ b/net/mac80211/offchannel.c\n@@ -602,14 +602,12 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,\n \n \t/*\n \t * cookie is either the roc cookie (for normal roc)\n-\t * or the SKB (for mgmt TX)\n+\t * or the mgmt_tx cookie; both are pre-assigned by cfg80211\n \t */\n-\tif (!txskb) {\n-\t\troc-\u003ecookie = ieee80211_mgmt_tx_cookie(local);\n-\t\t*cookie = roc-\u003ecookie;\n-\t} else {\n+\tif (!txskb)\n+\t\troc-\u003ecookie = *cookie;\n+\telse\n \t\troc-\u003emgmt_tx_cookie = *cookie;\n-\t}\n \n \treq = wiphy_dereference(local-\u003ehw.wiphy, local-\u003escan_req);\n \n@@ -704,7 +702,7 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,\n \n int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t\t\tstruct ieee80211_channel *chan,\n-\t\t\t\tunsigned int duration, u64 *cookie,\n+\t\t\t\tunsigned int duration, u64 cookie,\n \t\t\t\tconst u8 *rx_addr)\n {\n \tstruct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);\n@@ -713,7 +711,7 @@ int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,\n \tlockdep_assert_wiphy(local-\u003ehw.wiphy);\n \n \treturn ieee80211_start_roc_work(local, sdata, chan,\n-\t\t\t\t\tduration, cookie, NULL,\n+\t\t\t\t\tduration, \u0026cookie, NULL,\n \t\t\t\t\tIEEE80211_ROC_TYPE_NORMAL);\n }\n \n@@ -810,7 +808,7 @@ int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,\n }\n \n int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n-\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tstruct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n@@ -1016,18 +1014,11 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \t\t/* make a copy to preserve the frame contents\n \t\t * in case of encryption.\n \t\t */\n-\t\tret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_KERNEL);\n+\t\tret = ieee80211_attach_ack_skb(local, skb, \u0026cookie, GFP_KERNEL);\n \t\tif (ret) {\n \t\t\tkfree_skb(skb);\n \t\t\tgoto out_unlock;\n \t\t}\n-\t} else {\n-\t\t/* Assign a dummy non-zero cookie, it's not sent to\n-\t\t * userspace in this case but we rely on its value\n-\t\t * internally in the need_offchan case to distinguish\n-\t\t * mgmt-tx from remain-on-channel.\n-\t\t */\n-\t\t*cookie = 0xffffffff;\n \t}\n \n \tif (!need_offchan) {\n@@ -1044,7 +1035,7 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,\n \n \t/* This will handle all kinds of coalescing and immediate TX */\n \tret = ieee80211_start_roc_work(local, sdata, params-\u003echan,\n-\t\t\t\t params-\u003ewait, cookie, skb,\n+\t\t\t\t params-\u003ewait, \u0026cookie, skb,\n \t\t\t\t IEEE80211_ROC_TYPE_MGMT_TX);\n \tif (ret)\n \t\tieee80211_free_txskb(\u0026local-\u003ehw, skb);\ndiff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c\nindex ffd575a8d188f..dc2f662fe4c46 100644\n--- a/net/mac80211/tdls.c\n+++ b/net/mac80211/tdls.c\n@@ -1121,7 +1121,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,\n \t/* disable bottom halves when entering the Tx path */\n \tlocal_bh_disable();\n \t__ieee80211_subif_start_xmit(skb, dev, flags,\n-\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, NULL);\n+\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, 0);\n \tlocal_bh_enable();\n \n \treturn ret;\ndiff --git a/net/mac80211/tx.c b/net/mac80211/tx.c\nindex eb36f1b9771b5..5549cb8d5cda1 100644\n--- a/net/mac80211/tx.c\n+++ b/net/mac80211/tx.c\n@@ -2583,7 +2583,7 @@ int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,\n static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,\n \t\t\t\t struct sk_buff *skb,\n \t\t\t\t u32 *info_flags,\n-\t\t\t\t u64 *cookie)\n+\t\t\t\t u64 cookie)\n {\n \tstruct sk_buff *ack_skb;\n \tu16 info_id = 0;\n@@ -2605,10 +2605,8 @@ static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,\n \t\tif (id \u003e= 0) {\n \t\t\tinfo_id = id;\n \t\t\t*info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;\n-\t\t\tif (cookie) {\n-\t\t\t\t*cookie = ieee80211_mgmt_tx_cookie(local);\n-\t\t\t\tIEEE80211_SKB_CB(ack_skb)-\u003eack.cookie = *cookie;\n-\t\t\t}\n+\t\t\tif (cookie)\n+\t\t\t\tIEEE80211_SKB_CB(ack_skb)-\u003eack.cookie = cookie;\n \t\t} else {\n \t\t\tkfree_skb(ack_skb);\n \t\t}\n@@ -2641,7 +2639,7 @@ static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,\n static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,\n \t\t\t\t\t struct sk_buff *skb, u32 info_flags,\n \t\t\t\t\t struct sta_info *sta, u32 ctrl_flags,\n-\t\t\t\t\t u64 *cookie)\n+\t\t\t\t\t u64 cookie)\n {\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n \tstruct ieee80211_tx_info *info;\n@@ -4337,7 +4335,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,\n \t\t\t\t struct net_device *dev,\n \t\t\t\t u32 info_flags,\n \t\t\t\t u32 ctrl_flags,\n-\t\t\t\t u64 *cookie)\n+\t\t\t\t u64 cookie)\n {\n \tstruct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n@@ -4532,7 +4530,7 @@ static void ieee80211_mlo_multicast_tx_one(struct ieee80211_sub_if_data *sdata,\n \t\treturn;\n \n \tctrl_flags |= u32_encode_bits(link_id, IEEE80211_TX_CTRL_MLO_LINK);\n-\t__ieee80211_subif_start_xmit(out, sdata-\u003edev, 0, ctrl_flags, NULL);\n+\t__ieee80211_subif_start_xmit(out, sdata-\u003edev, 0, ctrl_flags, 0);\n }\n \n static void ieee80211_mlo_multicast_tx(struct net_device *dev,\n@@ -4547,8 +4545,7 @@ static void ieee80211_mlo_multicast_tx(struct net_device *dev,\n \t\tctrl_flags |= u32_encode_bits(__ffs(links),\n \t\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK);\n \n-\t\t__ieee80211_subif_start_xmit(skb, sdata-\u003edev, 0, ctrl_flags,\n-\t\t\t\t\t NULL);\n+\t\t__ieee80211_subif_start_xmit(skb, sdata-\u003edev, 0, ctrl_flags, 0);\n \t\treturn;\n \t}\n \n@@ -4590,7 +4587,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,\n \t\twhile ((skb = __skb_dequeue(\u0026queue)))\n \t\t\t__ieee80211_subif_start_xmit(skb, dev, 0,\n \t\t\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,\n-\t\t\t\t\t\t NULL);\n+\t\t\t\t\t\t 0);\n \t} else if (ieee80211_vif_is_mld(\u0026sdata-\u003evif) \u0026\u0026\n \t\t ((sdata-\u003evif.type == NL80211_IFTYPE_AP \u0026\u0026\n \t\t !ieee80211_hw_check(\u0026sdata-\u003elocal-\u003ehw, MLO_MCAST_MULTI_LINK_TX)) ||\n@@ -4601,7 +4598,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,\n normal:\n \t\t__ieee80211_subif_start_xmit(skb, dev, 0,\n \t\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,\n-\t\t\t\t\t NULL);\n+\t\t\t\t\t 0);\n \t}\n \n \treturn NETDEV_TX_OK;\n@@ -4700,7 +4697,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n \t\t\t/* fall back to non-offload slow path */\n \t\t\t__ieee80211_subif_start_xmit(skb, dev, 0,\n \t\t\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,\n-\t\t\t\t\t\t NULL);\n+\t\t\t\t\t\t 0);\n \t\t\treturn;\n \t\t}\n \n@@ -4736,7 +4733,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,\n \n \tif (unlikely(sk_requests_wifi_status(skb-\u003esk))) {\n \t\tinfo-\u003estatus_data = ieee80211_store_ack_skb(local, skb,\n-\t\t\t\t\t\t\t \u0026info-\u003eflags, NULL);\n+\t\t\t\t\t\t\t \u0026info-\u003eflags, 0);\n \t\tif (info-\u003estatus_data)\n \t\t\tinfo-\u003estatus_data_idr = 1;\n \t}\n@@ -4879,7 +4876,7 @@ ieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,\n \t}\n \n \tskb = ieee80211_build_hdr(sdata, skb, info_flags, sta,\n-\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, NULL);\n+\t\t\t\t IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, 0);\n \tif (IS_ERR(skb))\n \t\tgoto out;\n \n@@ -6494,7 +6491,7 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,\n int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,\n \t\t\t const u8 *buf, size_t len,\n \t\t\t const u8 *dest, __be16 proto, bool unencrypted,\n-\t\t\t int link_id, u64 *cookie)\n+\t\t\t int link_id, u64 cookie)\n {\n \tstruct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);\n \tstruct ieee80211_local *local = sdata-\u003elocal;\n@@ -6629,7 +6626,7 @@ int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,\n \tlocal_bh_disable();\n \t__ieee80211_subif_start_xmit(skb, skb-\u003edev, 0,\n \t\t\t\t IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP,\n-\t\t\t\t NULL);\n+\t\t\t\t 0);\n \tlocal_bh_enable();\n \n \treturn 0;\ndiff --git a/net/wireless/core.h b/net/wireless/core.h\nindex 399037514943d..b3ead98aee07a 100644\n--- a/net/wireless/core.h\n+++ b/net/wireless/core.h\n@@ -402,7 +402,7 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);\n int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,\n \t\t\t struct wireless_dev *wdev,\n \t\t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t\t u64 *cookie);\n+\t\t\t u64 cookie);\n void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,\n \t\t\t const struct ieee80211_ht_cap *ht_capa_mask);\n void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,\ndiff --git a/net/wireless/mlme.c b/net/wireless/mlme.c\nindex 2a2c173058bac..34f9003d5c541 100644\n--- a/net/wireless/mlme.c\n+++ b/net/wireless/mlme.c\n@@ -851,7 +851,7 @@ static bool cfg80211_allowed_random_address(struct wireless_dev *wdev,\n \n int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,\n \t\t\t struct wireless_dev *wdev,\n-\t\t\t struct cfg80211_mgmt_tx_params *params, u64 *cookie)\n+\t\t\t struct cfg80211_mgmt_tx_params *params, u64 cookie)\n {\n \tconst struct ieee80211_mgmt *mgmt;\n \tu16 stype;\ndiff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c\nindex ac0c0da452419..708e8bb8dafdd 100644\n--- a/net/wireless/nl80211.c\n+++ b/net/wireless/nl80211.c\n@@ -14630,8 +14630,9 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,\n \t\tgoto free_msg;\n \t}\n \n+\tcookie = cfg80211_assign_cookie(rdev);\n \terr = rdev_remain_on_channel(rdev, wdev, chandef.chan,\n-\t\t\t\t duration, \u0026cookie, rx_addr);\n+\t\t\t\t duration, cookie, rx_addr);\n \n \tif (err)\n \t\tgoto free_msg;\n@@ -14871,7 +14872,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)\n \t}\n \n \tparams.chan = chandef.chan;\n-\terr = cfg80211_mlme_mgmt_tx(rdev, wdev, \u0026params, \u0026cookie);\n+\tcookie = cfg80211_assign_cookie(rdev);\n+\terr = cfg80211_mlme_mgmt_tx(rdev, wdev, \u0026params, cookie);\n \tif (err)\n \t\tgoto free_msg;\n \n@@ -16359,7 +16361,8 @@ static int nl80211_probe_peer(struct sk_buff *skb, struct genl_info *info)\n \t\tgoto free_msg;\n \t}\n \n-\terr = rdev_probe_peer(rdev, dev, addr, \u0026cookie);\n+\tcookie = cfg80211_assign_cookie(rdev);\n+\terr = rdev_probe_peer(rdev, dev, addr, cookie);\n \tif (err)\n \t\tgoto free_msg;\n \n@@ -18574,10 +18577,11 @@ static int nl80211_tx_control_port(struct sk_buff *skb, struct genl_info *info)\n \n \tlink_id = nl80211_link_id_or_invalid(info-\u003eattrs);\n \n+\tcookie = dont_wait_for_ack ? 0 : cfg80211_assign_cookie(rdev);\n \terr = rdev_tx_control_port(rdev, dev, buf, len,\n \t\t\t\t dest, cpu_to_be16(proto), noencrypt, link_id,\n-\t\t\t\t dont_wait_for_ack ? NULL : \u0026cookie);\n-\tif (!err \u0026\u0026 !dont_wait_for_ack)\n+\t\t\t\t cookie);\n+\tif (!err \u0026\u0026 cookie)\n \t\tnl_set_extack_cookie_u64(info-\u003eextack, cookie);\n \treturn err;\n }\n@@ -22030,6 +22034,10 @@ static void nl80211_frame_tx_status(struct wireless_dev *wdev,\n \tstruct sk_buff *msg;\n \tvoid *hdr;\n \n+\t/* userspace not interested in zero-cookie status */\n+\tif (!status-\u003ecookie)\n+\t\treturn;\n+\n \tif (command == NL80211_CMD_FRAME_TX_STATUS)\n \t\ttrace_cfg80211_mgmt_tx_status(wdev, status-\u003ecookie,\n \t\t\t\t\t status-\u003eack);\ndiff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h\nindex 6c3bad8b2d6f6..46849fe8d0b39 100644\n--- a/net/wireless/rdev-ops.h\n+++ b/net/wireless/rdev-ops.h\n@@ -736,14 +736,14 @@ static inline int\n rdev_remain_on_channel(struct cfg80211_registered_device *rdev,\n \t\t struct wireless_dev *wdev,\n \t\t struct ieee80211_channel *chan,\n-\t\t unsigned int duration, u64 *cookie, const u8 *rx_addr)\n+\t\t unsigned int duration, u64 cookie, const u8 *rx_addr)\n {\n \tint ret;\n \ttrace_rdev_remain_on_channel(\u0026rdev-\u003ewiphy, wdev, chan, duration,\n \t\t\t\t rx_addr);\n \tret = rdev-\u003eops-\u003eremain_on_channel(\u0026rdev-\u003ewiphy, wdev, chan,\n \t\t\t\t\t duration, cookie, rx_addr);\n-\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, *cookie);\n+\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, cookie);\n \treturn ret;\n }\n \n@@ -761,12 +761,12 @@ rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,\n static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,\n \t\t\t struct wireless_dev *wdev,\n \t\t\t struct cfg80211_mgmt_tx_params *params,\n-\t\t\t u64 *cookie)\n+\t\t\t u64 cookie)\n {\n \tint ret;\n \ttrace_rdev_mgmt_tx(\u0026rdev-\u003ewiphy, wdev, params);\n \tret = rdev-\u003eops-\u003emgmt_tx(\u0026rdev-\u003ewiphy, wdev, params, cookie);\n-\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, *cookie);\n+\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, cookie);\n \treturn ret;\n }\n \n@@ -775,7 +775,7 @@ static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,\n \t\t\t\t const void *buf, size_t len,\n \t\t\t\t const u8 *dest, __be16 proto,\n \t\t\t\t const bool noencrypt, int link,\n-\t\t\t\t u64 *cookie)\n+\t\t\t\t u64 cookie)\n {\n \tint ret;\n \ttrace_rdev_tx_control_port(\u0026rdev-\u003ewiphy, dev, buf, len,\n@@ -783,7 +783,7 @@ static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,\n \tret = rdev-\u003eops-\u003etx_control_port(\u0026rdev-\u003ewiphy, dev, buf, len,\n \t\t\t\t\t dest, proto, noencrypt, link, cookie);\n \tif (cookie)\n-\t\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, *cookie);\n+\t\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, cookie);\n \telse\n \t\ttrace_rdev_return_int(\u0026rdev-\u003ewiphy, ret);\n \treturn ret;\n@@ -950,12 +950,12 @@ static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev,\n \n static inline int rdev_probe_peer(struct cfg80211_registered_device *rdev,\n \t\t\t\t struct net_device *dev, const u8 *peer,\n-\t\t\t\t u64 *cookie)\n+\t\t\t\t u64 cookie)\n {\n \tint ret;\n \ttrace_rdev_probe_peer(\u0026rdev-\u003ewiphy, dev, peer);\n \tret = rdev-\u003eops-\u003eprobe_peer(\u0026rdev-\u003ewiphy, dev, peer, cookie);\n-\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, *cookie);\n+\ttrace_rdev_return_int_cookie(\u0026rdev-\u003ewiphy, ret, cookie);\n \treturn ret;\n }\n \n"
} |
| 2/1 | 2026/07/29 20:04 | agent | patch-evaluator |
0mModel:best-expensive Args: null Results: {
"EnableConfigs": [
"CFG80211",
"MAC80211",
"MAC80211_HWSIM"
],
"FocusSymbols": [
"nl80211_remain_on_channel",
"nl80211_tx_mgmt",
"nl80211_probe_peer",
"nl80211_tx_control_port",
"ieee80211_remain_on_channel",
"ieee80211_mgmt_tx",
"ieee80211_tx_control_port"
],
"Reasoning": "The patch changes how cookies are assigned for various cfg80211 operations (remain-on-channel, mgmt_tx, probe_peer, tx_control_port), moving the assignment from individual drivers to the cfg80211 core. This is a functional change in the core 802.11 stack that can be reached via nl80211 netlink commands and tested using the mac80211_hwsim software-emulated radio driver.",
"WorthFuzzing": true
}Instruction: You are an expert Linux kernel maintainer. Your job is to review a provided patch series and determine if it makes functional changes to the kernel that should be fuzzed. IMPORTANT: The changes have ALREADY been applied and committed as the HEAD commit in your workspace. Do NOT rely on your internal knowledge of the kernel. You must actively use your code access tools to examine the actual source code and confirm any assumptions. Return WorthFuzzing=false if the patch only contains: - Modifications to Documentation/, Kconfig files, or code comments. - Purely decorative changes, such as logging (e.g., pr_err, printk) or tracepoints. - Changes to numeric constants or macros that do not functionally alter execution flow. - Code paths that are impossible to reach in virtualized environments like GCE or QEMU, even when utilizing software-emulated hardware (e.g., usb gadget, mac80211_hwsim). - Code in vendor-specific PCIe switch, SmartNIC, or GPU drivers (e.g., mlxsw, pds_core, qed, ionic, amdgpu) that require physical PCIe hardware cards not emulated in standard QEMU. - Driver .remove, .shutdown, or pci_unregister_driver teardown callbacks (e.g., igb_remove) that are executed only during PCI hot-unplug or sysfs driver unbind operations. If it modifies reachable core kernel logic, drivers, or architectures, use your code search tools to verify the code can be executed, then return WorthFuzzing=true. When returning WorthFuzzing=true, you MUST ALSO: 1. Extract any specific kernel functions that should be heavily fuzzed into FocusSymbols. Avoid listing generic hot-path functions to prevent skewed test distributions. Prefer non-static, non-inlined API entrypoint functions over internal static helper functions (which are inlined by the compiler and do not have distinct symbol addresses). 2. Identify any specific CONFIG_ options required to properly test this new/modified feature. Go and look into the Kconfig files and check for ifdefs around the code, do not make assumptions. Also check "depends on" lines in Kconfig to include any non-standard parent subsystem configs needed for Kbuild to compile the code statically into vmlinux. List them in the EnableConfigs output array, and DO NOT add a 'CONFIG_' prefix (e.g., return "NET_IPV4" instead of "CONFIG_NET_IPV4"). Prefer calling several tools at the same time to save round-trips. Use set-results tool to provide results of the analysis. It must be called exactly once before the final reply. Ignore results of this tool. Prompt: For your convenience, here is the diff of the changes:
commit 5ac606e88ae3e700ded33c06ce372d9749ccae77
Author: syz-cluster <triage@syzkaller.com>
Date: Wed Jul 29 20:04:43 2026 +0000
syz-cluster: applied patch under review
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index ecde91159b546..34025d64d6158 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3034,20 +3034,14 @@ static int ath6kl_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
- u64 *cookie, const u8 *rx_addr)
+ u64 cookie, const u8 *rx_addr)
{
struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
struct ath6kl *ar = ath6kl_priv(vif->ndev);
- u32 id;
/* TODO: if already pending or ongoing remain-on-channel,
* return -EBUSY */
- id = ++vif->last_roc_id;
- if (id == 0) {
- /* Do not use 0 as the cookie value */
- id = ++vif->last_roc_id;
- }
- *cookie = id;
+ vif->last_roc_id = cookie;
return ath6kl_wmi_remain_on_chnl_cmd(ar->wmi, vif->fw_vif_idx,
chan->center_freq, duration);
@@ -3106,6 +3100,7 @@ static int ath6kl_send_go_probe_resp(struct ath6kl_vif *vif,
static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,
u32 id,
+ u64 cookie,
u32 freq,
u32 wait,
const u8 *buf,
@@ -3138,6 +3133,7 @@ static bool ath6kl_mgmt_powersave_ap(struct ath6kl_vif *vif,
INIT_LIST_HEAD(&mgmt_buf->list);
mgmt_buf->id = id;
+ mgmt_buf->cookie = cookie;
mgmt_buf->freq = freq;
mgmt_buf->wait = wait;
mgmt_buf->len = len;
@@ -3190,7 +3186,7 @@ static bool ath6kl_is_p2p_go_ssid(const u8 *buf, size_t len)
}
static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
struct ath6kl *ar = ath6kl_priv(vif->ndev);
@@ -3222,7 +3218,6 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
* Send Probe Response frame in GO mode using a separate WMI
* command to allow the target to fill in the generic IEs.
*/
- *cookie = 0; /* TX status not supported */
return ath6kl_send_go_probe_resp(vif, buf, len, freq);
}
@@ -3235,16 +3230,15 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
id = vif->send_action_id++;
}
- *cookie = id;
-
/* AP mode Power saving processing */
if (vif->nw_type == AP_NETWORK) {
- queued = ath6kl_mgmt_powersave_ap(vif, id, freq, wait, buf, len,
- &more_data, no_cck);
+ queued = ath6kl_mgmt_powersave_ap(vif, id, cookie, freq, wait,
+ buf, len, &more_data, no_cck);
if (queued)
return 0;
}
+ ar->wmi->last_mgmt_tx_cookie = cookie;
return ath6kl_wmi_send_mgmt_cmd(ar->wmi, vif->fw_vif_idx, id, freq,
wait, buf, len, no_cck);
}
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 77e052336eb5b..a0b236eeeab54 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -404,6 +404,7 @@ struct ath6kl_mgmt_buff {
u32 freq;
u32 wait;
u32 id;
+ u64 cookie;
bool no_cck;
size_t len;
u8 buf[];
@@ -631,8 +632,8 @@ struct ath6kl_vif {
struct cfg80211_scan_request *scan_req;
enum sme_state sme_state;
int reconnect_flag;
- u32 last_roc_id;
- u32 last_cancel_roc_id;
+ u64 last_roc_id;
+ u64 last_cancel_roc_id;
u32 send_action_id;
bool probe_req_report;
u16 assoc_bss_beacon_int;
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 8afc6589fc51e..9c023d7ce3059 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -898,6 +898,7 @@ void ath6kl_pspoll_event(struct ath6kl_vif *vif, u8 aid)
spin_unlock_bh(&conn->psq_lock);
conn->sta_flags |= STA_PS_POLLED;
+ ar->wmi->last_mgmt_tx_cookie = mgmt_buf->cookie;
ath6kl_wmi_send_mgmt_cmd(ar->wmi, vif->fw_vif_idx,
mgmt_buf->id, mgmt_buf->freq,
mgmt_buf->wait, mgmt_buf->buf,
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 97fdac7237e26..b4d3c5cff8811 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1469,6 +1469,7 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
spin_unlock_bh(&conn->psq_lock);
idx = vif->fw_vif_idx;
+ ar->wmi->last_mgmt_tx_cookie = mgmt->cookie;
ath6kl_wmi_send_mgmt_cmd(ar->wmi,
idx,
mgmt->id,
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.c b/drivers/net/wireless/ath/ath6kl/wmi.c
index c0c455d6e2dcc..888bbbb5d17a0 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.c
+++ b/drivers/net/wireless/ath/ath6kl/wmi.c
@@ -584,7 +584,7 @@ static int ath6kl_wmi_tx_status_event_rx(struct wmi *wmi, u8 *datap, int len,
ath6kl_dbg(ATH6KL_DBG_WMI, "tx_status: id=%x ack_status=%u\n",
id, ev->ack_status);
if (wmi->last_mgmt_tx_frame) {
- cfg80211_mgmt_tx_status(&vif->wdev, id,
+ cfg80211_mgmt_tx_status(&vif->wdev, wmi->last_mgmt_tx_cookie,
wmi->last_mgmt_tx_frame,
wmi->last_mgmt_tx_frame_len,
!!ev->ack_status, GFP_ATOMIC);
diff --git a/drivers/net/wireless/ath/ath6kl/wmi.h b/drivers/net/wireless/ath/ath6kl/wmi.h
index 8fbece3fdad9f..89ce2abbb1cdc 100644
--- a/drivers/net/wireless/ath/ath6kl/wmi.h
+++ b/drivers/net/wireless/ath/ath6kl/wmi.h
@@ -125,6 +125,7 @@ struct wmi {
u8 *last_mgmt_tx_frame;
size_t last_mgmt_tx_frame_len;
+ u64 last_mgmt_tx_cookie;
u8 saved_pwr_mode;
};
diff --git a/drivers/net/wireless/ath/wil6210/cfg80211.c b/drivers/net/wireless/ath/wil6210/cfg80211.c
index 5f2bd9a31faf6..9ac33d827f801 100644
--- a/drivers/net/wireless/ath/wil6210/cfg80211.c
+++ b/drivers/net/wireless/ath/wil6210/cfg80211.c
@@ -1432,7 +1432,7 @@ static int wil_cfg80211_set_wiphy_params(struct wiphy *wiphy, int radio_idx,
int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie)
+ u64 cookie)
{
const u8 *buf = params->buf;
size_t len = params->len;
@@ -1488,8 +1488,7 @@ int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
*/
tx_status = (rc == 0);
rc = (rc == -EAGAIN) ? 0 : rc;
- cfg80211_mgmt_tx_status(wdev, cookie ? *cookie : 0, buf, len,
- tx_status, GFP_KERNEL);
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, tx_status, GFP_KERNEL);
return rc;
}
@@ -1735,7 +1734,7 @@ static int wil_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
- u64 *cookie, const u8 *rx_addr)
+ u64 cookie, const u8 *rx_addr)
{
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
int rc;
@@ -2381,7 +2380,7 @@ void wil_probe_client_flush(struct wil6210_vif *vif)
static int wil_cfg80211_probe_peer(struct wiphy *wiphy,
struct net_device *dev,
- const u8 *peer, u64 *cookie)
+ const u8 *peer, u64 cookie)
{
struct wil6210_priv *wil = wiphy_to_wil(wiphy);
struct wil6210_vif *vif = ndev_to_vif(dev);
@@ -2399,13 +2398,12 @@ static int wil_cfg80211_probe_peer(struct wiphy *wiphy,
return -ENOMEM;
req->cid = cid;
- req->cookie = cid;
+ req->cookie = cookie;
mutex_lock(&vif->probe_client_mutex);
list_add_tail(&req->list, &vif->probe_client_pending);
mutex_unlock(&vif->probe_client_mutex);
- *cookie = req->cookie;
queue_work(wil->wq_service, &vif->probe_client_worker);
return 0;
}
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index b8cb736a71852..e06e45323272c 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -985,7 +985,7 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf,
params.buf = frame;
params.len = len;
- rc = wil_cfg80211_mgmt_tx(wiphy, wdev, ¶ms, NULL);
+ rc = wil_cfg80211_mgmt_tx(wiphy, wdev, ¶ms, 0);
kfree(frame);
wil_info(wil, "-> %d\n", rc);
diff --git a/drivers/net/wireless/ath/wil6210/p2p.c b/drivers/net/wireless/ath/wil6210/p2p.c
index f20caf1a3905b..acd8a2e351032 100644
--- a/drivers/net/wireless/ath/wil6210/p2p.c
+++ b/drivers/net/wireless/ath/wil6210/p2p.c
@@ -124,7 +124,7 @@ int wil_p2p_search(struct wil6210_vif *vif,
int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,
unsigned int duration, struct ieee80211_channel *chan,
- u64 *cookie)
+ u64 cookie)
{
struct wil6210_vif *vif = wdev_to_vif(wil, wdev);
struct wil_p2p_info *p2p = &vif->p2p;
@@ -144,7 +144,7 @@ int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,
}
memcpy(&p2p->listen_chan, chan, sizeof(*chan));
- *cookie = ++p2p->cookie;
+ p2p->cookie = cookie;
p2p->listen_duration = duration;
mutex_lock(&wil->vif_mutex);
@@ -166,7 +166,7 @@ int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,
if (vif->mid == 0)
wil->radio_wdev = wdev;
- cfg80211_ready_on_channel(wdev, *cookie, chan, duration,
+ cfg80211_ready_on_channel(wdev, cookie, chan, duration,
GFP_KERNEL);
out:
diff --git a/drivers/net/wireless/ath/wil6210/wil6210.h b/drivers/net/wireless/ath/wil6210/wil6210.h
index 31e107c81e2d4..f8e60be631ca5 100644
--- a/drivers/net/wireless/ath/wil6210/wil6210.h
+++ b/drivers/net/wireless/ath/wil6210/wil6210.h
@@ -1301,7 +1301,7 @@ int wil_p2p_search(struct wil6210_vif *vif,
struct cfg80211_scan_request *request);
int wil_p2p_listen(struct wil6210_priv *wil, struct wireless_dev *wdev,
unsigned int duration, struct ieee80211_channel *chan,
- u64 *cookie);
+ u64 cookie);
u8 wil_p2p_stop_discovery(struct wil6210_vif *vif);
int wil_p2p_cancel_listen(struct wil6210_vif *vif, u64 cookie);
void wil_p2p_listen_expired(struct work_struct *work);
@@ -1317,7 +1317,7 @@ int wmi_stop_discovery(struct wil6210_vif *vif);
int wil_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie);
+ u64 cookie);
void wil_cfg80211_ap_recovery(struct wil6210_priv *wil);
int wil_cfg80211_iface_combinations_from_fw(
struct wil6210_priv *wil,
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 20f7fccd61215..8093724e6d224 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -5554,7 +5554,7 @@ brcmf_cfg80211_update_mgmt_frame_registrations(struct wiphy *wiphy,
int
brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
@@ -5573,8 +5573,6 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
brcmf_dbg(TRACE, "Enter\n");
- *cookie = 0;
-
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control)) {
@@ -5605,7 +5603,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
BRCMF_VNDR_IE_PRBRSP_FLAG,
&buf[ie_offset],
ie_len);
- cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,
GFP_KERNEL);
} else if (ieee80211_is_action(mgmt->frame_control)) {
if (len > BRCMF_FIL_ACTION_FRAME_SIZE + DOT11_MGMT_HDR_LEN) {
@@ -5621,7 +5619,7 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
}
action_frame = &af_params->action_frame;
/* Add the packet Id */
- action_frame->packet_id = cpu_to_le32(*cookie);
+ action_frame->packet_id = cpu_to_le32(cookie);
/* Add BSSID */
memcpy(&action_frame->da[0], &mgmt->da[0], ETH_ALEN);
memcpy(&af_params->bssid[0], &mgmt->bssid[0], ETH_ALEN);
@@ -5649,12 +5647,12 @@ brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
le16_to_cpu(action_frame->len));
brcmf_dbg(TRACE, "Action frame, cookie=%lld, len=%d, channel=%d\n",
- *cookie, le16_to_cpu(action_frame->len),
+ cookie, le16_to_cpu(action_frame->len),
le32_to_cpu(af_params->channel));
ack = brcmf_p2p_send_action_frame(vif->ifp, af_params);
- cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, ack,
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, ack,
GFP_KERNEL);
free:
kfree(af_params);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
index 6ceb301429054..63e534523f518 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h
@@ -497,6 +497,6 @@ void brcmf_cfg80211_free_vif(struct net_device *ndev);
int brcmf_set_wsec(struct brcmf_if *ifp, const u8 *key, u16 key_len, u16 flags);
int brcmf_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie);
+ struct cfg80211_mgmt_tx_params *params, u64 cookie);
#endif /* BRCMFMAC_CFG80211_H */
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
index ce09d44fa73cf..49b33efe22b41 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cyw/core.c
@@ -100,7 +100,7 @@ static int brcmf_cyw_activate_events(struct brcmf_if *ifp)
static
int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct ieee80211_channel *chan = params->chan;
@@ -123,7 +123,6 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
if (!ieee80211_is_auth(mgmt->frame_control))
return brcmf_cfg80211_mgmt_tx(wiphy, wdev, params, cookie);
- *cookie = 0;
vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
reinit_completion(&vif->mgmt_tx);
@@ -155,7 +154,7 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
memcpy(&mf_params->da[0], &mgmt->da[0], ETH_ALEN);
memcpy(&mf_params->bssid[0], &mgmt->bssid[0], ETH_ALEN);
- mf_params->packet_id = cpu_to_le32(*cookie);
+ mf_params->packet_id = cpu_to_le32(cookie);
memcpy(mf_params->data, &buf[DOT11_MGMT_HDR_LEN],
le16_to_cpu(mf_params->len));
@@ -187,8 +186,7 @@ int brcmf_cyw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
}
tx_status:
- cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, ack,
- GFP_KERNEL);
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, ack, GFP_KERNEL);
free:
kfree(mf_params);
return err;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
index c7d7b35ab1253..32a015d6b7698 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
@@ -979,10 +979,8 @@ brcmf_p2p_discover_listen(struct brcmf_p2p_info *p2p, u16 channel, u32 duration)
p2p->cfg->d11inf.encchspec(&ch);
err = brcmf_p2p_set_discover_state(vif->ifp, WL_P2P_DISC_ST_LISTEN,
ch.chspec, (u16)duration);
- if (!err) {
+ if (!err)
set_bit(BRCMF_P2P_STATUS_DISCOVER_LISTEN, &p2p->status);
- p2p->remain_on_channel_cookie++;
- }
exit:
return err;
}
@@ -1000,7 +998,7 @@ brcmf_p2p_discover_listen(struct brcmf_p2p_info *p2p, u16 channel, u32 duration)
*/
int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *channel,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
@@ -1020,8 +1018,8 @@ int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
goto exit;
memcpy(&p2p->remain_on_channel, channel, sizeof(*channel));
- *cookie = p2p->remain_on_channel_cookie;
- cfg80211_ready_on_channel(wdev, *cookie, channel, duration, GFP_KERNEL);
+ p2p->remain_on_channel_cookie = cookie;
+ cfg80211_ready_on_channel(wdev, cookie, channel, duration, GFP_KERNEL);
exit:
return err;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
index 9f3f01ade2b77..7078009491707 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.h
@@ -157,7 +157,7 @@ int brcmf_p2p_scan_prep(struct wiphy *wiphy,
struct brcmf_cfg80211_vif *vif);
int brcmf_p2p_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *channel,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr);
int brcmf_p2p_notify_listen_complete(struct brcmf_if *ifp,
const struct brcmf_event_msg *e,
diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 99d96088e364c..de9953ecbefd6 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -196,7 +196,7 @@ mwifiex_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
*/
static int
mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
const u8 *buf = params->buf;
size_t len = params->len;
@@ -259,14 +259,13 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
tx_info->pkt_len = pkt_len;
mwifiex_form_mgmt_frame(skb, buf, len);
- *cookie = get_random_u32() | 1;
if (ieee80211_is_action(mgmt->frame_control))
skb = mwifiex_clone_skb_for_tx_status(priv,
skb,
- MWIFIEX_BUF_FLAG_ACTION_TX_STATUS, cookie);
+ MWIFIEX_BUF_FLAG_ACTION_TX_STATUS, &cookie);
else
- cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,
GFP_ATOMIC);
mwifiex_queue_tx_pkt(priv, skb);
@@ -304,13 +303,13 @@ static int
mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr)
{
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
int ret;
- if (!chan || !cookie) {
+ if (!chan) {
mwifiex_dbg(priv->adapter, ERROR, "Invalid parameter for ROC\n");
return -EINVAL;
}
@@ -326,15 +325,14 @@ mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,
duration);
if (!ret) {
- *cookie = get_random_u32() | 1;
- priv->roc_cfg.cookie = *cookie;
+ priv->roc_cfg.cookie = cookie;
priv->roc_cfg.chan = *chan;
- cfg80211_ready_on_channel(wdev, *cookie, chan,
+ cfg80211_ready_on_channel(wdev, cookie, chan,
duration, GFP_ATOMIC);
mwifiex_dbg(priv->adapter, INFO,
- "info: ROC, cookie = 0x%llx\n", *cookie);
+ "info: ROC, cookie = 0x%llx\n", cookie);
}
return ret;
@@ -4560,7 +4558,7 @@ mwifiex_cfg80211_disassociate(struct wiphy *wiphy,
static int
mwifiex_cfg80211_probe_peer(struct wiphy *wiphy,
struct net_device *dev, const u8 *peer,
- u64 *cookie)
+ u64 cookie)
{
/* hostapd looks for NL80211_CMD_PROBE_CLIENT support; otherwise,
* it requires monitor-mode support (which mwifiex doesn't support).
diff --git a/drivers/net/wireless/microchip/wilc1000/cfg80211.c b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
index 6654fce4ded84..bb2748a193294 100644
--- a/drivers/net/wireless/microchip/wilc1000/cfg80211.c
+++ b/drivers/net/wireless/microchip/wilc1000/cfg80211.c
@@ -1100,24 +1100,19 @@ static void wilc_wfi_remain_on_channel_expired(struct wilc_vif *vif, u64 cookie)
static int remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr)
{
int ret = 0;
struct wilc_vif *vif = netdev_priv(wdev->netdev);
struct wilc_priv *priv = &vif->priv;
- u64 id;
if (wdev->iftype == NL80211_IFTYPE_AP) {
netdev_dbg(vif->ndev, "Required while in AP mode\n");
return ret;
}
- id = ++priv->inc_roc_cookie;
- if (id == 0)
- id = ++priv->inc_roc_cookie;
-
- ret = wilc_remain_on_channel(vif, id, chan->hw_value,
+ ret = wilc_remain_on_channel(vif, cookie, chan->hw_value,
wilc_wfi_remain_on_channel_expired);
if (ret)
return ret;
@@ -1125,12 +1120,11 @@ static int remain_on_channel(struct wiphy *wiphy,
vif->wilc->op_ch = chan->hw_value;
priv->remain_on_ch_params.listen_ch = chan;
- priv->remain_on_ch_params.listen_cookie = id;
- *cookie = id;
+ priv->remain_on_ch_params.listen_cookie = cookie;
priv->p2p_listen_state = true;
priv->remain_on_ch_params.listen_duration = duration;
- cfg80211_ready_on_channel(wdev, *cookie, chan, duration, GFP_KERNEL);
+ cfg80211_ready_on_channel(wdev, cookie, chan, duration, GFP_KERNEL);
mod_timer(&vif->hif_drv->remain_on_ch_timer,
jiffies + msecs_to_jiffies(duration + 1000));
@@ -1153,7 +1147,7 @@ static int cancel_remain_on_channel(struct wiphy *wiphy,
static int mgmt_tx(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie)
+ u64 cookie)
{
struct ieee80211_channel *chan = params->chan;
unsigned int wait = params->wait;
@@ -1170,8 +1164,7 @@ static int mgmt_tx(struct wiphy *wiphy,
const u8 *vendor_ie;
int ret = 0;
- *cookie = get_random_u32();
- priv->tx_cookie = *cookie;
+ priv->tx_cookie = cookie;
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control))
diff --git a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
index 4f9e20f728114..c820f08d28355 100644
--- a/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
+++ b/drivers/net/wireless/nxp/nxpwifi/cfg80211.c
@@ -150,7 +150,7 @@ nxpwifi_form_mgmt_frame(struct sk_buff *skb, const u8 *buf, size_t len)
/* cfg80211 operation handler to transmit a management frame. */
static int
nxpwifi_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
const u8 *buf = params->buf;
size_t len = params->len;
@@ -212,14 +212,13 @@ nxpwifi_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
tx_info->pkt_len = pkt_len;
nxpwifi_form_mgmt_frame(skb, buf, len);
- *cookie = nxpwifi_roc_cookie(priv->adapter);
if (ieee80211_is_action(mgmt->frame_control))
skb = nxpwifi_clone_skb_for_tx_status(priv,
skb,
- NXPWIFI_BUF_FLAG_ACTION_TX_STATUS, cookie);
+ NXPWIFI_BUF_FLAG_ACTION_TX_STATUS, &cookie);
else
- cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, true,
+ cfg80211_mgmt_tx_status(wdev, cookie, buf, len, true,
GFP_ATOMIC);
nxpwifi_queue_tx_pkt(priv, skb);
@@ -254,14 +253,14 @@ static int
nxpwifi_cfg80211_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr)
{
struct nxpwifi_private *priv = nxpwifi_netdev_get_priv(wdev->netdev);
struct nxpwifi_adapter *adapter = priv->adapter;
int ret;
- if (!chan || !cookie) {
+ if (!chan) {
nxpwifi_dbg(adapter, ERROR, "Invalid parameter for ROC\n");
return -EINVAL;
}
@@ -277,15 +276,14 @@ nxpwifi_cfg80211_remain_on_channel(struct wiphy *wiphy,
duration);
if (!ret) {
- *cookie = nxpwifi_roc_cookie(adapter);
- priv->roc_cfg.cookie = *cookie;
+ priv->roc_cfg.cookie = cookie;
priv->roc_cfg.chan = *chan;
- cfg80211_ready_on_channel(wdev, *cookie, chan,
+ cfg80211_ready_on_channel(wdev, cookie, chan,
duration, GFP_ATOMIC);
nxpwifi_dbg(adapter, INFO,
- "info: ROC, cookie = 0x%llx\n", *cookie);
+ "info: ROC, cookie = 0x%llx\n", cookie);
}
return ret;
@@ -3618,7 +3616,7 @@ nxpwifi_cfg80211_disassociate(struct wiphy *wiphy,
static int
nxpwifi_cfg80211_probe_peer(struct wiphy *wiphy,
struct net_device *dev, const u8 *peer,
- u64 *cookie)
+ u64 cookie)
{
/*
* hostapd looks for NL80211_CMD_PROBE_CLIENT support; otherwise,
diff --git a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
index 9e44c85d2051c..45e2b7ae96333 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/cfg80211.c
@@ -446,7 +446,7 @@ qtnf_update_mgmt_frame_registrations(struct wiphy *wiphy,
static int
qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
struct qtnf_vif *vif = qtnf_netdev_get_priv(wdev->netdev);
const struct ieee80211_mgmt *mgmt_frame = (void *)params->buf;
@@ -454,8 +454,6 @@ qtnf_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
u16 flags = 0;
u16 freq;
- *cookie = short_cookie;
-
if (params->offchan)
flags |= QLINK_FRAME_TX_FLAG_OFFCHAN;
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 15c08b24502fd..7b346226fe748 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -5107,7 +5107,8 @@ struct mgmt_frame_regs {
* @tdls_oper: Perform a high-level TDLS operation (e.g. TDLS link setup).
*
* @probe_peer: probe a connected peer (AP: STA MAC required; STA: no MAC),
- * must return a cookie that is later passed to cfg80211_probe_status().
+ * must use the @cookie as provided which is later passed to
+ * cfg80211_probe_status().
*
* @set_noack_map: Set the NoAck Map for the TIDs.
*
@@ -5218,7 +5219,8 @@ struct mgmt_frame_regs {
* user space
*
* @tx_control_port: TX a control port frame (EAPoL). The noencrypt parameter
- * tells the driver that the frame should not be encrypted.
+ * tells the driver that the frame should not be encrypted. A @cookie
+ * value of 0 means the caller does not want TX status reporting.
*
* @get_ftm_responder_stats: Retrieve FTM responder statistics, if available.
* Statistics should be cumulative, currently no way to reset is provided.
@@ -5455,14 +5457,14 @@ struct cfg80211_ops {
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
unsigned int duration,
- u64 *cookie, const u8 *rx_addr);
+ u64 cookie, const u8 *rx_addr);
int (*cancel_remain_on_channel)(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie);
int (*mgmt_tx)(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie);
+ u64 cookie);
int (*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
struct wireless_dev *wdev,
u64 cookie);
@@ -5509,7 +5511,7 @@ struct cfg80211_ops {
const u8 *peer, enum nl80211_tdls_operation oper);
int (*probe_peer)(struct wiphy *wiphy, struct net_device *dev,
- const u8 *peer, u64 *cookie);
+ const u8 *peer, u64 cookie);
int (*set_noack_map)(struct wiphy *wiphy,
struct net_device *dev,
@@ -5607,7 +5609,7 @@ struct cfg80211_ops {
const u8 *buf, size_t len,
const u8 *dest, const __be16 proto,
const bool noencrypt, int link_id,
- u64 *cookie);
+ u64 cookie);
int (*get_ftm_responder_stats)(struct wiphy *wiphy,
struct net_device *dev,
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index df68a5bdeb2f0..310c14560065d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4827,19 +4827,6 @@ int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
return __ieee80211_channel_switch(wiphy, dev, params);
}
-u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local)
-{
- lockdep_assert_wiphy(local->hw.wiphy);
-
- local->roc_cookie_counter++;
-
- /* wow, you wrapped 64 bits ... more likely a bug */
- if (WARN_ON(local->roc_cookie_counter == 0))
- local->roc_cookie_counter++;
-
- return local->roc_cookie_counter;
-}
-
int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
u64 *cookie, gfp_t gfp)
{
@@ -4864,7 +4851,6 @@ int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
IEEE80211_SKB_CB(skb)->status_data_idr = 1;
IEEE80211_SKB_CB(skb)->status_data = id;
- *cookie = ieee80211_mgmt_tx_cookie(local);
IEEE80211_SKB_CB(ack_skb)->ack.cookie = *cookie;
return 0;
@@ -4950,7 +4936,7 @@ static int ieee80211_set_rekey_data(struct wiphy *wiphy,
}
static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,
- const u8 *peer, u64 *cookie)
+ const u8 *peer, u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
@@ -5057,7 +5043,7 @@ static int ieee80211_probe_peer(struct wiphy *wiphy, struct net_device *dev,
if (qos)
nullfunc->qos_ctrl = cpu_to_le16(7);
- ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_ATOMIC);
+ ret = ieee80211_attach_ack_skb(local, skb, &cookie, GFP_ATOMIC);
if (ret) {
kfree_skb(skb);
return ret;
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 11f449e8ff003..4f1f52f6edcbb 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1708,8 +1708,6 @@ struct ieee80211_local {
struct list_head roc_list;
struct wiphy_work hw_roc_start, hw_roc_done;
unsigned long hw_roc_start_time;
- u64 roc_cookie_counter;
-
struct idr ack_status_frames;
spinlock_t ack_status_lock;
@@ -1989,7 +1987,6 @@ u64 ieee80211_reset_erp_info(struct ieee80211_sub_if_data *sdata);
void ieee80211_handle_queued_frames(struct ieee80211_local *local);
-u64 ieee80211_mgmt_tx_cookie(struct ieee80211_local *local);
int ieee80211_attach_ack_skb(struct ieee80211_local *local, struct sk_buff *skb,
u64 *cookie, gfp_t gfp);
@@ -2151,12 +2148,12 @@ void ieee80211_roc_purge(struct ieee80211_local *local,
struct ieee80211_sub_if_data *sdata);
int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr);
int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
struct wireless_dev *wdev, u64 cookie);
int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie);
+ struct cfg80211_mgmt_tx_params *params, u64 cookie);
int ieee80211_mgmt_tx_cancel_wait(struct wiphy *wiphy,
struct wireless_dev *wdev, u64 cookie);
@@ -2235,7 +2232,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev,
u32 info_flags,
u32 ctrl_flags,
- u64 *cookie);
+ u64 cookie);
struct sk_buff *
ieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, u32 info_flags);
@@ -2249,7 +2246,7 @@ void ieee80211_clear_fast_xmit(struct sta_info *sta);
int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len,
const u8 *dest, __be16 proto, bool unencrypted,
- int link_id, u64 *cookie);
+ int link_id, u64 cookie);
int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len);
void __ieee80211_xmit_fast(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/offchannel.c b/net/mac80211/offchannel.c
index 2bceb73717c66..7acef80d5f1fb 100644
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -602,14 +602,12 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
/*
* cookie is either the roc cookie (for normal roc)
- * or the SKB (for mgmt TX)
+ * or the mgmt_tx cookie; both are pre-assigned by cfg80211
*/
- if (!txskb) {
- roc->cookie = ieee80211_mgmt_tx_cookie(local);
- *cookie = roc->cookie;
- } else {
+ if (!txskb)
+ roc->cookie = *cookie;
+ else
roc->mgmt_tx_cookie = *cookie;
- }
req = wiphy_dereference(local->hw.wiphy, local->scan_req);
@@ -704,7 +702,7 @@ static int ieee80211_start_roc_work(struct ieee80211_local *local,
int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie,
+ unsigned int duration, u64 cookie,
const u8 *rx_addr)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
@@ -713,7 +711,7 @@ int ieee80211_remain_on_channel(struct wiphy *wiphy, struct wireless_dev *wdev,
lockdep_assert_wiphy(local->hw.wiphy);
return ieee80211_start_roc_work(local, sdata, chan,
- duration, cookie, NULL,
+ duration, &cookie, NULL,
IEEE80211_ROC_TYPE_NORMAL);
}
@@ -810,7 +808,7 @@ int ieee80211_cancel_remain_on_channel(struct wiphy *wiphy,
}
int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
struct ieee80211_local *local = sdata->local;
@@ -1016,18 +1014,11 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
/* make a copy to preserve the frame contents
* in case of encryption.
*/
- ret = ieee80211_attach_ack_skb(local, skb, cookie, GFP_KERNEL);
+ ret = ieee80211_attach_ack_skb(local, skb, &cookie, GFP_KERNEL);
if (ret) {
kfree_skb(skb);
goto out_unlock;
}
- } else {
- /* Assign a dummy non-zero cookie, it's not sent to
- * userspace in this case but we rely on its value
- * internally in the need_offchan case to distinguish
- * mgmt-tx from remain-on-channel.
- */
- *cookie = 0xffffffff;
}
if (!need_offchan) {
@@ -1044,7 +1035,7 @@ int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
/* This will handle all kinds of coalescing and immediate TX */
ret = ieee80211_start_roc_work(local, sdata, params->chan,
- params->wait, cookie, skb,
+ params->wait, &cookie, skb,
IEEE80211_ROC_TYPE_MGMT_TX);
if (ret)
ieee80211_free_txskb(&local->hw, skb);
diff --git a/net/mac80211/tdls.c b/net/mac80211/tdls.c
index ffd575a8d188f..dc2f662fe4c46 100644
--- a/net/mac80211/tdls.c
+++ b/net/mac80211/tdls.c
@@ -1121,7 +1121,7 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,
/* disable bottom halves when entering the Tx path */
local_bh_disable();
__ieee80211_subif_start_xmit(skb, dev, flags,
- IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, NULL);
+ IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, 0);
local_bh_enable();
return ret;
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index eb36f1b9771b5..5549cb8d5cda1 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2583,7 +2583,7 @@ int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,
struct sk_buff *skb,
u32 *info_flags,
- u64 *cookie)
+ u64 cookie)
{
struct sk_buff *ack_skb;
u16 info_id = 0;
@@ -2605,10 +2605,8 @@ static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,
if (id >= 0) {
info_id = id;
*info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
- if (cookie) {
- *cookie = ieee80211_mgmt_tx_cookie(local);
- IEEE80211_SKB_CB(ack_skb)->ack.cookie = *cookie;
- }
+ if (cookie)
+ IEEE80211_SKB_CB(ack_skb)->ack.cookie = cookie;
} else {
kfree_skb(ack_skb);
}
@@ -2641,7 +2639,7 @@ static u16 ieee80211_store_ack_skb(struct ieee80211_local *local,
static struct sk_buff *ieee80211_build_hdr(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb, u32 info_flags,
struct sta_info *sta, u32 ctrl_flags,
- u64 *cookie)
+ u64 cookie)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_tx_info *info;
@@ -4337,7 +4335,7 @@ void __ieee80211_subif_start_xmit(struct sk_buff *skb,
struct net_device *dev,
u32 info_flags,
u32 ctrl_flags,
- u64 *cookie)
+ u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
@@ -4532,7 +4530,7 @@ static void ieee80211_mlo_multicast_tx_one(struct ieee80211_sub_if_data *sdata,
return;
ctrl_flags |= u32_encode_bits(link_id, IEEE80211_TX_CTRL_MLO_LINK);
- __ieee80211_subif_start_xmit(out, sdata->dev, 0, ctrl_flags, NULL);
+ __ieee80211_subif_start_xmit(out, sdata->dev, 0, ctrl_flags, 0);
}
static void ieee80211_mlo_multicast_tx(struct net_device *dev,
@@ -4547,8 +4545,7 @@ static void ieee80211_mlo_multicast_tx(struct net_device *dev,
ctrl_flags |= u32_encode_bits(__ffs(links),
IEEE80211_TX_CTRL_MLO_LINK);
- __ieee80211_subif_start_xmit(skb, sdata->dev, 0, ctrl_flags,
- NULL);
+ __ieee80211_subif_start_xmit(skb, sdata->dev, 0, ctrl_flags, 0);
return;
}
@@ -4590,7 +4587,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
while ((skb = __skb_dequeue(&queue)))
__ieee80211_subif_start_xmit(skb, dev, 0,
IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
- NULL);
+ 0);
} else if (ieee80211_vif_is_mld(&sdata->vif) &&
((sdata->vif.type == NL80211_IFTYPE_AP &&
!ieee80211_hw_check(&sdata->local->hw, MLO_MCAST_MULTI_LINK_TX)) ||
@@ -4601,7 +4598,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
normal:
__ieee80211_subif_start_xmit(skb, dev, 0,
IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
- NULL);
+ 0);
}
return NETDEV_TX_OK;
@@ -4700,7 +4697,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
/* fall back to non-offload slow path */
__ieee80211_subif_start_xmit(skb, dev, 0,
IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
- NULL);
+ 0);
return;
}
@@ -4736,7 +4733,7 @@ static void ieee80211_8023_xmit(struct ieee80211_sub_if_data *sdata,
if (unlikely(sk_requests_wifi_status(skb->sk))) {
info->status_data = ieee80211_store_ack_skb(local, skb,
- &info->flags, NULL);
+ &info->flags, 0);
if (info->status_data)
info->status_data_idr = 1;
}
@@ -4879,7 +4876,7 @@ ieee80211_build_data_template(struct ieee80211_sub_if_data *sdata,
}
skb = ieee80211_build_hdr(sdata, skb, info_flags, sta,
- IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, NULL);
+ IEEE80211_TX_CTRL_MLO_LINK_UNSPEC, 0);
if (IS_ERR(skb))
goto out;
@@ -6494,7 +6491,7 @@ void ieee80211_tx_skb_tid(struct ieee80211_sub_if_data *sdata,
int ieee80211_tx_control_port(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len,
const u8 *dest, __be16 proto, bool unencrypted,
- int link_id, u64 *cookie)
+ int link_id, u64 cookie)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct ieee80211_local *local = sdata->local;
@@ -6629,7 +6626,7 @@ int ieee80211_probe_mesh_link(struct wiphy *wiphy, struct net_device *dev,
local_bh_disable();
__ieee80211_subif_start_xmit(skb, skb->dev, 0,
IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP,
- NULL);
+ 0);
local_bh_enable();
return 0;
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 399037514943d..b3ead98aee07a 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -402,7 +402,7 @@ void cfg80211_mlme_purge_registrations(struct wireless_dev *wdev);
int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie);
+ u64 cookie);
void cfg80211_oper_and_ht_capa(struct ieee80211_ht_cap *ht_capa,
const struct ieee80211_ht_cap *ht_capa_mask);
void cfg80211_oper_and_vht_capa(struct ieee80211_vht_cap *vht_capa,
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 2a2c173058bac..34f9003d5c541 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -851,7 +851,7 @@ static bool cfg80211_allowed_random_address(struct wireless_dev *wdev,
int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,
- struct cfg80211_mgmt_tx_params *params, u64 *cookie)
+ struct cfg80211_mgmt_tx_params *params, u64 cookie)
{
const struct ieee80211_mgmt *mgmt;
u16 stype;
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ac0c0da452419..708e8bb8dafdd 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -14630,8 +14630,9 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
goto free_msg;
}
+ cookie = cfg80211_assign_cookie(rdev);
err = rdev_remain_on_channel(rdev, wdev, chandef.chan,
- duration, &cookie, rx_addr);
+ duration, cookie, rx_addr);
if (err)
goto free_msg;
@@ -14871,7 +14872,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
}
params.chan = chandef.chan;
- err = cfg80211_mlme_mgmt_tx(rdev, wdev, ¶ms, &cookie);
+ cookie = cfg80211_assign_cookie(rdev);
+ err = cfg80211_mlme_mgmt_tx(rdev, wdev, ¶ms, cookie);
if (err)
goto free_msg;
@@ -16359,7 +16361,8 @@ static int nl80211_probe_peer(struct sk_buff *skb, struct genl_info *info)
goto free_msg;
}
- err = rdev_probe_peer(rdev, dev, addr, &cookie);
+ cookie = cfg80211_assign_cookie(rdev);
+ err = rdev_probe_peer(rdev, dev, addr, cookie);
if (err)
goto free_msg;
@@ -18574,10 +18577,11 @@ static int nl80211_tx_control_port(struct sk_buff *skb, struct genl_info *info)
link_id = nl80211_link_id_or_invalid(info->attrs);
+ cookie = dont_wait_for_ack ? 0 : cfg80211_assign_cookie(rdev);
err = rdev_tx_control_port(rdev, dev, buf, len,
dest, cpu_to_be16(proto), noencrypt, link_id,
- dont_wait_for_ack ? NULL : &cookie);
- if (!err && !dont_wait_for_ack)
+ cookie);
+ if (!err && cookie)
nl_set_extack_cookie_u64(info->extack, cookie);
return err;
}
@@ -22030,6 +22034,10 @@ static void nl80211_frame_tx_status(struct wireless_dev *wdev,
struct sk_buff *msg;
void *hdr;
+ /* userspace not interested in zero-cookie status */
+ if (!status->cookie)
+ return;
+
if (command == NL80211_CMD_FRAME_TX_STATUS)
trace_cfg80211_mgmt_tx_status(wdev, status->cookie,
status->ack);
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 6c3bad8b2d6f6..46849fe8d0b39 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -736,14 +736,14 @@ static inline int
rdev_remain_on_channel(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,
struct ieee80211_channel *chan,
- unsigned int duration, u64 *cookie, const u8 *rx_addr)
+ unsigned int duration, u64 cookie, const u8 *rx_addr)
{
int ret;
trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, duration,
rx_addr);
ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan,
duration, cookie, rx_addr);
- trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
+ trace_rdev_return_int_cookie(&rdev->wiphy, ret, cookie);
return ret;
}
@@ -761,12 +761,12 @@ rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev,
static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev,
struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
- u64 *cookie)
+ u64 cookie)
{
int ret;
trace_rdev_mgmt_tx(&rdev->wiphy, wdev, params);
ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, params, cookie);
- trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
+ trace_rdev_return_int_cookie(&rdev->wiphy, ret, cookie);
return ret;
}
@@ -775,7 +775,7 @@ static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,
const void *buf, size_t len,
const u8 *dest, __be16 proto,
const bool noencrypt, int link,
- u64 *cookie)
+ u64 cookie)
{
int ret;
trace_rdev_tx_control_port(&rdev->wiphy, dev, buf, len,
@@ -783,7 +783,7 @@ static inline int rdev_tx_control_port(struct cfg80211_registered_device *rdev,
ret = rdev->ops->tx_control_port(&rdev->wiphy, dev, buf, len,
dest, proto, noencrypt, link, cookie);
if (cookie)
- trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
+ trace_rdev_return_int_cookie(&rdev->wiphy, ret, cookie);
else
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
@@ -950,12 +950,12 @@ static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev,
static inline int rdev_probe_peer(struct cfg80211_registered_device *rdev,
struct net_device *dev, const u8 *peer,
- u64 *cookie)
+ u64 cookie)
{
int ret;
trace_rdev_probe_peer(&rdev->wiphy, dev, peer);
ret = rdev->ops->probe_peer(&rdev->wiphy, dev, peer, cookie);
- trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie);
+ trace_rdev_return_int_cookie(&rdev->wiphy, ret, cookie);
return ret;
}
|
| 3/2 | 2026/07/29 20:04 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 23172 output: 31 thoughts: 723 Thoughts: **Fuzzing Plan: Revised `cfg80211_ops` Cookie Passing** Okay, so we have a patch that's fundamentally changing how the `u64 cookie` is passed to these crucial `cfg80211_ops` callbacks: `remain_on_channel`, `mgmt_tx`, `probe_peer`, and `tx_control_port`. It's going from a pointer (`u64 *cookie`) to a value (`u64 cookie`). That's a big deal because the cookie assignment is now happening centrally within `cfg80211` using `cfg80211_assign_cookie(rdev)` in `net/wireless/nl80211.c`, instead of being driver-generated. This impacts the core 802.11 stack – both `mac80211` and `cfg80211` – and, of course, a bunch of drivers. Given that `mac80211` and `cfg80211` are involved, which are also reachable through `mac80211_hwsim`, this is a prime candidate for fuzzing. I need to make sure this is thoroughly tested. Let's nail down the specific functions affected: In `net/wireless/nl80211.c`, we're looking at `nl80211_remain_on_channel`, `nl80211_tx_mgmt`, `nl80211_probe_peer`, and `nl80211_tx_control_port`. In `net/mac80211/`, it's `ieee80211_remain_on_channel`, `ieee80211_mgmt_tx`, `ieee80211_probe_peer`, and `ieee80211_tx_control_port`. Right, now, what about the config options? I need to make sure `CONFIG_MAC80211` and `CONFIG_CFG80211` are enabled. Good, and `CONFIG_MAC80211_HWSIM` will be invaluable for testing. Focusing the fuzzing efforts – I'll target `nl80211_remain_on_channel`, `nl80211_tx_mgmt`, `nl80211_probe_peer`, and `nl80211_tx_control_port`. I need to ensure these are reachable. Using `default_api:grepper`, I can confirm that these functions exist and are not static/inlined in a way that prevents fuzzing. Although `nl80211_remain_on_channel` is static, it's a netlink command handler, so Syzkaller can reach it via `nl80211` netlink descriptions. The `mac80211` functions are also fine because they are exported or used as ops. Specifically I'm thinking of `ieee80211_remain_on_channel`, `ieee80211_mgmt_tx`, and `ieee80211_tx_control_port`. Let me quickly `grep` to be absolutely certain. |
| 4/2 | 2026/07/29 20:04 | tool | grepper |
0mArgs:{
"Expression": "^(static )?int nl80211_remain_on_channel"
}Results: {
"Output": "net/wireless/nl80211.c=14537=static int nl80211_tdls_oper(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-14557-\nnet/wireless/nl80211.c:14558:static int nl80211_remain_on_channel(struct sk_buff *skb,\nnet/wireless/nl80211.c-14559-\t\t\t\t struct genl_info *info)\n"
} |
| 5/2 | 2026/07/29 20:04 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 24805 output: 29 thoughts: 126 Thoughts: **Analyzing the Wireless Communication Functions** Okay, let's take a look at these functions. I see we're dealing with a set of wireless communication primitives, likely related to the 802.11 standard, judging by the prefixes. The list shows functions with both the `nl80211` and `ieee80211` prefixes, so we're probably looking at a potential layering or abstraction issue here. I'll start by focusing on `nl80211_tx_mgmt`, and compare it with the other functions that seem related, specifically those with a similar functionality, such as `ieee80211_mgmt_tx`. It looks like there are also functions dealing with channel management and control ports, namely `nl80211_remain_on_channel`, `nl80211_tx_control_port`, `ieee80211_remain_on_channel`, and `ieee80211_tx_control_port`, which I need to get a better handle on. And, there is `nl80211_probe_peer`, which suggests peer discovery or management. I need to understand how these functions interact. My initial thought is to figure out the differences in abstraction, and where the core implementations lie. |
| 6/2 | 2026/07/29 20:05 | tool | grepper |
0mArgs:{
"Expression": "^(static )?int nl80211_tx_mgmt"
}Results: {
"Output": "net/wireless/nl80211.c=14694=static int nl80211_register_mgmt(struct sk_buff *skb, struct genl_info *info)\n--\nnet/wireless/nl80211.c-14751-\nnet/wireless/nl80211.c:14752:static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)\nnet/wireless/nl80211.c-14753-{\n--\nnet/wireless/nl80211.c-14897-\nnet/wireless/nl80211.c:14898:static int nl80211_tx_mgmt_cancel_wait(struct sk_buff *skb, struct genl_info *info)\nnet/wireless/nl80211.c-14899-{\n"
} |
| 7/2 | 2026/07/29 20:05 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 25491 output: 25 thoughts: 57 Thoughts: Okay, let's see what we're working with here. I need to figure out the right configuration for this system. Looking at the options, I have `MAC80211`, `CFG80211`, and `MAC80211_HWSIM`. I immediately need to zero in on whether `MAC80211_HWSIM` is the appropriate configuration. My experience suggests it's a key candidate, but I need to quickly validate that assumption. Let's dig in and make sure that's the right path forward, or if I need to consider the other possibilities. |
| 8/2 | 2026/07/29 20:05 | tool | grepper |
0mArgs:{
"Expression": "config MAC80211_HWSIM"
}Results: {
"Output": "drivers/net/wireless/virtual/Kconfig:1:config MAC80211_HWSIM\ndrivers/net/wireless/virtual/Kconfig-2-\ttristate \"Simulated radio testing tool for mac80211\"\n"
} |
| 9/2 | 2026/07/29 20:05 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 25776 output: 22 thoughts: 51 Thoughts: Okay, here's my interpretation of those thoughts, tailored for an expert audience: **Analyzing the Relevant Configurations** Right, so `MAC80211_HWSIM` – that’s pretty straightforward. That's the key config option for enabling the mac80211 hardware simulation, no surprises there. Now, the real meat of the matter is understanding how this all ties into the broader kernel WLAN framework. I need to make sure I understand the interplay with `CFG80211` and `MAC80211`, the fundamental building blocks. I'll need to double-check their configurations, dependencies, and interactions with `MAC80211_HWSIM` to ensure everything is set up correctly for testing or whatever I have in mind. I need to know the state of these components, what is enabled, what is disabled, and how my current configuration fits within that system. |
| 10/2 | 2026/07/29 20:05 | tool | grepper |
0mArgs:{
"Expression": "config CFG80211"
}Results: {
"Output": "net/wireless/Kconfig=14=config WEXT_PRIV\n--\nnet/wireless/Kconfig-16-\nnet/wireless/Kconfig:17:config CFG80211\nnet/wireless/Kconfig-18-\ttristate \"cfg80211 - wireless configuration API\"\n--\nnet/wireless/Kconfig=38=config NL80211_TESTMODE\n--\nnet/wireless/Kconfig-51-\nnet/wireless/Kconfig:52:config CFG80211_DEVELOPER_WARNINGS\nnet/wireless/Kconfig-53-\tbool \"enable developer warnings\"\n--\nnet/wireless/Kconfig-67-\nnet/wireless/Kconfig:68:config CFG80211_CERTIFICATION_ONUS\nnet/wireless/Kconfig-69-\tbool \"cfg80211 certification onus\"\n--\nnet/wireless/Kconfig-88-\nnet/wireless/Kconfig:89:config CFG80211_REQUIRE_SIGNED_REGDB\nnet/wireless/Kconfig-90-\tbool \"require regdb signature\" if CFG80211_CERTIFICATION_ONUS\n--\nnet/wireless/Kconfig-98-\nnet/wireless/Kconfig:99:config CFG80211_USE_KERNEL_REGDB_KEYS\nnet/wireless/Kconfig-100-\tbool \"allow regdb keys shipped with the kernel\" if CFG80211_CERTIFICATION_ONUS\n--\nnet/wireless/Kconfig-110-\nnet/wireless/Kconfig:111:config CFG80211_EXTRA_REGDB_KEYDIR\nnet/wireless/Kconfig-112-\tstring \"additional regdb key directory\" if CFG80211_CERTIFICATION_ONUS\n--\nnet/wireless/Kconfig-121-\nnet/wireless/Kconfig:122:config CFG80211_REG_CELLULAR_HINTS\nnet/wireless/Kconfig-123-\tbool \"cfg80211 regulatory support for cellular base station hints\"\n--\nnet/wireless/Kconfig-134-\nnet/wireless/Kconfig:135:config CFG80211_REG_RELAX_NO_IR\nnet/wireless/Kconfig-136-\tbool \"cfg80211 support for NO_IR relaxation\"\n--\nnet/wireless/Kconfig-158-\nnet/wireless/Kconfig:159:config CFG80211_DEFAULT_PS\nnet/wireless/Kconfig-160-\tbool \"enable powersave by default\"\n--\nnet/wireless/Kconfig-168-\nnet/wireless/Kconfig:169:config CFG80211_DEBUGFS\nnet/wireless/Kconfig-170-\tbool \"cfg80211 DebugFS entries\"\n--\nnet/wireless/Kconfig-176-\nnet/wireless/Kconfig:177:config CFG80211_CRDA_SUPPORT\nnet/wireless/Kconfig-178-\tbool \"support CRDA\" if EXPERT\n--\nnet/wireless/Kconfig-186-\nnet/wireless/Kconfig:187:config CFG80211_WEXT\nnet/wireless/Kconfig-188-\tbool \"cfg80211 wireless extensions compatibility\"\n--\nnet/wireless/Kconfig-193-\nnet/wireless/Kconfig:194:config CFG80211_KUNIT_TEST\nnet/wireless/Kconfig-195-\ttristate \"KUnit tests for cfg80211\" if !KUNIT_ALL_TESTS\n"
} |
| 11/2 | 2026/07/29 20:05 | llm | patch-evaluator |
0mModel:gemini-3.1-pro-preview Args: null Results: null Tokens: input: 26963 output: 267 thoughts: 406 Thoughts: **Analyzing the Cookie Assignment Change in cfg80211 and mac80211** Okay, so I'm looking at this patch and immediately, the key configurations here are `CFG80211`, `MAC80211`, and `MAC80211_HWSIM`. That's the setup, got it. The core of this seems to be about how cookies are assigned in the 802.11 stack. Specifically, this patch shifts the responsibility of assigning cookies for management TX, remain-on-channel, probe peer, and tx control port operations from the driver level up into the `cfg80211` core. This is a pretty significant functional change, and it's something that can be directly manipulated and tested using netlink commands. We can verify the changes using `mac80211_hwsim`, which is great for this kind of core stack modification. I've identified the key functions and netlink commands involved: `nl80211_remain_on_channel`, `nl80211_tx_mgmt`, `nl80211_probe_peer`, `nl80211_tx_control_port`, `ieee80211_remain_on_channel`, `ieee80211_mgmt_tx`, and `ieee80211_tx_control_port`. These are the key touchpoints to focus on. We can absolutely fuzz these with a high probability of finding issues. This is absolutely worth fuzzing. |
| 12/2 | 2026/07/29 20:05 | tool | set-results |
0mArgs:{
"EnableConfigs": [
"CFG80211",
"MAC80211",
"MAC80211_HWSIM"
],
"FocusSymbols": [
"nl80211_remain_on_channel",
"nl80211_tx_mgmt",
"nl80211_probe_peer",
"nl80211_tx_control_port",
"ieee80211_remain_on_channel",
"ieee80211_mgmt_tx",
"ieee80211_tx_control_port"
],
"Reasoning": "The patch changes how cookies are assigned for various cfg80211 operations (remain-on-channel, mgmt_tx, probe_peer, tx_control_port), moving the assignment from individual drivers to the cfg80211 core. This is a functional change in the core 802.11 stack that can be reached via nl80211 netlink commands and tested using the mac80211_hwsim software-emulated radio driver.",
"WorthFuzzing": true
}Results: {
"EnableConfigs": [
"CFG80211",
"MAC80211",
"MAC80211_HWSIM"
],
"FocusSymbols": [
"nl80211_remain_on_channel",
"nl80211_tx_mgmt",
"nl80211_probe_peer",
"nl80211_tx_control_port",
"ieee80211_remain_on_channel",
"ieee80211_mgmt_tx",
"ieee80211_tx_control_port"
],
"Reasoning": "The patch changes how cookies are assigned for various cfg80211 operations (remain-on-channel, mgmt_tx, probe_peer, tx_control_port), moving the assignment from individual drivers to the cfg80211 core. This is a functional change in the core 802.11 stack that can be reached via nl80211 netlink commands and tested using the mac80211_hwsim software-emulated radio driver.",
"WorthFuzzing": true
} |
| Total Calls | Total Tokens | Avg Tokens | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|
| Total Calls | Total Duration (Seconds) | Avg Duration (Seconds) |
|---|