[PATCH] wpa_supplicant: send event to all interfaces

Janusz Dziedzic janusz.dziedzic at gmail.com
Sat Apr 2 10:20:45 PDT 2016


2016-04-02 18:56 GMT+02:00 Janusz Dziedzic <janusz.dziedzic at gmail.com>:
> =
>
> 2016-04-02 12:30 GMT+02:00 Jouni Malinen <j at w1.fi>:
>> On Thu, Mar 31, 2016 at 08:53:14PM +0200, Janusz Dziedzic wrote:
>>> In case we don't have ifidx and wdev_id pass
>>> such event to all interfaces and bss.
>>> Before we send event only to first interface and
>>> in case we are using p2p-dev we send event only
>>> to this one iface:
>>>
>>> p2p-dev-wlan0: CTRL-EVENT-REGDOM-CHANGE init=CORE type=WORLD
>>>
>>> Because of that we fail hwsim test cases eg. ibss_5ghz,
>>> while we never get CTRL-EVENT-REGDOM-CHANGE on wlan0.
>>>
>>> I also remove for_each() from wpa_supplicant_update_channel_list()
>>> while this function will be called now for each interface.
>>> So, seems this for_each() was a workaround for a real issue.
>>
>> Could you please clarify what exactly you mean with hwsim test cases
>> failing? I don't see such a failure in my testing.. Is this only
>> relevant for the remote test cases that you show in the example below?
>>
> It should also failed in case your driver using p2p-dev. In such case you will
> get only REGDOM-CHANGE on p2p-dev-wlan0 (only on first interface in iface
> iterations), and never get such event on wlan0.
> I think you can start mac80211_hwsim with support_p2p_device=1 and run
> only ibss_5ghz to reproduce this problem.
>
> For sure my patch fix this issue and each interface get REGODOM -CHANGE.
> In my case p2p-dev-wlan0 and wlan0.
> But I am not sure if this will not introduce some other issue. So
> clarification is required here, how should we handle events when
> ifidx==-1 and wdev_id is not set. If we should send such event to all
> interfaces, then my patch do exactly that.
>

This is test with hwsim:

janusz at dell:~/work/hostap/tests/hwsim$ git diff
diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh
index a2885e4..c0d1366 100755
--- a/tests/hwsim/start.sh
+++ b/tests/hwsim/start.sh
@@ -100,7 +100,7 @@ else
        NUM_CH=1
 fi

-test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7
channels=$NUM_CH support_p2p_device=0
+test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7
channels=$NUM_CH support_p2p_device=1

 sudo ifconfig hwsim0 up
 sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dtN -L $LOGDIR/hwsim0 &


janusz at dell:~/work/hostap/tests/hwsim$ sudo ./run-tests.py ibss_5ghz
DEV: wlan0: 42:00:00:00:00:00
DEV: wlan1: 42:00:00:00:01:00
DEV: wlan2: 42:00:00:00:02:00
APDEV: wlan3
APDEV: wlan4
START ibss_5ghz 1/1
FAIL ibss_5ghz 5.19917 2016-04-02 19:13:49.208650

And error: No regdom change event

You didn't hit this problem because support_p2p_device=0 by default in
hwsim. In case of remote test case I have different drivers in the
stack (intel7260, ath10k, ath9k) and in case of remote tests and hwsim
I always load mac80211_hwsim by hand (seems p2p_dev support is enabled
by default).

BR
Janusz

> BR
> Janusz
>>> Now, seems we pass test where we wait for REGDOM event
>>> janusz at dell6430:/home/work/hostap/tests/remote$ ./run-tests.py -r hwsim0 -r hwsim1 -r hwsim2 -d hwsim3 -d hwsim4 -h ibss_5ghz
>>
>> tests/remote does not exist in hostap.git, so it is a bit difficult to
>> understand this type of comments before either the changes have been
>> added for that or the commit message is clearer on what exactly is being
>> fixed if the same issue cannot be reproduced in the current hostap.git
>> snapshot.
>>
>> --
>> Jouni Malinen                                            PGP id EFC895FA
>>
>> _______________________________________________
>> Hostap mailing list
>> Hostap at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/hostap
>
>
>
> --
> Janusz Dziedzic



-- 
Janusz Dziedzic
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ibss_5ghz.log
Type: text/x-log
Size: 5781 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/hostap/attachments/20160402/07072a0c/attachment-0001.bin>


More information about the Hostap mailing list