wifi: ath11k: provide address list if chip supports 2 stations
authorCarl Huang <quic_cjhuang@quicinc.com>
Wed, 14 Feb 2024 08:38:10 +0000 (10:38 +0200)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 15 Feb 2024 11:22:46 +0000 (13:22 +0200)
commit24395ec117076216c78d0874d9d44f62ba1f9747
tree2a96a7fbd5676e633822a6aa9128f0c57c0fadf9
parentf019f4dff2e4cb8704dc608496e3f2829de3e919
wifi: ath11k: provide address list if chip supports 2 stations

Provide address list to mac80211 so user doesn't need to specify addresses when
a second interface is added because the address can be allocated from the list
by mac80211.

The derived addresses have LAA (Local Administered Address) bit set, and only
the first byte is changed. Take the 00:03:7f:xx:xx:xx as example to derive:

addresses[0] is unchanged, it's still 00:03:7f:xx:xx:xx,
addresses[1] is 02:03:7f:xx:xx:xx,
addresses[2] is 12:03:7f:xx:xx:xx,
addresses[3] is 22:03:7f:xx:xx:xx,
addresses[4] is 32:03:7f:xx:xx:xx.

However as only 3 addresses are reported now, so addresses[3] and addresses[4]
aren't actually derived.

Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3

Signed-off-by: Carl Huang <quic_cjhuang@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20230714023801.2621802-3-quic_cjhuang@quicinc.com
drivers/net/wireless/ath/ath11k/mac.c