All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/11] mwifiex: update set_mac_address logic
@ 2019-06-12 15:12 Ganapathi Bhat
  2019-06-12 15:18 ` Ganapathi Bhat
  2019-06-25  4:47 ` Kalle Valo
  0 siblings, 2 replies; 5+ messages in thread
From: Ganapathi Bhat @ 2019-06-12 15:12 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Zhiyuan Yang, James Cao, Rakesh Parmar,
	Sharvari Harisangam, Ganapathi Bhat

From: Sharvari Harisangam <sharvari@marvell.com>

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>
---
 drivers/net/wireless/marvell/mwifiex/main.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index 5ed2d9b..4eabd94 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -965,10 +965,10 @@ int mwifiex_set_mac_address(struct mwifiex_private *priv,
 
 		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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* RE: [PATCH 09/11] mwifiex: update set_mac_address logic
  2019-06-12 15:12 [PATCH 09/11] mwifiex: update set_mac_address logic Ganapathi Bhat
@ 2019-06-12 15:18 ` Ganapathi Bhat
  2019-06-20  8:08   ` Kalle Valo
  2019-06-25  4:47 ` Kalle Valo
  1 sibling, 1 reply; 5+ messages in thread
From: Ganapathi Bhat @ 2019-06-12 15:18 UTC (permalink / raw)
  To: linux-wireless
  Cc: Cathy Luo, Zhiyuan Yang, James Cao, Rakesh Parmar, Sharvari Harisangam

Hi Kalle,

This change is correct one, but I missed changing the .patch file name before sending. Let me know if this needs to be resend.

Regards,
Ganapathi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 09/11] mwifiex: update set_mac_address logic
  2019-06-12 15:18 ` Ganapathi Bhat
@ 2019-06-20  8:08   ` Kalle Valo
  2019-06-20  8:18     ` Ganapathi Bhat
  0 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2019-06-20  8:08 UTC (permalink / raw)
  To: Ganapathi Bhat
  Cc: linux-wireless, Cathy Luo, Zhiyuan Yang, James Cao,
	Rakesh Parmar, Sharvari Harisangam

Ganapathi Bhat <gbhat@marvell.com> writes:

> This change is correct one, but I missed changing the .patch file name before sending. Let me know if this needs to be resend.

I don't understand your comment. Are you saying that even if this is
marked as "9/11" this was supposed to submitted as a single patch? If
that's the case, no need to resend.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: [PATCH 09/11] mwifiex: update set_mac_address logic
  2019-06-20  8:08   ` Kalle Valo
@ 2019-06-20  8:18     ` Ganapathi Bhat
  0 siblings, 0 replies; 5+ messages in thread
From: Ganapathi Bhat @ 2019-06-20  8:18 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-wireless, Cathy Luo, Zhiyuan Yang, James Cao,
	Rakesh Parmar, Sharvari Harisangam

Hi Kalle,

> I don't understand your comment. Are you saying that even if this is marked
> as "9/11" this was supposed to submitted as a single patch? If that's the case,
> no need to resend.


Yes; That is the case;

Thanks,
Ganapathi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 09/11] mwifiex: update set_mac_address logic
  2019-06-12 15:12 [PATCH 09/11] mwifiex: update set_mac_address logic Ganapathi Bhat
  2019-06-12 15:18 ` Ganapathi Bhat
@ 2019-06-25  4:47 ` Kalle Valo
  1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2019-06-25  4:47 UTC (permalink / raw)
  To: Ganapathi Bhat
  Cc: linux-wireless, Cathy Luo, Zhiyuan Yang, James Cao,
	Rakesh Parmar, Sharvari Harisangam, Ganapathi Bhat

Ganapathi Bhat <gbhat@marvell.com> wrote:

> From: Sharvari Harisangam <sharvari@marvell.com>
> 
> 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>

Patch applied to wireless-drivers-next.git, thanks.

7afb94da3cd8 mwifiex: update set_mac_address logic

-- 
https://patchwork.kernel.org/patch/10990209/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-06-25  4:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 15:12 [PATCH 09/11] mwifiex: update set_mac_address logic Ganapathi Bhat
2019-06-12 15:18 ` Ganapathi Bhat
2019-06-20  8:08   ` Kalle Valo
2019-06-20  8:18     ` Ganapathi Bhat
2019-06-25  4:47 ` Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.