offchannel: Use wpas_get_tx_interface() src parameter more consistently
Both the wpa_s->pending_action_src and src argument to wpas_get_tx_interface() were used somewhat randomly. Make this more consistent since these values are pointing to the same address and the implementation is easier to understand when it is obvious that there is only one address being used. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
11ace2ed1f
commit
8e3afd7f6c
1 changed files with 2 additions and 4 deletions
|
@ -30,8 +30,7 @@ wpas_get_tx_interface(struct wpa_supplicant *wpa_s, const u8 *src)
|
||||||
*/
|
*/
|
||||||
iface = wpa_s->global->ifaces;
|
iface = wpa_s->global->ifaces;
|
||||||
while (iface) {
|
while (iface) {
|
||||||
if (os_memcmp(wpa_s->pending_action_src,
|
if (os_memcmp(src, iface->own_addr, ETH_ALEN) == 0)
|
||||||
iface->own_addr, ETH_ALEN) == 0)
|
|
||||||
break;
|
break;
|
||||||
iface = iface->next;
|
iface = iface->next;
|
||||||
}
|
}
|
||||||
|
@ -265,8 +264,7 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
|
||||||
struct wpa_supplicant *iface;
|
struct wpa_supplicant *iface;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
iface = wpas_get_tx_interface(wpa_s,
|
iface = wpas_get_tx_interface(wpa_s, src);
|
||||||
wpa_s->pending_action_src);
|
|
||||||
wpa_s->action_tx_wait_time = wait_time;
|
wpa_s->action_tx_wait_time = wait_time;
|
||||||
|
|
||||||
ret = wpa_drv_send_action(
|
ret = wpa_drv_send_action(
|
||||||
|
|
Loading…
Reference in a new issue