linux-4.12.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. Ffix for 4.12
  2. ---
  3. src/wl/sys/wl_cfg80211_hybrid.c | 29 ++++++++++++++++++++++++++++-
  4. 1 file changed, 28 insertions(+), 1 deletion(-)
  5. diff -Nurp broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_cfg80211_hybrid.c broadcom-wl-6.30.223.271/src/wl/sys/wl_cfg80211_hybrid.c
  6. --- broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_cfg80211_hybrid.c 2020-01-11 01:25:39.080492424 +0200
  7. +++ broadcom-wl-6.30.223.271/src/wl/sys/wl_cfg80211_hybrid.c 2020-01-11 01:34:37.953072128 +0200
  8. @@ -54,7 +54,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
  9. #endif
  10. static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
  11. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  12. + enum nl80211_iftype type, struct vif_params *params);
  13. +#else
  14. enum nl80211_iftype type, u32 *flags, struct vif_params *params);
  15. +#endif
  16. #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
  17. static s32
  18. wl_cfg80211_scan(struct wiphy *wiphy,
  19. @@ -467,7 +471,11 @@ wl_dev_ioctl(struct net_device *dev, u32
  20. static s32
  21. wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
  22. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  23. + enum nl80211_iftype type,
  24. +#else
  25. enum nl80211_iftype type, u32 *flags,
  26. +#endif
  27. struct vif_params *params)
  28. {
  29. struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
  30. @@ -2362,6 +2370,20 @@ wl_bss_roaming_done(struct wl_cfg80211_p
  31. const wl_event_msg_t *e, void *data)
  32. {
  33. struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
  34. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  35. + struct cfg80211_bss *bss;
  36. + struct wlc_ssid *ssid;
  37. + ssid = &wl->profile->ssid;
  38. + bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
  39. + ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
  40. + struct cfg80211_roam_info roam_info = {
  41. + .bss = bss,
  42. + .req_ie = conn_info->req_ie,
  43. + .req_ie_len = conn_info->req_ie_len,
  44. + .resp_ie = conn_info->resp_ie,
  45. + .resp_ie_len = conn_info->resp_ie_len,
  46. + };
  47. +#endif
  48. s32 err = 0;
  49. wl_get_assoc_ies(wl);
  50. @@ -2369,12 +2391,17 @@ wl_bss_roaming_done(struct wl_cfg80211_p
  51. memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
  52. wl_update_bss_info(wl);
  53. cfg80211_roamed(ndev,
  54. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  55. + &roam_info,
  56. +#else
  57. #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
  58. &wl->conf->channel,
  59. #endif
  60. (u8 *)&wl->bssid,
  61. conn_info->req_ie, conn_info->req_ie_len,
  62. - conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
  63. + conn_info->resp_ie, conn_info->resp_ie_len,
  64. +#endif
  65. + GFP_KERNEL);
  66. WL_DBG(("Report roaming result\n"));
  67. set_bit(WL_STATUS_CONNECTED, &wl->status);