mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-15 04:09:03 +08:00
163 lines
5.5 KiB
Diff
163 lines
5.5 KiB
Diff
diff -Naur old/Makefile new/Makefile
|
|
--- old/Makefile 2011-10-23 03:56:55.000000000 +1100
|
|
+++ new/Makefile 2013-03-18 23:40:48.561529595 +1100
|
|
@@ -15,21 +15,9 @@
|
|
|
|
ifneq ($(KERNELRELEASE),)
|
|
|
|
- LINUXVER_GOODFOR_CFG80211:=$(strip $(shell \
|
|
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "32" ]; then \
|
|
- echo TRUE; \
|
|
- else \
|
|
- echo FALSE; \
|
|
- fi \
|
|
- ))
|
|
+ LINUXVER_GOODFOR_CFG80211:=TRUE
|
|
|
|
- LINUXVER_WEXT_ONLY:=$(strip $(shell \
|
|
- if [ "$(VERSION)" -ge "2" -a "$(PATCHLEVEL)" -ge "6" -a "$(SUBLEVEL)" -ge "17" ]; then \
|
|
- echo FALSE; \
|
|
- else \
|
|
- echo TRUE; \
|
|
- fi \
|
|
- ))
|
|
+ LINUXVER_WEXT_ONLY:=FALSE
|
|
|
|
ifneq ($(API),)
|
|
ifeq ($(API), CFG80211)
|
|
diff -Naur old/src/wl/sys/wl_cfg80211.c new/src/wl/sys/wl_cfg80211.c
|
|
--- old/src/wl/sys/wl_cfg80211.c 2011-10-23 03:56:55.000000000 +1100
|
|
+++ new/src/wl/sys/wl_cfg80211.c 2013-03-18 23:54:16.904968829 +1100
|
|
@@ -42,7 +42,7 @@
|
|
enum nl80211_iftype type, u32 *flags, struct vif_params *params);
|
|
static s32 __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|
struct cfg80211_scan_request *request, struct cfg80211_ssid *this_ssid);
|
|
-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|
+static s32 wl_cfg80211_scan(struct wiphy *wiphy,
|
|
struct cfg80211_scan_request *request);
|
|
static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
|
|
static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
|
|
@@ -56,15 +56,10 @@
|
|
struct cfg80211_connect_params *sme);
|
|
static s32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code);
|
|
|
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
|
-static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
|
|
- enum nl80211_tx_power_setting type, s32 dbm);
|
|
-#else
|
|
-static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
|
|
- enum tx_power_setting type, s32 dbm);
|
|
-#endif
|
|
-
|
|
-static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm);
|
|
+static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|
+ enum nl80211_tx_power_setting type, s32 dbm);
|
|
+static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|
+ s32 *dbm);
|
|
|
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
|
|
static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
|
|
@@ -570,10 +565,12 @@
|
|
}
|
|
|
|
static s32
|
|
-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|
+wl_cfg80211_scan(struct wiphy *wiphy,
|
|
struct cfg80211_scan_request *request)
|
|
{
|
|
s32 err = 0;
|
|
+ struct wl_priv *wl = wiphy_to_wl(wiphy);
|
|
+ struct net_device *ndev = wl_to_ndev(wl);
|
|
|
|
CHECK_SYS_UP();
|
|
err = __wl_cfg80211_scan(wiphy, ndev, request, NULL);
|
|
@@ -742,7 +739,7 @@
|
|
else
|
|
memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
|
|
|
|
- wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
|
|
+ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
|
|
|
|
err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
|
|
if (err) {
|
|
@@ -1099,16 +1096,9 @@
|
|
return err;
|
|
}
|
|
|
|
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
|
-static s32
|
|
-wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm)
|
|
-#else
|
|
-#define NL80211_TX_POWER_AUTOMATIC TX_POWER_AUTOMATIC
|
|
-#define NL80211_TX_POWER_LIMITED TX_POWER_LIMITED
|
|
-#define NL80211_TX_POWER_FIXED TX_POWER_FIXED
|
|
static s32
|
|
-wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 dbm)
|
|
-#endif
|
|
+wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|
+ enum nl80211_tx_power_setting type, s32 dbm)
|
|
{
|
|
|
|
struct wl_priv *wl = wiphy_to_wl(wiphy);
|
|
@@ -1158,7 +1148,8 @@
|
|
return err;
|
|
}
|
|
|
|
-static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm)
|
|
+static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
|
|
+ s32 *dbm)
|
|
{
|
|
struct wl_priv *wl = wiphy_to_wl(wiphy);
|
|
struct net_device *ndev = wl_to_ndev(wl);
|
|
@@ -2036,6 +2027,7 @@
|
|
|
|
static s32 wl_update_bss_info(struct wl_priv *wl)
|
|
{
|
|
+ struct cfg80211_bss_ies *ies;
|
|
struct cfg80211_bss *bss;
|
|
struct wl_bss_info *bi;
|
|
struct wlc_ssid *ssid;
|
|
@@ -2074,8 +2066,9 @@
|
|
beacon_interval = cpu_to_le16(bi->beacon_period);
|
|
} else {
|
|
WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
|
|
- ie = bss->information_elements;
|
|
- ie_len = bss->len_information_elements;
|
|
+ ies = (struct cfg80211_bss_ies *)rcu_dereference(bss->ies);
|
|
+ ie = ies->data;
|
|
+ ie_len = ies->len;
|
|
beacon_interval = bss->beacon_interval;
|
|
cfg80211_put_bss(bss);
|
|
}
|
|
diff -Naur old/src/wl/sys/wl_iw.h new/src/wl/sys/wl_iw.h
|
|
--- old/src/wl/sys/wl_iw.h 2011-10-23 03:56:55.000000000 +1100
|
|
+++ new/src/wl/sys/wl_iw.h 2013-03-18 23:40:48.561529595 +1100
|
|
@@ -15,6 +15,7 @@
|
|
#ifndef _wl_iw_h_
|
|
#define _wl_iw_h_
|
|
|
|
+#include <linux/semaphore.h>
|
|
#include <linux/wireless.h>
|
|
|
|
#include <typedefs.h>
|
|
diff -Naur old/src/wl/sys/wl_linux.c new/src/wl/sys/wl_linux.c
|
|
--- old/src/wl/sys/wl_linux.c 2011-10-23 03:56:55.000000000 +1100
|
|
+++ new/src/wl/sys/wl_linux.c 2013-03-18 23:40:48.581530042 +1100
|
|
@@ -40,7 +40,6 @@
|
|
#include <linux/pci_ids.h>
|
|
#define WLC_MAXBSSCFG 1
|
|
|
|
-#include <asm/system.h>
|
|
#include <asm/io.h>
|
|
#include <asm/irq.h>
|
|
#include <asm/pgtable.h>
|
|
@@ -385,7 +384,7 @@
|
|
#endif
|
|
.ndo_get_stats = wl_get_stats,
|
|
.ndo_set_mac_address = wl_set_mac_address,
|
|
- .ndo_set_multicast_list = wl_set_multicast_list,
|
|
+ .ndo_set_rx_mode = wl_set_multicast_list,
|
|
.ndo_do_ioctl = wl_ioctl
|
|
};
|
|
|