nl80211: Rename send_action_cookie to send_frame_cookie

This is to match the NL80211_CMD_ACTION renaming to NL80211_CMD_FRAME
that happened long time ago. This command can be used with any IEEE
802.11 frame and it should not be implied to be limited to Action
frames.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2020-01-03 15:23:49 +02:00
parent 5ad372cc3f
commit 81ae8820a6
3 changed files with 23 additions and 23 deletions

View file

@ -7480,21 +7480,21 @@ static int nl80211_send_frame_cmd(struct i802_bss *bss,
(long long unsigned int) cookie); (long long unsigned int) cookie);
if (save_cookie) if (save_cookie)
drv->send_action_cookie = no_ack ? (u64) -1 : cookie; drv->send_frame_cookie = no_ack ? (u64) -1 : cookie;
if (drv->num_send_action_cookies == MAX_SEND_ACTION_COOKIES) { if (drv->num_send_frame_cookies == MAX_SEND_FRAME_COOKIES) {
wpa_printf(MSG_DEBUG, wpa_printf(MSG_DEBUG,
"nl80211: Drop oldest pending send action cookie 0x%llx", "nl80211: Drop oldest pending send frame cookie 0x%llx",
(long long unsigned int) (long long unsigned int)
drv->send_action_cookies[0]); drv->send_frame_cookies[0]);
os_memmove(&drv->send_action_cookies[0], os_memmove(&drv->send_frame_cookies[0],
&drv->send_action_cookies[1], &drv->send_frame_cookies[1],
(MAX_SEND_ACTION_COOKIES - 1) * (MAX_SEND_FRAME_COOKIES - 1) *
sizeof(u64)); sizeof(u64));
drv->num_send_action_cookies--; drv->num_send_frame_cookies--;
} }
drv->send_action_cookies[drv->num_send_action_cookies] = cookie; drv->send_frame_cookies[drv->num_send_frame_cookies] = cookie;
drv->num_send_action_cookies++; drv->num_send_frame_cookies++;
} }
fail: fail:
@ -7585,19 +7585,19 @@ static void wpa_driver_nl80211_send_action_cancel_wait(void *priv)
u64 cookie; u64 cookie;
/* Cancel the last pending TX cookie */ /* Cancel the last pending TX cookie */
nl80211_frame_wait_cancel(bss, drv->send_action_cookie); nl80211_frame_wait_cancel(bss, drv->send_frame_cookie);
/* /*
* Cancel the other pending TX cookies, if any. This is needed since * Cancel the other pending TX cookies, if any. This is needed since
* the driver may keep a list of all pending offchannel TX operations * the driver may keep a list of all pending offchannel TX operations
* and free up the radio only once they have expired or cancelled. * and free up the radio only once they have expired or cancelled.
*/ */
for (i = drv->num_send_action_cookies; i > 0; i--) { for (i = drv->num_send_frame_cookies; i > 0; i--) {
cookie = drv->send_action_cookies[i - 1]; cookie = drv->send_frame_cookies[i - 1];
if (cookie != drv->send_action_cookie) if (cookie != drv->send_frame_cookie)
nl80211_frame_wait_cancel(bss, cookie); nl80211_frame_wait_cancel(bss, cookie);
} }
drv->num_send_action_cookies = 0; drv->num_send_frame_cookies = 0;
} }

View file

@ -169,10 +169,10 @@ struct wpa_driver_nl80211_data {
u64 vendor_scan_cookie; u64 vendor_scan_cookie;
u64 remain_on_chan_cookie; u64 remain_on_chan_cookie;
u64 send_action_cookie; u64 send_frame_cookie;
#define MAX_SEND_ACTION_COOKIES 20 #define MAX_SEND_FRAME_COOKIES 20
u64 send_action_cookies[MAX_SEND_ACTION_COOKIES]; u64 send_frame_cookies[MAX_SEND_FRAME_COOKIES];
unsigned int num_send_action_cookies; unsigned int num_send_frame_cookies;
unsigned int last_mgmt_freq; unsigned int last_mgmt_freq;

View file

@ -694,12 +694,12 @@ static void mlme_event_mgmt_tx_status(struct wpa_driver_nl80211_data *drv,
return; return;
cookie_val = nla_get_u64(cookie); cookie_val = nla_get_u64(cookie);
wpa_printf(MSG_DEBUG, "nl80211: Action TX status:" wpa_printf(MSG_DEBUG,
" cookie=0x%llx%s (ack=%d)", "nl80211: Frame TX status: cookie=0x%llx%s (ack=%d)",
(long long unsigned int) cookie_val, (long long unsigned int) cookie_val,
cookie_val == drv->send_action_cookie ? cookie_val == drv->send_frame_cookie ?
" (match)" : " (unknown)", ack != NULL); " (match)" : " (unknown)", ack != NULL);
if (cookie_val != drv->send_action_cookie) if (cookie_val != drv->send_frame_cookie)
return; return;
} }