007-linux412.patch 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
  2. index da36405..d3741eb 100644
  3. --- a/src/wl/sys/wl_cfg80211_hybrid.c
  4. +++ b/src/wl/sys/wl_cfg80211_hybrid.c
  5. @@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
  6. #endif
  7. static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
  8. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  9. + enum nl80211_iftype type, struct vif_params *params);
  10. +#else
  11. enum nl80211_iftype type, u32 *flags, struct vif_params *params);
  12. +#endif
  13. #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
  14. static s32
  15. wl_cfg80211_scan(struct wiphy *wiphy,
  16. @@ -466,7 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
  17. static s32
  18. wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
  19. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  20. + enum nl80211_iftype type,
  21. +#else
  22. enum nl80211_iftype type, u32 *flags,
  23. +#endif
  24. struct vif_params *params)
  25. {
  26. struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
  27. @@ -2361,6 +2369,20 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
  28. const wl_event_msg_t *e, void *data)
  29. {
  30. struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
  31. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  32. + struct cfg80211_bss *bss;
  33. + struct wlc_ssid *ssid;
  34. + ssid = &wl->profile->ssid;
  35. + bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
  36. + ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
  37. + struct cfg80211_roam_info roam_info = {
  38. + .bss = bss,
  39. + .req_ie = conn_info->req_ie,
  40. + .req_ie_len = conn_info->req_ie_len,
  41. + .resp_ie = conn_info->resp_ie,
  42. + .resp_ie_len = conn_info->resp_ie_len,
  43. + };
  44. +#endif
  45. s32 err = 0;
  46. wl_get_assoc_ies(wl);
  47. @@ -2368,12 +2390,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
  48. memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
  49. wl_update_bss_info(wl);
  50. cfg80211_roamed(ndev,
  51. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
  52. + &roam_info,
  53. +#else
  54. #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
  55. &wl->conf->channel,
  56. #endif
  57. (u8 *)&wl->bssid,
  58. conn_info->req_ie, conn_info->req_ie_len,
  59. - conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
  60. + conn_info->resp_ie, conn_info->resp_ie_len,
  61. +#endif
  62. + GFP_KERNEL);
  63. WL_DBG(("Report roaming result\n"));
  64. set_bit(WL_STATUS_CONNECTED, &wl->status);