WNM: Remove dialog_token parameter
All callers of wnm_send_bss_transition_mgmt_resp() are explicitly passing wpa_s->wnm_dialog_token. As such, we might as well not pass it and use the variable directly. Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
This commit is contained in:
parent
c7cafef8a1
commit
770f3cb30b
1 changed files with 11 additions and 15 deletions
|
@ -1024,7 +1024,7 @@ static void wnm_add_cand_list(struct wpa_supplicant *wpa_s, struct wpabuf **buf)
|
||||||
#define BTM_RESP_MIN_SIZE 5 + ETH_ALEN
|
#define BTM_RESP_MIN_SIZE 5 + ETH_ALEN
|
||||||
|
|
||||||
static int wnm_send_bss_transition_mgmt_resp(
|
static int wnm_send_bss_transition_mgmt_resp(
|
||||||
struct wpa_supplicant *wpa_s, u8 dialog_token,
|
struct wpa_supplicant *wpa_s,
|
||||||
enum bss_trans_mgmt_status_code status,
|
enum bss_trans_mgmt_status_code status,
|
||||||
enum mbo_transition_reject_reason reason,
|
enum mbo_transition_reject_reason reason,
|
||||||
u8 delay, const u8 *target_bssid)
|
u8 delay, const u8 *target_bssid)
|
||||||
|
@ -1037,7 +1037,8 @@ static int wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"WNM: Send BSS Transition Management Response to " MACSTR
|
"WNM: Send BSS Transition Management Response to " MACSTR
|
||||||
" dialog_token=%u status=%u reason=%u delay=%d",
|
" dialog_token=%u status=%u reason=%u delay=%d",
|
||||||
MAC2STR(wpa_s->bssid), dialog_token, status, reason, delay);
|
MAC2STR(wpa_s->bssid), wpa_s->wnm_dialog_token, status,
|
||||||
|
reason, delay);
|
||||||
if (!wpa_s->current_bss) {
|
if (!wpa_s->current_bss) {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"WNM: Current BSS not known - drop response");
|
"WNM: Current BSS not known - drop response");
|
||||||
|
@ -1056,7 +1057,7 @@ static int wnm_send_bss_transition_mgmt_resp(
|
||||||
|
|
||||||
wpabuf_put_u8(buf, WLAN_ACTION_WNM);
|
wpabuf_put_u8(buf, WLAN_ACTION_WNM);
|
||||||
wpabuf_put_u8(buf, WNM_BSS_TRANS_MGMT_RESP);
|
wpabuf_put_u8(buf, WNM_BSS_TRANS_MGMT_RESP);
|
||||||
wpabuf_put_u8(buf, dialog_token);
|
wpabuf_put_u8(buf, wpa_s->wnm_dialog_token);
|
||||||
wpabuf_put_u8(buf, status);
|
wpabuf_put_u8(buf, status);
|
||||||
wpabuf_put_u8(buf, delay);
|
wpabuf_put_u8(buf, delay);
|
||||||
if (target_bssid) {
|
if (target_bssid) {
|
||||||
|
@ -1130,8 +1131,7 @@ static void wnm_bss_tm_connect(struct wpa_supplicant *wpa_s,
|
||||||
* start the actual reassociation after this response has been
|
* start the actual reassociation after this response has been
|
||||||
* delivered to the current AP. */
|
* delivered to the current AP. */
|
||||||
if (wnm_send_bss_transition_mgmt_resp(
|
if (wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_s, wpa_s->wnm_dialog_token,
|
wpa_s, WNM_BSS_TM_ACCEPT,
|
||||||
WNM_BSS_TM_ACCEPT,
|
|
||||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
||||||
bss->bssid) >= 0)
|
bss->bssid) >= 0)
|
||||||
return;
|
return;
|
||||||
|
@ -1234,9 +1234,8 @@ send_bss_resp_fail:
|
||||||
/* Send reject response for all the failures */
|
/* Send reject response for all the failures */
|
||||||
|
|
||||||
if (wpa_s->wnm_reply)
|
if (wpa_s->wnm_reply)
|
||||||
wnm_send_bss_transition_mgmt_resp(wpa_s,
|
wnm_send_bss_transition_mgmt_resp(wpa_s, status, reason,
|
||||||
wpa_s->wnm_dialog_token,
|
0, NULL);
|
||||||
status, reason, 0, NULL);
|
|
||||||
|
|
||||||
wnm_deallocate_memory(wpa_s);
|
wnm_deallocate_memory(wpa_s);
|
||||||
|
|
||||||
|
@ -1419,8 +1418,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
|
||||||
"WNM: Testing - reject BSS Transition Management Request: reject_btm_req_reason=%d",
|
"WNM: Testing - reject BSS Transition Management Request: reject_btm_req_reason=%d",
|
||||||
wpa_s->reject_btm_req_reason);
|
wpa_s->reject_btm_req_reason);
|
||||||
wnm_send_bss_transition_mgmt_resp(
|
wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_s, wpa_s->wnm_dialog_token,
|
wpa_s, wpa_s->reject_btm_req_reason,
|
||||||
wpa_s->reject_btm_req_reason,
|
|
||||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0, NULL);
|
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0, NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1548,8 +1546,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"WNM: Candidate list included bit is set, but no candidates found");
|
"WNM: Candidate list included bit is set, but no candidates found");
|
||||||
wnm_send_bss_transition_mgmt_resp(
|
wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_s, wpa_s->wnm_dialog_token,
|
wpa_s, WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES,
|
||||||
WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES,
|
|
||||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
|
@ -1559,8 +1556,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"WNM: Configuration prevents roaming (BSSID set)");
|
"WNM: Configuration prevents roaming (BSSID set)");
|
||||||
wnm_send_bss_transition_mgmt_resp(
|
wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_s, wpa_s->wnm_dialog_token,
|
wpa_s, WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES,
|
||||||
WNM_BSS_TM_REJECT_NO_SUITABLE_CANDIDATES,
|
|
||||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0,
|
||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
|
@ -1615,7 +1611,7 @@ static void ieee802_11_rx_bss_trans_mgmt_req(struct wpa_supplicant *wpa_s,
|
||||||
status = WNM_BSS_TM_REJECT_UNSPECIFIED;
|
status = WNM_BSS_TM_REJECT_UNSPECIFIED;
|
||||||
}
|
}
|
||||||
wnm_send_bss_transition_mgmt_resp(
|
wnm_send_bss_transition_mgmt_resp(
|
||||||
wpa_s, wpa_s->wnm_dialog_token, status,
|
wpa_s, status,
|
||||||
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0, NULL);
|
MBO_TRANSITION_REJECT_REASON_UNSPECIFIED, 0, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue