Search Linux Wireless

Re: [PATCH] wifi: rtw88: assign mac_id for vif/sta and update to TX desc

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

 



On 19/08/2024 05:52, Ping-Ke Shih wrote:
> A mac_id as an instance in firmware has to be assigned for each station
> including AP and connected stations. Firmware will use the mac_id to
> control TX rate and do statistics.
> 
> Assignment rule is to assign mac_id to each vif when adding vif.
> For station mode, sta->mac_id will reuse vif->mac_id. For AP mode,
> dynamically allocate an sta->mac_id to a station, and vif->mac_id is
> used to send broadcast/multicast packets which are not belong to
> a station. For example,
> 
>                   vif->mac_id      sta->mac_id
> vif0 (STA mode)        0               0
> vif1 (AP mode)         1               2...
> 
> By the way, remove unused RTW_BC_MC_MACID, which was planed to send
> broadcast/multicast packets on fixed mac_id.
> 

I tested this with RTL8822CE in AP mode with a single vif. It says:

Aug 19 21:32:47 ideapad2 kernel: rtw_8822ce 0000:02:00.0: change vif 00:45:e2:a1:65:ab (2)->(3), p2p (0)->(0)
Aug 19 21:32:47 ideapad2 kernel: rtw_8822ce 0000:02:00.0: stop vif 00:45:e2:a1:65:ab mac_id 0 on port 0
Aug 19 21:32:47 ideapad2 kernel: rtw_8822ce 0000:02:00.0: start vif 00:45:e2:a1:65:ab mac_id 0 on port 0
Aug 19 21:33:54 ideapad2 kernel: rtw_8822ce 0000:02:00.0: sta b6:bd:3c:c0:39:87 joined with macid 1

Then I added another vif:

# iw dev wlp2s0 interface add my_interface type managed

Aug 19 21:36:45 ideapad2 kernel: rtw_8822ce 0000:02:00.0: start vif 3e:60:cc:0b:fa:17 mac_id 2 on port 1

So in this case the AP vif's rtwvif->mac_id is 0, and the first
station gets 1. The managed vif's rtwvif->mac_id is 2. Is it okay
if the numbers are not assigned like in your example?




[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