Search Linux Wireless

Re: NL80211_SCAN_FLAG_RANDOM_ADDR ?

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

 



On 4/11/19 3:30 PM, Denis Kenzior wrote:
Hi,

I've been poking around at how this flag is used and I noticed this check in net/wireless/nl80211.c:

nl80211_check_scan_flags()

         if (*flags & NL80211_SCAN_FLAG_RANDOM_ADDR) {
                 int err;

                 if (!(wiphy->features & randomness_flag) ||
                     (wdev && wdev->current_bss))
                         return -EOPNOTSUPP;


The above disallows the use of RANDOM_ADDR for scans while connected. The nl80211.h uapi header seems to concur:

  "@NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR: This device/driver supports using a random MAC address during scan (if the device is unassociated);"

However, if I create a P2P Device (in addition to the default STA device), the kernel happily lets me scan on the wdev while the STA interface is connected.

sudo iw phy0 interface add p2p type __p2pdev
sudo iw wdev 0x2 p2p start
sudo iw wdev 0x2 scan randomize

So the immediate question I have is, should the RANDOM_ADDR flag indeed be limited to unassociated STA interfaces?  It would seem the hardware is capable randomizing even when connected? Please educate me :)

You can be sure that each driver/hardware has its own bugs and limitations related to this.

Ath10k wave 1 and wave 2 that I am aware of would ignore and/or not ACK probe responses
sent back to an MAC address that is not that of the station itself.  And changing the mac of a station
would require complete re-association AFAIK.  That is likely just one of the many issues.

Thanks,
Ben


--
Ben Greear <greearb@xxxxxxxxxxxxxxx>
Candela Technologies Inc  http://www.candelatech.com




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux