All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface
@ 2014-09-23  9:52 Arend van Spriel
  2014-09-23 13:22 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2014-09-23  9:52 UTC (permalink / raw)
  To: stable; +Cc: linux-wireless, Arend van Spriel, John W. Linville

upstream: 87c4790330810fe5caf0172d9320cf24ef19cebe

The firmware notifies about interface changes through the IF event
which has a NO_IF flag that means host can ignore the event. This
behaviour was introduced in the driver by:

  commit 2ee8382fc6c763c76396a6aaff77a27089eed3aa
  Author: Arend van Spriel <arend@broadcom.com>
  Date:   Sat Aug 10 12:27:24 2013 +0200

      brcmfmac: ignore IF event if firmware indicates it

It turns out that the IF event for the P2P_DEVICE also has this
flag set, but the event should not be ignored in this scenario.
The mentioned commit caused a regression in 3.12 kernel in creation
of the P2P_DEVICE interface.

Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/fweh.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c
index fad77dd..3f9cb89 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fweh.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fweh.c
@@ -185,7 +185,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
 		  ifevent->action, ifevent->ifidx, ifevent->bssidx,
 		  ifevent->flags, ifevent->role);
 
-	if (ifevent->flags & BRCMF_E_IF_FLAG_NOIF) {
+	/* The P2P Device interface event must not be ignored
+	 * contrary to what firmware tells us. The only way to
+	 * distinguish the P2P Device is by looking at the ifidx
+	 * and bssidx received.
+	 */
+	if (!(ifevent->ifidx == 0 && ifevent->bssidx == 1) &&
+	    (ifevent->flags & BRCMF_E_IF_FLAG_NOIF)) {
 		brcmf_dbg(EVENT, "event can be ignored\n");
 		return;
 	}
@@ -210,12 +216,12 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
 				return;
 	}
 
-	if (ifevent->action == BRCMF_E_IF_CHANGE)
+	if (ifp && ifevent->action == BRCMF_E_IF_CHANGE)
 		brcmf_fws_reset_interface(ifp);
 
 	err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data);
 
