From: Greg Kroah-Hartman Date: Tue, 10 Dec 2019 08:23:46 +0000 (+0100) Subject: 4.19-stable patches X-Git-Tag: v5.4.3~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ddda2f0d9902339ab0ca2a342fbb1a3f7161ebbc;p=thirdparty%2Fkernel%2Fstable-queue.git 4.19-stable patches added patches: mwifiex-update-set_mac_address-logic.patch --- diff --git a/queue-4.19/mwifiex-update-set_mac_address-logic.patch b/queue-4.19/mwifiex-update-set_mac_address-logic.patch new file mode 100644 index 00000000000..95f9b5c5225 --- /dev/null +++ b/queue-4.19/mwifiex-update-set_mac_address-logic.patch @@ -0,0 +1,42 @@ +From 7afb94da3cd8a28ed7ae268143117bf1ac8a3371 Mon Sep 17 00:00:00 2001 +From: Sharvari Harisangam +Date: Wed, 12 Jun 2019 20:42:11 +0530 +Subject: mwifiex: update set_mac_address logic + +From: Sharvari Harisangam + +commit 7afb94da3cd8a28ed7ae268143117bf1ac8a3371 upstream. + +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 +Signed-off-by: Ganapathi Bhat +Signed-off-by: Kalle Valo +Cc: Brian Norris +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/marvell/mwifiex/main.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/net/wireless/marvell/mwifiex/main.c ++++ b/drivers/net/wireless/marvell/mwifiex/main.c +@@ -960,10 +960,10 @@ int mwifiex_set_mac_address(struct mwifi + + mac_addr = old_mac_addr; + +- if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P) ++ if (priv->bss_type == MWIFIEX_BSS_TYPE_P2P) { + mac_addr |= BIT_ULL(MWIFIEX_MAC_LOCAL_ADMIN_BIT); +- +- if (mwifiex_get_intf_num(priv->adapter, priv->bss_type) > 1) { ++ mac_addr += priv->bss_num; ++ } else if (priv->adapter->priv[0] != priv) { + /* Set mac address based on bss_type/bss_num */ + mac_addr ^= BIT_ULL(priv->bss_type + 8); + mac_addr += priv->bss_num; diff --git a/queue-4.19/series b/queue-4.19/series index 870b9db5607..e1d85d0ee44 100644 --- a/queue-4.19/series +++ b/queue-4.19/series @@ -238,3 +238,4 @@ crypto-ccp-fix-uninitialized-list-head.patch crypto-ecdh-fix-big-endian-bug-in-ecc-library.patch crypto-user-fix-memory-leak-in-crypto_report.patch spi-atmel-fix-cs-high-support.patch +mwifiex-update-set_mac_address-logic.patch