-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mac80211: brcmfmac: backport changes from 2016-06-29
Signed-off-by: Rafał Miłecki <[email protected]> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49393 3c298f89-4303-0410-b956-a3cf2f4a3e73
- Loading branch information
rmilecki
committed
Jun 29, 2016
1 parent
b8db33b
commit 095fabb
Showing
3 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...rnel/mac80211/patches/351-0021-brcmfmac-use-const-char-for-interface-name-in-brcmf_.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]> | ||
Date: Fri, 17 Jun 2016 12:48:44 +0200 | ||
Subject: [PATCH] brcmfmac: use const char * for interface name in brcmf_add_if | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
This function can work just fine with const pointer, it only calls | ||
alloc_netdev which take const as well. Moreover it makes this function | ||
more flexible as some cfg80211 callback may provide const char * as | ||
well, e.g. add_virtual_intf. This will be needed for more advanced | ||
interface management. | ||
|
||
Signed-off-by: Rafał Miłecki <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
--- | ||
|
||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | ||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | ||
@@ -638,7 +638,7 @@ fail: | ||
} | ||
|
||
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, | ||
- bool is_p2pdev, char *name, u8 *mac_addr) | ||
+ bool is_p2pdev, const char *name, u8 *mac_addr) | ||
{ | ||
struct brcmf_if *ifp; | ||
struct net_device *ndev; | ||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | ||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h | ||
@@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp) | ||
struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx); | ||
int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked); | ||
struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx, | ||
- bool is_p2pdev, char *name, u8 *mac_addr); | ||
+ bool is_p2pdev, const char *name, u8 *mac_addr); | ||
void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked); | ||
void brcmf_txflowblock_if(struct brcmf_if *ifp, | ||
enum brcmf_netif_stop_reason reason, bool state); |
33 changes: 33 additions & 0 deletions
33
.../kernel/mac80211/patches/351-0022-brcmfmac-include-also-core.h-header-in-cfg80211.h.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]> | ||
Date: Sat, 18 Jun 2016 18:49:38 +0200 | ||
Subject: [PATCH] brcmfmac: include also core.h header in cfg80211.h | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
This header provides two inline functions using struct brcmf_if so we | ||
need core.h to avoid: | ||
|
||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h: In function ‘ndev_to_prof’: | ||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h:368:13: error: dereferencing pointer to incomplete type | ||
return &ifp->vif->profile; | ||
^ | ||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h: In function ‘ndev_to_vif’: | ||
drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h:374:12: error: dereferencing pointer to incomplete type | ||
return ifp->vif; | ||
^ | ||
|
||
Signed-off-by: Rafał Miłecki <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
--- | ||
|
||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | ||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.h | ||
@@ -20,6 +20,7 @@ | ||
/* for brcmu_d11inf */ | ||
#include <brcmu_d11.h> | ||
|
||
+#include "core.h" | ||
#include "fwil_types.h" | ||
#include "p2p.h" | ||
|
27 changes: 27 additions & 0 deletions
27
...ernel/mac80211/patches/351-0023-brcmfmac-add-missing-break-when-deleting-P2P_DEVICE.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]> | ||
Date: Sun, 19 Jun 2016 01:55:57 +0200 | ||
Subject: [PATCH] brcmfmac: add missing break when deleting P2P_DEVICE | ||
MIME-Version: 1.0 | ||
Content-Type: text/plain; charset=UTF-8 | ||
Content-Transfer-Encoding: 8bit | ||
|
||
We obviously don't want to fall through in that switch. With this change | ||
1) We wait for event (triggered by p2p_disc) as expected | ||
2) We remove interface manually on timeout | ||
3) We return 0 on success instead of -ENOTSUPP | ||
|
||
Signed-off-by: Rafał Miłecki <[email protected]> | ||
Signed-off-by: Kalle Valo <[email protected]> | ||
--- | ||
|
||
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | ||
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c | ||
@@ -2263,6 +2263,8 @@ int brcmf_p2p_del_vif(struct wiphy *wiph | ||
return 0; | ||
brcmf_p2p_cancel_remain_on_channel(vif->ifp); | ||
brcmf_p2p_deinit_discovery(p2p); | ||
+ break; | ||
+ | ||
default: | ||
return -ENOTSUPP; | ||
} |