]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
offchannel: Use wpas_get_tx_interface() src parameter more consistently
authorJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 11:06:41 +0000 (13:06 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 13:47:04 +0000 (15:47 +0200)
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>
wpa_supplicant/offchannel.c

index f4515e9b4dac6d6d4d9b8e9465503936c80a5fff..8ab7ab843999874bd790e44827bc7cc56b2b2bdd 100644 (file)
@@ -30,8 +30,7 @@ wpas_get_tx_interface(struct wpa_supplicant *wpa_s, const u8 *src)
         */
        iface = wpa_s->global->ifaces;
        while (iface) {
-               if (os_memcmp(wpa_s->pending_action_src,
-                             iface->own_addr, ETH_ALEN) == 0)
+               if (os_memcmp(src, iface->own_addr, ETH_ALEN) == 0)
                        break;
                iface = iface->next;
        }
@@ -265,8 +264,7 @@ int offchannel_send_action(struct wpa_supplicant *wpa_s, unsigned int freq,
                struct wpa_supplicant *iface;
                int ret;
 
-               iface = wpas_get_tx_interface(wpa_s,
-                                             wpa_s->pending_action_src);
+               iface = wpas_get_tx_interface(wpa_s, src);
                wpa_s->action_tx_wait_time = wait_time;
 
                ret = wpa_drv_send_action(