UPSTREAM: mwifiex: update set_mac_address logic

In set_mac_address, driver check for interfaces with same bss_type
For first STA entry, this would return 3 interfaces since all priv's have
bss_type as 0 due to kzalloc. Thus mac address gets changed for STA
unexpected. This patch adds check for first STA and avoids mac address
change. This patch also adds mac_address change for p2p based on bss_num
type.

Signed-off-by: Sharvari Harisangam <sharvari@marvell.com>
Signed-off-by: Ganapathi Bhat <gbhat@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 7afb94da3cd8a28ed7ae268143117bf1ac8a3371)

BUG=chromium:1031778
TEST=`modprobe mwifiex debug_mask=0x40000007`, start up WiFi, watch MAC
     address (e.g., from `iw dev`) match the logs (e.g., "mwifiex_sdio
     mmc1:0001:1: info: GET_HW_SPEC: permanent addr 40:e2:30:XX:XX:XX")

Change-Id: Ic8c39ec0a2ae27560eca38d9c3aff88d5ade41c6
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1959446
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Commit-Queue: Douglas Anderson <dianders@chromium.org>
1 file changed