wifi: cfg80211: convert cookie output to input parameter

The remain_on_channel, mgmt_tx, and probe_peer ops previously used
a u64 *cookie output parameter. Now that cfg80211 pre-assigns the
cookie value before invoking drivers, the parameter conveys a value
from caller to driver, not the other way around. Convert it to a
plain u64 input parameter across the ops struct (cfg80211.h),
rdev-ops.h wrappers, nl80211.c/mlme.c call sites, mac80211, and
all driver implementations.

The tx_control_port op is excluded: its cookie pointer is nullable
(passed as NULL when dont_wait_for_ack is set), so the nullable
pointer semantics are still required.

Internal mac80211 helpers ieee80211_start_roc_work() and
ieee80211_attach_ack_skb() still take u64 *cookie because they
assign to the pointee; their callers now pass &cookie to take the
address of the local value parameter.

wil6210's internal wil_p2p_listen() is also updated to take u64
cookie since it is called directly from the remain_on_channel
callback.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Link: https://patch.msgid.link/20260731123509.1975281-12-arend.vanspriel@broadcom.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Arend van Spriel
2026-08-02 17:40:08 +02:00
committed by Johannes Berg
parent 51a87a1cb6
commit 914781c728
23 changed files with 79 additions and 80 deletions
+5 -5
View File
@@ -3034,14 +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);
/* TODO: if already pending or ongoing remain-on-channel,
* return -EBUSY */
vif->last_roc_id = *cookie;
vif->last_roc_id = cookie;
return ath6kl_wmi_remain_on_chnl_cmd(ar->wmi, vif->fw_vif_idx,
chan->center_freq, duration);
@@ -3186,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);
@@ -3232,13 +3232,13 @@ static int ath6kl_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
/* AP mode Power saving processing */
if (vif->nw_type == AP_NETWORK) {
queued = ath6kl_mgmt_powersave_ap(vif, id, *cookie, freq, wait,
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;
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);
}
+5 -5
View File
@@ -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,7 +1488,7 @@ out:
*/
tx_status = (rc == 0);
rc = (rc == -EAGAIN) ? 0 : rc;
cfg80211_mgmt_tx_status(wdev, *cookie, buf, len, tx_status, GFP_KERNEL);
cfg80211_mgmt_tx_status(wdev, cookie, buf, len, tx_status, GFP_KERNEL);
return rc;
}
@@ -1734,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;
@@ -2380,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);
@@ -2398,7 +2398,7 @@ static int wil_cfg80211_probe_peer(struct wiphy *wiphy,
return -ENOMEM;
req->cid = cid;
req->cookie = *cookie;
req->cookie = cookie;
mutex_lock(&vif->probe_client_mutex);
list_add_tail(&req->list, &vif->probe_client_pending);
+1 -1
View File
@@ -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, &params, NULL);
rc = wil_cfg80211_mgmt_tx(wiphy, wdev, &params, 0);
kfree(frame);
wil_info(wil, "-> %d\n", rc);
+3 -3
View File
@@ -124,7 +124,7 @@ out:
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));
p2p->cookie = *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:
+2 -2
View File
@@ -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,
@@ -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;
@@ -5603,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) {
@@ -5619,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);
@@ -5647,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);
@@ -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 */
@@ -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;
@@ -154,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));
@@ -186,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;
@@ -998,7 +998,7 @@ exit:
*/
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);
@@ -1018,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));
p2p->remain_on_channel_cookie = *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;
@@ -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,
@@ -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;
@@ -263,9 +263,9 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
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);
@@ -303,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;
}
@@ -325,14 +325,14 @@ mwifiex_cfg80211_remain_on_channel(struct wiphy *wiphy,
duration);
if (!ret) {
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;
@@ -4558,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).
@@ -1100,7 +1100,7 @@ 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;
@@ -1112,7 +1112,7 @@ static int remain_on_channel(struct wiphy *wiphy,
return ret;
}
ret = wilc_remain_on_channel(vif, *cookie, chan->hw_value,
ret = wilc_remain_on_channel(vif, cookie, chan->hw_value,
wilc_wfi_remain_on_channel_expired);
if (ret)
return ret;
@@ -1120,11 +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 = *cookie;
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));
@@ -1147,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;
@@ -1164,7 +1164,7 @@ static int mgmt_tx(struct wiphy *wiphy,
const u8 *vendor_ie;
int ret = 0;
priv->tx_cookie = *cookie;
priv->tx_cookie = cookie;
mgmt = (const struct ieee80211_mgmt *)buf;
if (!ieee80211_is_mgmt(mgmt->frame_control))
+9 -9
View File
@@ -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;
@@ -216,9 +216,9 @@ nxpwifi_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
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);
@@ -253,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;
}
@@ -276,14 +276,14 @@ nxpwifi_cfg80211_remain_on_channel(struct wiphy *wiphy,
duration);
if (!ret) {
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;
@@ -3616,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,
@@ -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;
@@ -2530,7 +2530,7 @@ exit:
static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
u64 *cookie)
u64 cookie)
{
struct net_device *ndev = wdev_to_ndev(wdev);
struct ieee80211_channel *chan = params->chan;
@@ -2553,7 +2553,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
padapter = rtw_netdev_priv(ndev);
/* indicate ack before issue frame to avoid racing with rsp frame */
rtw_cfg80211_mgmt_tx_status(padapter, *cookie, buf, len, ack, GFP_KERNEL);
rtw_cfg80211_mgmt_tx_status(padapter, cookie, buf, len, ack, GFP_KERNEL);
if (!rtw_action_frame_parse(buf, len, &category, &action))
goto exit;
+3 -3
View File
@@ -5458,14 +5458,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);
@@ -5512,7 +5512,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,
+2 -2
View File
@@ -4940,7 +4940,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;
@@ -5047,7 +5047,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;
+2 -2
View File
@@ -2150,12 +2150,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);
+5 -5
View File
@@ -702,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);
@@ -711,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);
}
@@ -808,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;
@@ -1014,7 +1014,7 @@ 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;
@@ -1035,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);
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -894,7 +894,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;
+3 -3
View File
@@ -14644,7 +14644,7 @@ static int nl80211_remain_on_channel(struct sk_buff *skb,
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;
@@ -14885,7 +14885,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
params.chan = chandef.chan;
cookie = cfg80211_assign_cookie(rdev);
err = cfg80211_mlme_mgmt_tx(rdev, wdev, &params, &cookie);
err = cfg80211_mlme_mgmt_tx(rdev, wdev, &params, cookie);
if (err)
goto free_msg;
@@ -16374,7 +16374,7 @@ static int nl80211_probe_peer(struct sk_buff *skb, struct genl_info *info)
}
cookie = cfg80211_assign_cookie(rdev);
err = rdev_probe_peer(rdev, dev, addr, &cookie);
err = rdev_probe_peer(rdev, dev, addr, cookie);
if (err)
goto free_msg;
+6 -6
View File
@@ -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;
}
@@ -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;
}