Advertisement
ananas

Broadcom STA driver patch for kernel 4.x

Apr 18th, 2015
314
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 3.82 KB | None | 0 0
  1. diff -urN broadcom-orig/Makefile broadcom-sta/Makefile
  2. --- broadcom-orig/Makefile  2014-06-26 13:42:08.000000000 +0300
  3. +++ broadcom-sta/Makefile   2015-02-07 14:24:22.622027252 +0200
  4. @@ -146,4 +146,4 @@
  5.     KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd` clean
  6.  
  7.  install:
  8. -   install -D -m 755 wl.ko $(MDEST_DIR)
  9. +   install -D -m 644 wl.ko $(MDEST_DIR)/wl.ko
  10. diff -urN broadcom-orig/src/wl/sys/wl_cfg80211_hybrid.c broadcom-sta/src/wl/sys/wl_cfg80211_hybrid.c
  11. --- broadcom-orig/src/wl/sys/wl_cfg80211_hybrid.c   2014-06-26 13:42:08.000000000 +0300
  12. +++ broadcom-sta/src/wl/sys/wl_cfg80211_hybrid.c    2015-04-18 13:59:59.336457287 +0300
  13. @@ -64,7 +64,7 @@
  14.             struct cfg80211_ibss_params *params);
  15.  static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
  16.  static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
  17. -           struct net_device *dev, u8 *mac, struct station_info *sinfo);
  18. +           struct net_device *dev, const u8 *mac, struct station_info *sinfo);
  19.  static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
  20.             struct net_device *dev, bool enabled, s32 timeout);
  21.  static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
  22. @@ -1423,7 +1423,7 @@
  23.  
  24.  static s32
  25.  wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
  26. -                        u8 *mac, struct station_info *sinfo)
  27. +                        const u8 *mac, struct station_info *sinfo)
  28.  {
  29.     struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
  30.     scb_val_t scb_val;
  31. @@ -1441,7 +1441,7 @@
  32.         WL_DBG(("Could not get rate (%d)\n", err));
  33.     } else {
  34.         rate = dtoh32(rate);
  35. -       sinfo->filled |= STATION_INFO_TX_BITRATE;
  36. +       sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
  37.         sinfo->txrate.legacy = rate * 5;
  38.         WL_DBG(("Rate %d Mbps\n", (rate / 2)));
  39.     }
  40. @@ -1454,7 +1454,7 @@
  41.             return err;
  42.         }
  43.         rssi = dtoh32(scb_val.val);
  44. -       sinfo->filled |= STATION_INFO_SIGNAL;
  45. +       sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
  46.         sinfo->signal = rssi;
  47.         WL_DBG(("RSSI %d dBm\n", rssi));
  48.     }
  49. @@ -2010,9 +2010,10 @@
  50.  
  51.     notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
  52.     notify_ielen = le32_to_cpu(bi->ie_length);
  53. -   cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
  54. -       0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
  55. -       (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
  56. +   cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN,
  57. +       (const u8 *)(bi->BSSID.octet), 0, beacon_proberesp->capab_info,
  58. +       beacon_proberesp->beacon_int, (const u8 *)notify_ie,
  59. +       notify_ielen, signal, GFP_KERNEL);
  60.  
  61.     if (unlikely(!cbss))
  62.         return -ENOMEM;
  63. @@ -2071,7 +2072,7 @@
  64.             wl_get_assoc_ies(wl);
  65.             memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
  66.             wl_update_bss_info(wl);
  67. -           cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
  68. +           cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, &wl->conf->channel, GFP_KERNEL);
  69.             set_bit(WL_STATUS_CONNECTED, &wl->status);
  70.             wl->profile->active = true;
  71.         }
  72. diff -urN broadcom-orig/src/wl/sys/wl_linux.c broadcom-sta/src/wl/sys/wl_linux.c
  73. --- broadcom-orig/src/wl/sys/wl_linux.c 2014-06-26 13:42:08.000000000 +0300
  74. +++ broadcom-sta/src/wl/sys/wl_linux.c  2015-02-19 14:12:34.129003364 +0200
  75. @@ -1307,7 +1307,7 @@
  76.     dev->priv = priv_link;
  77.  #else
  78.  
  79. -   dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
  80. +   dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN, ether_setup);
  81.     if (!dev) {
  82.         WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
  83.             (wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
  84. @@ -2045,8 +2045,7 @@
  85.  void
  86.  wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b)
  87.  {
  88. -   bcm_bprintf(b, "wl%d: %s %s version %s\n", wl->pub->unit,
  89. -       __DATE__, __TIME__, EPI_VERSION_STR);
  90. +   bcm_bprintf(b, "wl%d: version %s\n", wl->pub->unit, EPI_VERSION_STR);
  91.  }
  92.  
  93.  #if defined(BCMDBG)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement