ath9k: fix sta initialization bug leading to stability issues
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 319-0002-brcmfmac-use-const-char-for-interface-name-in-brcmf_.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <zajec5@gmail.com>
2 Date: Fri, 17 Jun 2016 12:48:44 +0200
3 Subject: [PATCH] brcmfmac: use const char * for interface name in
4 brcmf_add_if
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This function can work just fine with const pointer, it only calls
10 alloc_netdev which take const as well. Moreover it makes this function
11 more flexible as some cfg80211 callback may provide const char * as
12 well, e.g. add_virtual_intf. This will be needed for more advanced
13 interface management.
14
15 Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
16 Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
17 ---
18
19 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
20 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
21 @@ -638,7 +638,7 @@ fail:
22 }
23
24 struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
25 - bool is_p2pdev, char *name, u8 *mac_addr)
26 + bool is_p2pdev, const char *name, u8 *mac_addr)
27 {
28 struct brcmf_if *ifp;
29 struct net_device *ndev;
30 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
31 +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
32 @@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp)
33 struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
34 int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
35 struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
36 - bool is_p2pdev, char *name, u8 *mac_addr);
37 + bool is_p2pdev, const char *name, u8 *mac_addr);
38 void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);
39 void brcmf_txflowblock_if(struct brcmf_if *ifp,
40 enum brcmf_netif_stop_reason reason, bool state);