summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorXinming Hu <huxm@marvell.com>2018-04-25 17:38:14 +0800
committerKalle Valo <kvalo@codeaurora.org>2018-04-30 13:23:44 +0300
commit7cce13954f0e6b16b4c18a3985387018f2e3e44e (patch)
tree1a3dbd5a9ea31dc472f171739f11066fed5f60c4 /drivers
parentc3b2a34b82db21bf46e00fbfa1b3c3ccaa0ec18f (diff)
mwifiex: keep user configured mac address during changing virtual interface
During changing virtual interface, keep using previous net device mac address. Signed-off-by: Xinming Hu <huxm@marvell.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/marvell/mwifiex/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 40c80e38a74b..510f6b8e717d 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1333,7 +1333,10 @@ void mwifiex_init_priv_params(struct mwifiex_private *priv,
priv->assocresp_idx = MWIFIEX_AUTO_IDX_MASK;
priv->gen_idx = MWIFIEX_AUTO_IDX_MASK;
priv->num_tx_timeout = 0;
- ether_addr_copy(priv->curr_addr, priv->adapter->perm_addr);
+ if (is_valid_ether_addr(dev->dev_addr))
+ ether_addr_copy(priv->curr_addr, dev->dev_addr);
+ else
+ ether_addr_copy(priv->curr_addr, priv->adapter->perm_addr);
if (GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA ||
GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) {