344-0016-brcmfmac-keep-ARP-and-ND-offload-enabled-during-WOWL.patch 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. From: Hante Meuleman <meuleman@broadcom.com>
  2. Date: Wed, 17 Feb 2016 11:27:05 +0100
  3. Subject: [PATCH] brcmfmac: keep ARP and ND offload enabled during WOWL
  4. Currently ARP and ND (IPv6 Neigbor Discovery) offload get disabled
  5. on entering suspend. However when firmwares support the wowl_cap
  6. iovar then these offload routines can be kept enabled as they
  7. will work during WOWL as well.
  8. Reviewed-by: Arend Van Spriel <arend@broadcom.com>
  9. Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
  10. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
  11. Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
  12. Signed-off-by: Arend van Spriel <arend@broadcom.com>
  13. Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  14. ---
  15. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  16. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
  17. @@ -3556,7 +3556,8 @@ static s32 brcmf_cfg80211_resume(struct
  18. brcmf_report_wowl_wakeind(wiphy, ifp);
  19. brcmf_fil_iovar_int_set(ifp, "wowl_clear", 0);
  20. brcmf_config_wowl_pattern(ifp, "clr", NULL, 0, NULL, 0);
  21. - brcmf_configure_arp_nd_offload(ifp, true);
  22. + if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND))
  23. + brcmf_configure_arp_nd_offload(ifp, true);
  24. brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM,
  25. cfg->wowl.pre_pmmode);
  26. cfg->wowl.active = false;
  27. @@ -3580,7 +3581,8 @@ static void brcmf_configure_wowl(struct
  28. brcmf_dbg(TRACE, "Suspend, wowl config.\n");
  29. - brcmf_configure_arp_nd_offload(ifp, false);
  30. + if (!brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL_ARP_ND))
  31. + brcmf_configure_arp_nd_offload(ifp, false);
  32. brcmf_fil_cmd_int_get(ifp, BRCMF_C_GET_PM, &cfg->wowl.pre_pmmode);
  33. brcmf_fil_cmd_int_set(ifp, BRCMF_C_SET_PM, PM_MAX);
  34. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
  35. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
  36. @@ -147,6 +147,7 @@ void brcmf_feat_attach(struct brcmf_pub
  37. if (brcmf_feat_is_enabled(ifp, BRCMF_FEAT_WOWL)) {
  38. err = brcmf_fil_iovar_int_get(ifp, "wowl_cap", &wowl_cap);
  39. if (!err) {
  40. + ifp->drvr->feat_flags |= BIT(BRCMF_FEAT_WOWL_ARP_ND);
  41. if (wowl_cap & BRCMF_WOWL_PFN_FOUND)
  42. ifp->drvr->feat_flags |=
  43. BIT(BRCMF_FEAT_WOWL_ND);
  44. --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
  45. +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.h
  46. @@ -29,6 +29,7 @@
  47. * SCAN_RANDOM_MAC: Random MAC during (net detect) scheduled scan.
  48. * WOWL_ND: WOWL net detect (PNO)
  49. * WOWL_GTK: (WOWL) GTK rekeying offload
  50. + * WOWL_ARP_ND: ARP and Neighbor Discovery offload support during WOWL.
  51. */
  52. #define BRCMF_FEAT_LIST \
  53. BRCMF_FEAT_DEF(MBSS) \
  54. @@ -40,7 +41,8 @@
  55. BRCMF_FEAT_DEF(TDLS) \
  56. BRCMF_FEAT_DEF(SCAN_RANDOM_MAC) \
  57. BRCMF_FEAT_DEF(WOWL_ND) \
  58. - BRCMF_FEAT_DEF(WOWL_GTK)
  59. + BRCMF_FEAT_DEF(WOWL_GTK) \
  60. + BRCMF_FEAT_DEF(WOWL_ARP_ND)
  61. /*
  62. * Quirks: