Re: [PATCH] wpa_supplicant: send event to all interfaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-04-02 18:56 GMT+02:00 Janusz Dziedzic <janusz.dziedzic@xxxxxxxxx>:
> =
>
> 2016-04-02 12:30 GMT+02:00 Jouni Malinen <j@xxxxx>:
>> 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@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@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@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@xxxxxxxxxxxxxxxxxxx
>> http://lists.infradead.org/mailman/listinfo/hostap
>
>
>
> --
> Janusz Dziedzic



-- 
Janusz Dziedzic
2016-04-02 19:13:44,009 INFO START ibss_5ghz 1/1
2016-04-02 19:13:44,009 INFO Test: IBSS on 5 GHz band
2016-04-02 19:13:44,009 DEBUG wlan0: CTRL: PING
2016-04-02 19:13:44,009 DEBUG wlan0: CTRL(global): PING
2016-04-02 19:13:44,009 DEBUG wlan0: CTRL: NOTE TEST-START ibss_5ghz
2016-04-02 19:13:44,010 DEBUG wlan1: CTRL: PING
2016-04-02 19:13:44,010 DEBUG wlan1: CTRL(global): PING
2016-04-02 19:13:44,010 DEBUG wlan1: CTRL: NOTE TEST-START ibss_5ghz
2016-04-02 19:13:44,010 DEBUG wlan2: CTRL: PING
2016-04-02 19:13:44,010 DEBUG wlan2: CTRL(global): PING
2016-04-02 19:13:44,011 DEBUG wlan2: CTRL: NOTE TEST-START ibss_5ghz
2016-04-02 19:13:44,011 DEBUG execute: iw reg set US
2016-04-02 19:13:44,021 DEBUG status: 0
2016-04-02 19:13:44,022 DEBUG buf: 
2016-04-02 19:13:49,027 DEBUG execute: iw reg set 00
2016-04-02 19:13:49,035 DEBUG status: 0
2016-04-02 19:13:49,035 DEBUG buf: 
2016-04-02 19:13:49,035 DEBUG execute: iw reg set 00
2016-04-02 19:13:49,051 DEBUG status: 0
2016-04-02 19:13:49,051 DEBUG buf: 
2016-04-02 19:13:49,051 DEBUG wlan0: CTRL: BSS_FLUSH 0
2016-04-02 19:13:49,052 DEBUG wlan0(global): IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
2016-04-02 19:13:49,052 DEBUG wlan0(global): IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=WORLD
2016-04-02 19:13:49,052 DEBUG wlan0: CTRL: SCAN freq=2417 only_new=1
2016-04-02 19:13:49,053 DEBUG wlan0: <3>CTRL-EVENT-SCAN-STARTED 
2016-04-02 19:13:49,109 DEBUG wlan0: <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,109 DEBUG wlan0: CTRL: SCAN_RESULTS
2016-04-02 19:13:49,110 DEBUG wlan1: CTRL: BSS_FLUSH 0
2016-04-02 19:13:49,110 DEBUG wlan1(global): IFNAME=p2p-dev-wlan1 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
2016-04-02 19:13:49,111 DEBUG wlan1(global): IFNAME=p2p-dev-wlan1 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=WORLD
2016-04-02 19:13:49,111 DEBUG wlan1: CTRL: SCAN freq=2417 only_new=1
2016-04-02 19:13:49,114 DEBUG wlan1: <3>CTRL-EVENT-SCAN-STARTED 
2016-04-02 19:13:49,168 DEBUG wlan1: <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,169 DEBUG wlan1: CTRL: SCAN_RESULTS
2016-04-02 19:13:49,170 INFO No regdom change event
2016-04-02 19:13:49,170 DEBUG wlan0: <3>CTRL-EVENT-NETWORK-NOT-FOUND 
2016-04-02 19:13:49,170 DEBUG wlan0(global): IFNAME=wlan0 <3>CTRL-EVENT-SCAN-STARTED 
2016-04-02 19:13:49,171 DEBUG wlan0(global): IFNAME=wlan0 <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,171 DEBUG wlan0(global): IFNAME=wlan0 <3>CTRL-EVENT-NETWORK-NOT-FOUND 
2016-04-02 19:13:49,171 DEBUG wlan0(global): IFNAME=p2p-dev-wlan0 <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,171 DEBUG wlan0: CTRL: NOTE TEST-STOP ibss_5ghz
2016-04-02 19:13:49,172 DEBUG wlan1: <3>CTRL-EVENT-NETWORK-NOT-FOUND 
2016-04-02 19:13:49,172 DEBUG wlan1(global): IFNAME=wlan1 <3>CTRL-EVENT-SCAN-STARTED 
2016-04-02 19:13:49,172 DEBUG wlan1(global): IFNAME=wlan1 <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,172 DEBUG wlan1(global): IFNAME=wlan1 <3>CTRL-EVENT-NETWORK-NOT-FOUND 
2016-04-02 19:13:49,173 DEBUG wlan1(global): IFNAME=p2p-dev-wlan1 <3>CTRL-EVENT-SCAN-RESULTS 
2016-04-02 19:13:49,173 DEBUG wlan1: CTRL: NOTE TEST-STOP ibss_5ghz
2016-04-02 19:13:49,173 DEBUG wlan2(global): IFNAME=p2p-dev-wlan2 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=US
2016-04-02 19:13:49,174 DEBUG wlan2(global): IFNAME=p2p-dev-wlan2 <3>CTRL-EVENT-REGDOM-CHANGE init=USER type=WORLD
2016-04-02 19:13:49,174 DEBUG wlan2: CTRL: NOTE TEST-STOP ibss_5ghz
2016-04-02 19:13:49,176 DEBUG /tmp/wpas-wlan5: CTRL(global): RELOG
2016-04-02 19:13:49,181 DEBUG wlan0: CTRL: FLUSH
2016-04-02 19:13:49,182 DEBUG wlan0: CTRL(global): REMOVE_NETWORK all
2016-04-02 19:13:49,182 DEBUG wlan0: CTRL(global): SET p2p_no_group_iface 1
2016-04-02 19:13:49,183 DEBUG wlan0: CTRL(global): P2P_FLUSH
2016-04-02 19:13:49,184 DEBUG wlan0: CTRL: STATUS-DRIVER
2016-04-02 19:13:49,184 DEBUG wlan0: CTRL(global): IFNAME=p2p-dev-wlan0 STATUS-DRIVER
2016-04-02 19:13:49,184 DEBUG wlan0: CTRL: PING
2016-04-02 19:13:49,184 DEBUG wlan1: CTRL: FLUSH
2016-04-02 19:13:49,186 DEBUG wlan1: CTRL(global): REMOVE_NETWORK all
2016-04-02 19:13:49,186 DEBUG wlan1: CTRL(global): SET p2p_no_group_iface 1
2016-04-02 19:13:49,186 DEBUG wlan1: CTRL(global): P2P_FLUSH
2016-04-02 19:13:49,187 DEBUG wlan1: CTRL: STATUS-DRIVER
2016-04-02 19:13:49,187 DEBUG wlan1: CTRL(global): IFNAME=p2p-dev-wlan1 STATUS-DRIVER
2016-04-02 19:13:49,187 DEBUG wlan1: CTRL: PING
2016-04-02 19:13:49,187 DEBUG wlan2: CTRL: FLUSH
2016-04-02 19:13:49,188 DEBUG wlan2: CTRL(global): REMOVE_NETWORK all
2016-04-02 19:13:49,188 DEBUG wlan2: CTRL(global): SET p2p_no_group_iface 1
2016-04-02 19:13:49,188 DEBUG wlan2: CTRL(global): P2P_FLUSH
2016-04-02 19:13:49,189 DEBUG wlan2: CTRL: STATUS-DRIVER
2016-04-02 19:13:49,189 DEBUG wlan2: CTRL(global): IFNAME=p2p-dev-wlan2 STATUS-DRIVER
2016-04-02 19:13:49,189 DEBUG wlan2: CTRL: PING
2016-04-02 19:13:49,189 DEBUG /tmp/wpas-wlan5: CTRL(global): INTERFACES
2016-04-02 19:13:49,190 DEBUG : CTRL(global): FLUSH
2016-04-02 19:13:49,190 DEBUG : CTRL(global): REMOVE wlan3-3
2016-04-02 19:13:49,190 DEBUG : CTRL(global): REMOVE wlan3-2
2016-04-02 19:13:49,190 DEBUG : CTRL(global): REMOVE wlan3
2016-04-02 19:13:49,190 DEBUG : CTRL(global): REMOVE wlan4
2016-04-02 19:13:49,190 DEBUG wlan0: CTRL(global): RELOG
2016-04-02 19:13:49,194 DEBUG wlan1: CTRL(global): RELOG
2016-04-02 19:13:49,197 DEBUG wlan2: CTRL(global): RELOG
2016-04-02 19:13:49,203 DEBUG : CTRL(global): RELOG
2016-04-02 19:13:49,207 INFO Failed to rename log files
2016-04-02 19:13:49,208 INFO [Errno 2] No such file or directory
2016-04-02 19:13:49,208 INFO Failed to rename log files
2016-04-02 19:13:49,208 INFO [Errno 2] No such file or directory
2016-04-02 19:13:49,208 INFO FAIL ibss_5ghz 5.19917 2016-04-02 19:13:49.208650
_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap

[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux