parent
0ba61fe414
commit
4cb436429b
@ -1,155 +0,0 @@ |
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -17,15 +17,19 @@ ifeq ($(CONFIG_MAC80211),y)
|
||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||
endif
|
||||
|
||||
+
|
||||
# We will warn when you don't have MQ support or NET_SCHED enabled.
|
||||
#
|
||||
# We could consider just quiting if MQ and NET_SCHED is disabled
|
||||
# as I suspect all users of this package want 802.11e (WME) and
|
||||
# 802.11n (HT) support.
|
||||
-ifeq ($(shell test -e $(KLIB_BUILD)/Makefile && echo yes),yes)
|
||||
-KERNEL_SUBLEVEL = $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
|
||||
+ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
|
||||
+COMPAT_LATEST_VERSION = 32
|
||||
+KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
|
||||
+COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
|
||||
+$(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_WIRELESS_$(ver)=y))
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -lt 25 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_25
|
||||
$(error "ERROR: You should use compat-wireless-2.6-old for older kernels, this one is for kernels >= 2.6.25")
|
||||
endif
|
||||
|
||||
@@ -34,56 +38,10 @@ $(error "ERROR: your kernel has CONFIG_C
|
||||
endif
|
||||
|
||||
|
||||
-# Compat wireless compat-2.6.2x.c files gets selected here
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 21 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_22=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 22 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_23=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 23 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_24=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 24 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_25=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 25 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_26=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_27=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 27 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_28=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 28 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_29=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 29 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_30=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 30 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_31=y
|
||||
-endif
|
||||
-
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 31 && echo yes),yes)
|
||||
-CONFIG_COMPAT_WIRELESS_32=y
|
||||
-endif
|
||||
-
|
||||
# 2.6.27 has FTRACE_DYNAMIC borked, so we will complain if
|
||||
# you have it enabled, otherwise you will very likely run into
|
||||
# a kernel panic.
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -eq 27 && echo yes),yes)
|
||||
+ifeq ($(KERNEL_SUBLEVEL),27)
|
||||
ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
|
||||
$(error "ERROR: Your 2.6.27 kernel has CONFIG_DYNAMIC_FTRACE, please upgrade your distribution kernel as newer ones should not have this enabled (and if so report a bug) or remove this warning if you know what you are doing")
|
||||
endif
|
||||
@@ -291,7 +249,7 @@ endif
|
||||
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_27
|
||||
CONFIG_LIBERTAS=n
|
||||
CONFIG_LIBERTAS_CS=n
|
||||
else
|
||||
@@ -327,7 +285,7 @@ CONFIG_RTL8187=m
|
||||
|
||||
CONFIG_AT76C50X_USB=m
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 28 && echo yes),yes)
|
||||
+ifndef CONFIG_COMPAT_WIRELESS_28
|
||||
CONFIG_AR9170_USB=m
|
||||
CONFIG_AR9170_LEDS=y
|
||||
endif
|
||||
@@ -343,7 +301,7 @@ CONFIG_RT73USB=m
|
||||
NEED_RT2X00_FIRMWARE=y
|
||||
endif
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_27
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=n
|
||||
CONFIG_LIBERTAS_USB=n
|
||||
NEED_LIBERTAS=n
|
||||
@@ -360,7 +318,7 @@ ifneq ($(CONFIG_SPI_MASTER),)
|
||||
CONFIG_WL1251=m
|
||||
CONFIG_P54_SPI=m
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_27
|
||||
CONFIG_LIBERTAS_SPI=n
|
||||
NEED_LIBERTAS=n
|
||||
else
|
||||
@@ -372,7 +330,7 @@ endif # end of SPI driver list
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_27
|
||||
CONFIG_LIBERTAS_SDIO=n
|
||||
NEED_LIBERTAS=n
|
||||
else
|
||||
@@ -382,7 +340,7 @@ endif
|
||||
|
||||
# Activate iwmc3200wifi support only on kernel >= 2.6.29.
|
||||
# iwmc3200wifi uses new netdev_ops api no supported by old kernel.
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 29 && echo yes),yes)
|
||||
+ifndef CONFIG_COMPAT_WIRELESS_29
|
||||
CONFIG_IWM=m
|
||||
# CONFIG_IWM_DEBUG=y
|
||||
endif
|
||||
@@ -425,7 +383,7 @@ CONFIG_SSB=m
|
||||
CONFIG_SSB_SPROM=y
|
||||
# CONFIG_SSB_DEBUG=y
|
||||
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 26 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_27
|
||||
CONFIG_LIBERTAS=n
|
||||
else
|
||||
ifeq ($(NEED_LIBERTAS),y)
|
||||
@@ -437,7 +395,7 @@ endif
|
||||
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
-ifeq ($(shell test $(KERNEL_SUBLEVEL) -le 30 && echo yes),yes)
|
||||
+ifdef CONFIG_COMPAT_WIRELESS_31
|
||||
CONFIG_RFKILL_BACKPORT=m
|
||||
CONFIG_RFKILL_BACKPORT_LEDS=y
|
||||
CONFIG_RFKILL_BACKPORT_INPUT=y
|
@ -1,98 +0,0 @@ |
||||
Subject: cfg80211: check lost scans later, fix bug
|
||||
|
||||
When we lose a scan, cfg80211 tries to clean up after
|
||||
the driver. However, it currently does this too early,
|
||||
it does this in GOING_DOWN already instead of DOWN, so
|
||||
it may happen with mac80211. Besides fixing this, also
|
||||
make it more robust by leaking the scan request so if
|
||||
the driver later actually finishes the scan, it won't
|
||||
crash. Also check in ___cfg80211_scan_done whether a
|
||||
scan request is still pending and exit if not.
|
||||
|
||||
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
|
||||
---
|
||||
net/wireless/core.c | 4 +++-
|
||||
net/wireless/core.h | 2 +-
|
||||
net/wireless/scan.c | 19 ++++++++++++++++---
|
||||
3 files changed, 20 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -664,7 +664,7 @@ static void wdev_cleanup_work(struct wor
|
||||
|
||||
if (WARN_ON(rdev->scan_req && rdev->scan_req->dev == wdev->netdev)) {
|
||||
rdev->scan_req->aborted = true;
|
||||
- ___cfg80211_scan_done(rdev);
|
||||
+ ___cfg80211_scan_done(rdev, true);
|
||||
}
|
||||
|
||||
cfg80211_unlock_rdev(rdev);
|
||||
@@ -755,6 +755,8 @@ static int cfg80211_netdev_notifier_call
|
||||
default:
|
||||
break;
|
||||
}
|
||||
+ break;
|
||||
+ case NETDEV_DOWN:
|
||||
dev_hold(dev);
|
||||
schedule_work(&wdev->cleanup_work);
|
||||
break;
|
||||
--- a/net/wireless/core.h
|
||||
+++ b/net/wireless/core.h
|
||||
@@ -374,7 +374,7 @@ void cfg80211_sme_scan_done(struct net_d
|
||||
void cfg80211_sme_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
|
||||
void cfg80211_sme_disassoc(struct net_device *dev, int idx);
|
||||
void __cfg80211_scan_done(struct work_struct *wk);
|
||||
-void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev);
|
||||
+void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak);
|
||||
void cfg80211_upload_connect_keys(struct wireless_dev *wdev);
|
||||
|
||||
struct ieee80211_channel *
|
||||
--- a/net/wireless/scan.c
|
||||
+++ b/net/wireless/scan.c
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#define IEEE80211_SCAN_RESULT_EXPIRE (15 * HZ)
|
||||
|
||||
-void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev)
|
||||
+void ___cfg80211_scan_done(struct cfg80211_registered_device *rdev, bool leak)
|
||||
{
|
||||
struct cfg80211_scan_request *request;
|
||||
struct net_device *dev;
|
||||
@@ -28,6 +28,9 @@ void ___cfg80211_scan_done(struct cfg802
|
||||
|
||||
request = rdev->scan_req;
|
||||
|
||||
+ if (!request)
|
||||
+ return;
|
||||
+
|
||||
dev = request->dev;
|
||||
|
||||
/*
|
||||
@@ -53,7 +56,17 @@ void ___cfg80211_scan_done(struct cfg802
|
||||
dev_put(dev);
|
||||
|
||||
rdev->scan_req = NULL;
|
||||
- kfree(request);
|
||||
+
|
||||
+ /*
|
||||
+ * OK. If this is invoked with "leak" then we can't
|
||||
+ * free this ... but we've cleaned it up anyway. The
|
||||
+ * driver failed to call the scan_done callback, so
|
||||
+ * all bets are off, it might still be trying to use
|
||||
+ * the scan request or not ... if it accesses the dev
|
||||
+ * in there (it shouldn't anyway) then it may crash.
|
||||
+ */
|
||||
+ if (!leak)
|
||||
+ kfree(request);
|
||||
}
|
||||
|
||||
void __cfg80211_scan_done(struct work_struct *wk)
|
||||
@@ -64,7 +77,7 @@ void __cfg80211_scan_done(struct work_st
|
||||
scan_done_wk);
|
||||
|
||||
cfg80211_lock_rdev(rdev);
|
||||
- ___cfg80211_scan_done(rdev);
|
||||
+ ___cfg80211_scan_done(rdev, false);
|
||||
cfg80211_unlock_rdev(rdev);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@ |
||||
--- a/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
|
||||
@@ -29,15 +29,13 @@ static void ath_ahb_read_cachesize(struc
|
||||
|
||||
static void ath_ahb_cleanup(struct ath_common *common)
|
||||
{
|
||||
- struct ath_hw *ah = (struct ath_hw *) common->ah;
|
||||
- struct ath_softc *sc = ah->ah_sc;
|
||||
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
iounmap(sc->mem);
|
||||
}
|
||||
|
||||
static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
||||
{
|
||||
- struct ath_hw *ah = (struct ath_hw *) common->ah;
|
||||
- struct ath_softc *sc = ah->ah_sc;
|
||||
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
struct platform_device *pdev = to_platform_device(sc->dev);
|
||||
struct ath9k_platform_data *pdata;
|
||||
|
Loading…
Reference in new issue