-	if (ifevent->action == BRCMF_E_IF_DEL) {
+	if (ifp && ifevent->action == BRCMF_E_IF_DEL) {
 		brcmf_fws_del_interface(ifp);
 		brcmf_del_if(drvr, ifevent->bssidx);
 	}
-- 
1.9.1


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

* Re: [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface
  2014-09-23  9:52 [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface Arend van Spriel
@ 2014-09-23 13:22 ` Greg KH
  2014-09-23 13:42   ` Arend van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-09-23 13:22 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: stable, linux-wireless, John W. Linville

On Tue, Sep 23, 2014 at 11:52:26AM +0200, Arend van Spriel wrote:
> upstream: 87c4790330810fe5caf0172d9320cf24ef19cebe

That commit id doesn't match anything in Linus's tree :(


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

* Re: [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface
  2014-09-23 13:22 ` Greg KH
@ 2014-09-23 13:42   ` Arend van Spriel
  2014-09-23 13:51     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Arend van Spriel @ 2014-09-23 13:42 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, linux-wireless, John W. Linville

On 09/23/14 15:22, Greg KH wrote:
> On Tue, Sep 23, 2014 at 11:52:26AM +0200, Arend van Spriel wrote:
>> upstream: 87c4790330810fe5caf0172d9320cf24ef19cebe
>
> That commit id doesn't match anything in Linus's tree :(
>

Hmmm, that is weird:

[arend@lb-bun-235 ~/scm/brcm80211-next]
$ git remote show torvalds
* remote torvalds
   Fetch URL: 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
   Push  URL: 
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
   HEAD branch: master
   Remote branch:
     master tracked
[arend@lb-bun-235 ~/scm/brcm80211-next]
$ git log torvalds/master --oneline -8 -- drivers/net/wireless/brcm80211
*87c4790 brcmfmac: handle IF event for P2P_DEVICE interface*
8f2b459 brcmfmac: obtain ifp through wdev structure
f1d5603 brcmfmac: conditionally compile firmware protocol source code
fac7d2a brcmfmac: Fix memory leak and missing assignment.
2d116b88 brcmfmac: fix memory leakage in msgbuf
ebcc2f5 brcmfmac: fix curly brace mistake in brcmf_pcie_handle_mb_data()
aef4f5b Merge tag 'master-2014-07-31' of 
git://git.kernel.org/pub/scm/linux/kern
70b7d94 brcmfmac: Add TDLS support to msgbuf.

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

* Re: [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface
  2014-09-23 13:42   ` Arend van Spriel
@ 2014-09-23 13:51     ` Greg KH
  2014-09-23 13:55       ` Arend van Spriel
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2014-09-23 13:51 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: stable, linux-wireless, John W. Linville

On Tue, Sep 23, 2014 at 03:42:42PM +0200, Arend van Spriel wrote:
> On 09/23/14 15:22, Greg KH wrote:
> >On Tue, Sep 23, 2014 at 11:52:26AM +0200, Arend van Spriel wrote:
> >>upstream: 87c4790330810fe5caf0172d9320cf24ef19cebe
> >
> >That commit id doesn't match anything in Linus's tree :(
> >
> 
> Hmmm, that is weird:
> 
> [arend@lb-bun-235 ~/scm/brcm80211-next]
> $ git remote show torvalds
> * remote torvalds
>   Fetch URL:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>   Push  URL:
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>   HEAD branch: master
>   Remote branch:
>     master tracked
> [arend@lb-bun-235 ~/scm/brcm80211-next]
> $ git log torvalds/master --oneline -8 -- drivers/net/wireless/brcm80211
> *87c4790 brcmfmac: handle IF event for P2P_DEVICE interface*
> 8f2b459 brcmfmac: obtain ifp through wdev structure
> f1d5603 brcmfmac: conditionally compile firmware protocol source code
> fac7d2a brcmfmac: Fix memory leak and missing assignment.
> 2d116b88 brcmfmac: fix memory leakage in msgbuf
> ebcc2f5 brcmfmac: fix curly brace mistake in brcmf_pcie_handle_mb_data()
> aef4f5b Merge tag 'master-2014-07-31' of
> git://git.kernel.org/pub/scm/linux/kern
> 70b7d94 brcmfmac: Add TDLS support to msgbuf.

Ah, it just went in, sorry for the noise.

But it _just_ went in, why are you emailing this?  We have to wait for a
-rc release to come out with the patch before being able to add it to
the tree.

thanks,

greg k-h

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

* Re: [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface
  2014-09-23 13:51     ` Greg KH
@ 2014-09-23 13:55       ` Arend van Spriel
  0 siblings, 0 replies; 5+ messages in thread
From: Arend van Spriel @ 2014-09-23 13:55 UTC (permalink / raw)
  To: Greg KH; +Cc: stable, linux-wireless, John W. Linville

On 09/23/14 15:51, Greg KH wrote:
> On Tue, Sep 23, 2014 at 03:42:42PM +0200, Arend van Spriel wrote:
>> On 09/23/14 15:22, Greg KH wrote:
>>> On Tue, Sep 23, 2014 at 11:52:26AM +0200, Arend van Spriel wrote:
>>>> upstream: 87c4790330810fe5caf0172d9320cf24ef19cebe
>>>
>>> That commit id doesn't match anything in Linus's tree :(
>>>
>>
>> Hmmm, that is weird:
>>
>> [arend@lb-bun-235 ~/scm/brcm80211-next]
>> $ git remote show torvalds
>> * remote torvalds
>>    Fetch URL:
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>    Push  URL:
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>    HEAD branch: master
>>    Remote branch:
>>      master tracked
>> [arend@lb-bun-235 ~/scm/brcm80211-next]
>> $ git log torvalds/master --oneline -8 -- drivers/net/wireless/brcm80211
>> *87c4790 brcmfmac: handle IF event for P2P_DEVICE interface*
>> 8f2b459 brcmfmac: obtain ifp through wdev structure
>> f1d5603 brcmfmac: conditionally compile firmware protocol source code
>> fac7d2a brcmfmac: Fix memory leak and missing assignment.
>> 2d116b88 brcmfmac: fix memory leakage in msgbuf
>> ebcc2f5 brcmfmac: fix curly brace mistake in brcmf_pcie_handle_mb_data()
>> aef4f5b Merge tag 'master-2014-07-31' of
>> git://git.kernel.org/pub/scm/linux/kern
>> 70b7d94 brcmfmac: Add TDLS support to msgbuf.
>
> Ah, it just went in, sorry for the noise.
>
> But it _just_ went in, why are you emailing this?  We have to wait for a
> -rc release to come out with the patch before being able to add it to
> the tree.

Noted. Did not find that nitty gritty detail in stable_kernel_rules.txt, 
but I just might create a patch for that if I can beat my writers block ;-)

Gr. AvS

> thanks,
>
> greg k-h


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

end of thread, other threads:[~2014-09-23 13:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-23  9:52 [PATCH for-3.12] brcmfmac: handle IF event for P2P_DEVICE interface Arend van Spriel
2014-09-23 13:22 ` Greg KH
2014-09-23 13:42   ` Arend van Spriel
2014-09-23 13:51     ` Greg KH
2014-09-23 13:55       ` Arend van Spriel

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.