Search Linux Wireless

Re: [PATCH 2/5] mt76x02: initalize mutli bss mode by default

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

 



On Fri, Nov 09, 2018 at 12:26:51PM +0100, Lorenzo Bianconi wrote:
> > @@ -52,9 +52,6 @@ static int mt76x2u_add_interface(struct ieee80211_hw *hw,
> >  	struct mt76x02_dev *dev = hw->priv;
> >  	unsigned int idx = 8;
> >  
> > -	if (!ether_addr_equal(dev->mt76.macaddr, vif->addr))
> > -		mt76x02_mac_setaddr(dev, vif->addr);
> > -
> 
> I think this is a regression since you will able to change device mac address
> in this way. Do you agree?

I don't think it works currently, because we have already created
vif interface when set mac address via ieee80211_change_mac().

The only thing, I suppose could work is set MAC, del vif and
add vif. But this does not seems to work either , below is
example from unpached kernel:

[root@dhcp-27-155 ~]# iw dev
phy#1
	Interface wlan1
		ifindex 10
		wdev 0x100000001
		addr 2c:4d:54:cb:d8:04
		type managed
[root@dhcp-27-155 ~]# ip link set addres  b0:6e:bf:a5:31:90  wlan1
[root@dhcp-27-155 ~]# iw dev wlan1 del
[root@dhcp-27-155 ~]# iw phy phy0 interface  add wlan0 type station
command failed: No such file or directory (-2)
[root@dhcp-27-155 ~]# iw phy phy1 interface  add wlan0 type station
[root@dhcp-27-155 ~]# iw dev 
phy#1
	Interface wlan0
		ifindex 11
		wdev 0x100000002
		addr 2c:4d:54:cb:d8:04
		type managed
[root@dhcp-27-155 ~]# ethtool -i wlan0
driver: mt76x2u
version: 4.20.0-rc1+
firmware-version: 0.0.00-b1
bus-info: 1-1.2:1.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: no
supports-priv-flags: no

Anyway I think, to support MAC address change, we should not filter
based on MAC address, but maybe only on BSSID ? 

Thanks
Stanislaw



[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