351-0021-brcmfmac-use-const-char-for-interface-name-in-brcmf_.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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 brcmf_add_if
  4. MIME-Version: 1.0
  5. Content-Type: text/plain; charset=UTF-8
  6. Content-Transfer-Encoding: 8bit
  7. This function can work just fine with const pointer, it only calls
  8. alloc_netdev which take const as well. Moreover it makes this function
  9. more flexible as some cfg80211 callback may provide const char * as
  10. well, e.g. add_virtual_intf. This will be needed for more advanced
  11. interface management.
  12. Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
  13. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  14. ---
  15. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
  16. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
  17. @@ -638,7 +638,7 @@ fail:
  18. }
  19. struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
  20. - bool is_p2pdev, char *name, u8 *mac_addr)
  21. + bool is_p2pdev, const char *name, u8 *mac_addr)
  22. {
  23. struct brcmf_if *ifp;
  24. struct net_device *ndev;
  25. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
  26. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h
  27. @@ -215,7 +215,7 @@ char *brcmf_ifname(struct brcmf_if *ifp)
  28. struct brcmf_if *brcmf_get_ifp(struct brcmf_pub *drvr, int ifidx);
  29. int brcmf_net_attach(struct brcmf_if *ifp, bool rtnl_locked);
  30. struct brcmf_if *brcmf_add_if(struct brcmf_pub *drvr, s32 bsscfgidx, s32 ifidx,
  31. - bool is_p2pdev, char *name, u8 *mac_addr);
  32. + bool is_p2pdev, const char *name, u8 *mac_addr);
  33. void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked);
  34. void brcmf_txflowblock_if(struct brcmf_if *ifp,
  35. enum brcmf_netif_stop_reason reason, bool state);