WNM: Remove unused code from BSS TM Req generation
The url argument to ieee802_11_send_bss_trans_mgmt_request() was hardcoded to NULL in the only caller, so this code cannot be reached. wnm_send_bss_tm_req() construct the same frame with more generic parameters, including option for including the URL, so ieee802_11_send_bss_trans_mgmt_request() can be simplified. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
e7ddd86a98
commit
885bbd4de3
1 changed files with 4 additions and 15 deletions
|
@ -250,20 +250,14 @@ static void ieee802_11_rx_wnmsleep_req(struct hostapd_data *hapd,
|
||||||
|
|
||||||
static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
|
static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
|
||||||
const u8 *addr,
|
const u8 *addr,
|
||||||
u8 dialog_token,
|
u8 dialog_token)
|
||||||
const char *url)
|
|
||||||
{
|
{
|
||||||
struct ieee80211_mgmt *mgmt;
|
struct ieee80211_mgmt *mgmt;
|
||||||
size_t url_len, len;
|
size_t len;
|
||||||
u8 *pos;
|
u8 *pos;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
if (url)
|
mgmt = os_zalloc(sizeof(*mgmt));
|
||||||
url_len = os_strlen(url);
|
|
||||||
else
|
|
||||||
url_len = 0;
|
|
||||||
|
|
||||||
mgmt = os_zalloc(sizeof(*mgmt) + (url_len ? 1 + url_len : 0));
|
|
||||||
if (mgmt == NULL)
|
if (mgmt == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
os_memcpy(mgmt->da, addr, ETH_ALEN);
|
os_memcpy(mgmt->da, addr, ETH_ALEN);
|
||||||
|
@ -278,11 +272,6 @@ static int ieee802_11_send_bss_trans_mgmt_request(struct hostapd_data *hapd,
|
||||||
mgmt->u.action.u.bss_tm_req.disassoc_timer = host_to_le16(0);
|
mgmt->u.action.u.bss_tm_req.disassoc_timer = host_to_le16(0);
|
||||||
mgmt->u.action.u.bss_tm_req.validity_interval = 1;
|
mgmt->u.action.u.bss_tm_req.validity_interval = 1;
|
||||||
pos = mgmt->u.action.u.bss_tm_req.variable;
|
pos = mgmt->u.action.u.bss_tm_req.variable;
|
||||||
if (url) {
|
|
||||||
*pos++ += url_len;
|
|
||||||
os_memcpy(pos, url, url_len);
|
|
||||||
pos += url_len;
|
|
||||||
}
|
|
||||||
|
|
||||||
wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
|
wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
|
||||||
MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
|
MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
|
||||||
|
@ -325,7 +314,7 @@ static void ieee802_11_rx_bss_trans_mgmt_query(struct hostapd_data *hapd,
|
||||||
wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries",
|
wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries",
|
||||||
pos, end - pos);
|
pos, end - pos);
|
||||||
|
|
||||||
ieee802_11_send_bss_trans_mgmt_request(hapd, addr, dialog_token, NULL);
|
ieee802_11_send_bss_trans_mgmt_request(hapd, addr, dialog_token);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue