mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-02 21:01:07 +02:00
mac80211: update to wireless-testing 2010-11-16
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24017 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
75c0610d60
commit
4ac2598423
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=2010-11-10
|
PKG_VERSION:=2010-11-16
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||||
PKG_MD5SUM:=b0df7d2a89818ae96aaa1b3723a51fb7
|
PKG_MD5SUM:=eb996cb637326203544753d3a05a3979
|
||||||
|
|
||||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
ifeq ($(CONFIG_MAC80211),y)
|
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")
|
$(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")
|
||||||
@@ -585,8 +585,8 @@ endif #CONFIG_COMPAT_KERNEL_27
|
@@ -587,8 +587,8 @@ endif #CONFIG_COMPAT_KERNEL_27
|
||||||
# We need the backported rfkill module on kernel < 2.6.31.
|
# We need the backported rfkill module on kernel < 2.6.31.
|
||||||
# In more recent kernel versions use the in kernel rfkill module.
|
# In more recent kernel versions use the in kernel rfkill module.
|
||||||
ifdef CONFIG_COMPAT_KERNEL_31
|
ifdef CONFIG_COMPAT_KERNEL_31
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
# CONFIG_B43LEGACY_DEBUG=y
|
# CONFIG_B43LEGACY_DEBUG=y
|
||||||
CONFIG_B43LEGACY_DMA=y
|
CONFIG_B43LEGACY_DMA=y
|
||||||
CONFIG_B43LEGACY_PIO=y
|
CONFIG_B43LEGACY_PIO=y
|
||||||
@@ -542,7 +542,7 @@ endif
|
@@ -544,7 +544,7 @@ endif
|
||||||
|
|
||||||
# p54
|
# p54
|
||||||
CONFIG_P54_COMMON=m
|
CONFIG_P54_COMMON=m
|
||||||
|
@ -8,4 +8,4 @@
|
|||||||
+# CONFIG_B43_SDIO=y
|
+# CONFIG_B43_SDIO=y
|
||||||
|
|
||||||
ifdef CONFIG_CRC7
|
ifdef CONFIG_CRC7
|
||||||
CONFIG_WL1251_SDIO=m
|
ifdef CONFIG_WL12XX_PLATFORM_DATA
|
||||||
|
212
package/mac80211/patches/018-revert_printk_va_format.patch
Normal file
212
package/mac80211/patches/018-revert_printk_va_format.patch
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/debug.c
|
||||||
|
+++ b/drivers/net/wireless/ath/debug.c
|
||||||
|
@@ -19,19 +19,14 @@
|
||||||
|
|
||||||
|
void ath_print(struct ath_common *common, int dbg_mask, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (likely(!(common->debug_mask & dbg_mask)))
|
||||||
|
return;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_DEBUG "ath: %pV", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_DEBUG "ath: ");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(ath_print);
|
||||||
|
--- a/drivers/net/wireless/b43/main.c
|
||||||
|
+++ b/drivers/net/wireless/b43/main.c
|
||||||
|
@@ -322,83 +322,59 @@ static int b43_ratelimit(struct b43_wl *
|
||||||
|
|
||||||
|
void b43info(struct b43_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (b43_modparam_verbose < B43_VERBOSITY_INFO)
|
||||||
|
return;
|
||||||
|
if (!b43_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_INFO "b43-%s: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_INFO "b43-%s: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void b43err(struct b43_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (b43_modparam_verbose < B43_VERBOSITY_ERROR)
|
||||||
|
return;
|
||||||
|
if (!b43_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_ERR "b43-%s ERROR: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_ERR "b43-%s ERROR: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void b43warn(struct b43_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (b43_modparam_verbose < B43_VERBOSITY_WARN)
|
||||||
|
return;
|
||||||
|
if (!b43_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_WARNING "b43-%s warning: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_WARNING "b43-%s warning: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void b43dbg(struct b43_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (b43_modparam_verbose < B43_VERBOSITY_DEBUG)
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_DEBUG "b43-%s debug: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_DEBUG "b43-%s debug: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
--- a/drivers/net/wireless/b43legacy/main.c
|
||||||
|
+++ b/drivers/net/wireless/b43legacy/main.c
|
||||||
|
@@ -181,75 +181,52 @@ static int b43legacy_ratelimit(struct b4
|
||||||
|
|
||||||
|
void b43legacyinfo(struct b43legacy_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (!b43legacy_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_INFO "b43legacy-%s: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_INFO "b43legacy-%s: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void b43legacyerr(struct b43legacy_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (!b43legacy_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_ERR "b43legacy-%s ERROR: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_ERR "b43legacy-%s ERROR: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
void b43legacywarn(struct b43legacy_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
if (!b43legacy_ratelimit(wl))
|
||||||
|
return;
|
||||||
|
-
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_WARNING "b43legacy-%s warning: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_WARNING "b43legacy-%s warning: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if B43legacy_DEBUG
|
||||||
|
void b43legacydbg(struct b43legacy_wl *wl, const char *fmt, ...)
|
||||||
|
{
|
||||||
|
- struct va_format vaf;
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
-
|
||||||
|
- vaf.fmt = fmt;
|
||||||
|
- vaf.va = &args;
|
||||||
|
-
|
||||||
|
- printk(KERN_DEBUG "b43legacy-%s debug: %pV",
|
||||||
|
- (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan", &vaf);
|
||||||
|
-
|
||||||
|
+ printk(KERN_DEBUG "b43legacy-%s debug: ",
|
||||||
|
+ (wl && wl->hw) ? wiphy_name(wl->hw->wiphy) : "wlan");
|
||||||
|
+ vprintk(fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
}
|
||||||
|
#endif /* DEBUG */
|
@ -1,16 +0,0 @@
|
|||||||
--- a/include/linux/pm_qos_params.h
|
|
||||||
+++ b/include/linux/pm_qos_params.h
|
|
||||||
@@ -1,5 +1,8 @@
|
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
+#ifndef __COMPAT_LINUX_PM_QOS_PARAMS_H
|
|
||||||
+#define __COMPAT_LINUX_PM_QOS_PARAMS_H
|
|
||||||
+
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25))
|
|
||||||
#include_next <linux/pm_qos_params.h>
|
|
||||||
#else
|
|
||||||
@@ -30,3 +33,4 @@ int pm_qos_add_notifier(int qos, struct
|
|
||||||
int pm_qos_remove_notifier(int qos, struct notifier_block *notifier);
|
|
||||||
#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)) */
|
|
||||||
|
|
||||||
+#endif
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/include/linux/compat-2.6.36.h
|
|
||||||
+++ b/include/linux/compat-2.6.36.h
|
|
||||||
@@ -83,7 +83,7 @@ struct pm_qos_request_list {
|
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#define pm_qos_update_request(_req, _value) \
|
|
||||||
- pm_qos_update_request((_req)->request, (_value)
|
|
||||||
+ pm_qos_update_request((_req)->request, (_value))
|
|
||||||
|
|
||||||
#define pm_qos_remove_request(_req) \
|
|
||||||
pm_qos_remove_request((_req)->request)
|
|
@ -15,7 +15,7 @@
|
|||||||
err:
|
err:
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
@@ -751,6 +751,8 @@ struct ath_hw {
|
@@ -789,6 +789,8 @@ struct ath_hw {
|
||||||
int initPDADC;
|
int initPDADC;
|
||||||
int PDADCdelta;
|
int PDADCdelta;
|
||||||
u8 led_pin;
|
u8 led_pin;
|
||||||
|
114
package/mac80211/patches/310-pending_work.patch
Normal file
114
package/mac80211/patches/310-pending_work.patch
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
||||||
|
@@ -3271,6 +3271,18 @@ static bool ar9300_check_eeprom_header(s
|
||||||
|
return ar9300_check_header(header);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static int ar9300_eeprom_restore_flash(struct ath_hw *ah, u8 *mptr,
|
||||||
|
+ int mdata_size)
|
||||||
|
+{
|
||||||
|
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||||
|
+ u16 *data = (u16 *) mptr;
|
||||||
|
+ int i;
|
||||||
|
+
|
||||||
|
+ for (i = 0; i < mdata_size / 2; i++, data++)
|
||||||
|
+ ath9k_hw_nvram_read(common, i, data);
|
||||||
|
+
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
/*
|
||||||
|
* Read the configuration data from the eeprom.
|
||||||
|
* The data can be put in any specified memory buffer.
|
||||||
|
@@ -3293,6 +3305,9 @@ static int ar9300_eeprom_restore_interna
|
||||||
|
struct ath_common *common = ath9k_hw_common(ah);
|
||||||
|
eeprom_read_op read;
|
||||||
|
|
||||||
|
+ if (ath9k_hw_use_flash(ah))
|
||||||
|
+ return ar9300_eeprom_restore_flash(ah, mptr, mdata_size);
|
||||||
|
+
|
||||||
|
word = kzalloc(2048, GFP_KERNEL);
|
||||||
|
if (!word)
|
||||||
|
return -1;
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
@@ -419,10 +419,6 @@ static void ath9k_hw_init_defaults(struc
|
||||||
|
ah->hw_version.magic = AR5416_MAGIC;
|
||||||
|
ah->hw_version.subvendorid = 0;
|
||||||
|
|
||||||
|
- ah->ah_flags = 0;
|
||||||
|
- if (!AR_SREV_9100(ah))
|
||||||
|
- ah->ah_flags = AH_USE_EEPROM;
|
||||||
|
-
|
||||||
|
ah->atim_window = 0;
|
||||||
|
ah->sta_id1_defaults =
|
||||||
|
AR_STA_ID1_CRPT_MIC_ENABLE |
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
|
@@ -533,6 +533,9 @@ static int ath9k_init_softc(u16 devid, s
|
||||||
|
ah->hw_version.subsysid = subsysid;
|
||||||
|
sc->sc_ah = ah;
|
||||||
|
|
||||||
|
+ if (!sc->dev->platform_data)
|
||||||
|
+ ah->ah_flags |= AH_USE_EEPROM;
|
||||||
|
+
|
||||||
|
common = ath9k_hw_common(ah);
|
||||||
|
common->ops = &ath9k_common_ops;
|
||||||
|
common->bus_ops = bus_ops;
|
||||||
|
--- a/drivers/net/wireless/ath/ath9k/pci.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/pci.c
|
||||||
|
@@ -16,6 +16,7 @@
|
||||||
|
|
||||||
|
#include <linux/nl80211.h>
|
||||||
|
#include <linux/pci.h>
|
||||||
|
+#include <linux/ath9k_platform.h>
|
||||||
|
#include "ath9k.h"
|
||||||
|
|
||||||
|
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
||||||
|
@@ -53,21 +54,36 @@ static void ath_pci_read_cachesize(struc
|
||||||
|
|
||||||
|
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
||||||
|
{
|
||||||
|
- struct ath_hw *ah = (struct ath_hw *) common->ah;
|
||||||
|
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||||
|
+ struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
||||||
|
|
||||||
|
- common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S));
|
||||||
|
+ if (pdata) {
|
||||||
|
+ if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
|
||||||
|
+ ath_print(common, ATH_DBG_FATAL,
|
||||||
|
+ "%s: eeprom read failed, offset %08x "
|
||||||
|
+ "is out of range\n",
|
||||||
|
+ __func__, off);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ *data = pdata->eeprom_data[off];
|
||||||
|
+ } else {
|
||||||
|
+ struct ath_hw *ah = (struct ath_hw *) common->ah;
|
||||||
|
+
|
||||||
|
+ common->ops->read(ah, AR5416_EEPROM_OFFSET +
|
||||||
|
+ (off << AR5416_EEPROM_S));
|
||||||
|
+
|
||||||
|
+ if (!ath9k_hw_wait(ah,
|
||||||
|
+ AR_EEPROM_STATUS_DATA,
|
||||||
|
+ AR_EEPROM_STATUS_DATA_BUSY |
|
||||||
|
+ AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0,
|
||||||
|
+ AH_WAIT_TIMEOUT)) {
|
||||||
|
+ return false;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
- if (!ath9k_hw_wait(ah,
|
||||||
|
- AR_EEPROM_STATUS_DATA,
|
||||||
|
- AR_EEPROM_STATUS_DATA_BUSY |
|
||||||
|
- AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0,
|
||||||
|
- AH_WAIT_TIMEOUT)) {
|
||||||
|
- return false;
|
||||||
|
+ *data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA),
|
||||||
|
+ AR_EEPROM_STATUS_DATA_VAL);
|
||||||
|
}
|
||||||
|
|
||||||
|
- *data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA),
|
||||||
|
- AR_EEPROM_STATUS_DATA_VAL);
|
||||||
|
-
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
@ -8,7 +8,7 @@
|
|||||||
#include <asm/unaligned.h>
|
#include <asm/unaligned.h>
|
||||||
|
|
||||||
#include "hw.h"
|
#include "hw.h"
|
||||||
@@ -449,8 +450,16 @@ static int ath9k_hw_init_macaddr(struct
|
@@ -445,8 +446,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||||
common->macaddr[2 * i] = eeval >> 8;
|
common->macaddr[2 * i] = eeval >> 8;
|
||||||
common->macaddr[2 * i + 1] = eeval & 0xff;
|
common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||||
}
|
}
|
||||||
|
@ -1,58 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/pci.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/pci.c
|
|
||||||
@@ -16,6 +16,7 @@
|
|
||||||
|
|
||||||
#include <linux/nl80211.h>
|
|
||||||
#include <linux/pci.h>
|
|
||||||
+#include <linux/ath9k_platform.h>
|
|
||||||
#include "ath9k.h"
|
|
||||||
|
|
||||||
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
|
||||||
@@ -53,21 +54,36 @@ static void ath_pci_read_cachesize(struc
|
|
||||||
|
|
||||||
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
|
||||||
{
|
|
||||||
- struct ath_hw *ah = (struct ath_hw *) common->ah;
|
|
||||||
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
|
||||||
+ struct ath9k_platform_data *pdata = sc->dev->platform_data;
|
|
||||||
|
|
||||||
- common->ops->read(ah, AR5416_EEPROM_OFFSET + (off << AR5416_EEPROM_S));
|
|
||||||
+ if (pdata) {
|
|
||||||
+ if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
|
|
||||||
+ ath_print(common, ATH_DBG_FATAL,
|
|
||||||
+ "%s: eeprom read failed, offset %08x "
|
|
||||||
+ "is out of range\n",
|
|
||||||
+ __func__, off);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ *data = pdata->eeprom_data[off];
|
|
||||||
+ } else {
|
|
||||||
+ struct ath_hw *ah = (struct ath_hw *) common->ah;
|
|
||||||
+
|
|
||||||
+ common->ops->read(ah, AR5416_EEPROM_OFFSET +
|
|
||||||
+ (off << AR5416_EEPROM_S));
|
|
||||||
+
|
|
||||||
+ if (!ath9k_hw_wait(ah,
|
|
||||||
+ AR_EEPROM_STATUS_DATA,
|
|
||||||
+ AR_EEPROM_STATUS_DATA_BUSY |
|
|
||||||
+ AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0,
|
|
||||||
+ AH_WAIT_TIMEOUT)) {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- if (!ath9k_hw_wait(ah,
|
|
||||||
- AR_EEPROM_STATUS_DATA,
|
|
||||||
- AR_EEPROM_STATUS_DATA_BUSY |
|
|
||||||
- AR_EEPROM_STATUS_DATA_PROT_ACCESS, 0,
|
|
||||||
- AH_WAIT_TIMEOUT)) {
|
|
||||||
- return false;
|
|
||||||
+ *data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA),
|
|
||||||
+ AR_EEPROM_STATUS_DATA_VAL);
|
|
||||||
}
|
|
||||||
|
|
||||||
- *data = MS(common->ops->read(ah, AR_EEPROM_STATUS_DATA),
|
|
||||||
- AR_EEPROM_STATUS_DATA_VAL);
|
|
||||||
-
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
|
||||||
@@ -16,6 +16,7 @@
|
|
||||||
|
|
||||||
#include <linux/nl80211.h>
|
|
||||||
#include <linux/pm_qos_params.h>
|
|
||||||
+#include <linux/ath9k_platform.h>
|
|
||||||
#include "ath9k.h"
|
|
||||||
#include "btcoex.h"
|
|
||||||
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
|
||||||
@@ -522,6 +522,7 @@ static int ath9k_init_softc(u16 devid, s
|
|
||||||
{
|
|
||||||
struct ath_hw *ah = NULL;
|
|
||||||
struct ath_common *common;
|
|
||||||
+ struct ath9k_platform_data *pdata;
|
|
||||||
int ret = 0, i;
|
|
||||||
int csz = 0;
|
|
||||||
|
|
||||||
@@ -533,6 +534,10 @@ static int ath9k_init_softc(u16 devid, s
|
|
||||||
ah->hw_version.subsysid = subsysid;
|
|
||||||
sc->sc_ah = ah;
|
|
||||||
|
|
||||||
+ pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
|
||||||
+ if (!pdata)
|
|
||||||
+ ah->ah_flags |= AH_USE_EEPROM;
|
|
||||||
+
|
|
||||||
common = ath9k_hw_common(ah);
|
|
||||||
common->ops = &ath9k_common_ops;
|
|
||||||
common->bus_ops = bus_ops;
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
|
||||||
@@ -420,10 +420,6 @@ static void ath9k_hw_init_defaults(struc
|
|
||||||
ah->hw_version.magic = AR5416_MAGIC;
|
|
||||||
ah->hw_version.subvendorid = 0;
|
|
||||||
|
|
||||||
- ah->ah_flags = 0;
|
|
||||||
- if (!AR_SREV_9100(ah))
|
|
||||||
- ah->ah_flags = AH_USE_EEPROM;
|
|
||||||
-
|
|
||||||
ah->atim_window = 0;
|
|
||||||
ah->sta_id1_defaults =
|
|
||||||
AR_STA_ID1_CRPT_MIC_ENABLE |
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
|
||||||
@@ -1438,7 +1438,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
|
||||||
|
|
||||||
if (ah->config.rx_intr_mitigation) {
|
|
||||||
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
|
||||||
- REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 2000);
|
|
||||||
+ REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_FIRST, 500);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ah->config.tx_intr_mitigation) {
|
|
@ -8,15 +8,24 @@
|
|||||||
#include "ath9k.h"
|
#include "ath9k.h"
|
||||||
|
|
||||||
static char *dev_info = "ath9k";
|
static char *dev_info = "ath9k";
|
||||||
@@ -535,8 +536,14 @@ static int ath9k_init_softc(u16 devid, s
|
@@ -522,6 +523,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||||
|
{
|
||||||
|
struct ath_hw *ah = NULL;
|
||||||
|
struct ath_common *common;
|
||||||
|
+ struct ath9k_platform_data *pdata;
|
||||||
|
int ret = 0, i;
|
||||||
|
int csz = 0;
|
||||||
|
|
||||||
|
@@ -533,8 +535,15 @@ static int ath9k_init_softc(u16 devid, s
|
||||||
|
ah->hw_version.subsysid = subsysid;
|
||||||
sc->sc_ah = ah;
|
sc->sc_ah = ah;
|
||||||
|
|
||||||
pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
- if (!sc->dev->platform_data)
|
||||||
- if (!pdata)
|
+ if (!sc->dev->platform_data) {
|
||||||
+ if (!pdata) {
|
|
||||||
ah->ah_flags |= AH_USE_EEPROM;
|
ah->ah_flags |= AH_USE_EEPROM;
|
||||||
+ sc->sc_ah->led_pin = -1;
|
+ sc->sc_ah->led_pin = -1;
|
||||||
+ } else {
|
+ } else {
|
||||||
|
+ pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
||||||
+ sc->sc_ah->gpio_mask = pdata->gpio_mask;
|
+ sc->sc_ah->gpio_mask = pdata->gpio_mask;
|
||||||
+ sc->sc_ah->gpio_val = pdata->gpio_val;
|
+ sc->sc_ah->gpio_val = pdata->gpio_val;
|
||||||
+ sc->sc_ah->led_pin = pdata->led_pin;
|
+ sc->sc_ah->led_pin = pdata->led_pin;
|
||||||
@ -26,7 +35,7 @@
|
|||||||
common->ops = &ath9k_common_ops;
|
common->ops = &ath9k_common_ops;
|
||||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||||
@@ -750,7 +750,7 @@ struct ath_hw {
|
@@ -788,7 +788,7 @@ struct ath_hw {
|
||||||
u32 originalGain[22];
|
u32 originalGain[22];
|
||||||
int initPDADC;
|
int initPDADC;
|
||||||
int PDADCdelta;
|
int PDADCdelta;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
|
||||||
@@ -1656,9 +1656,6 @@ static void ath_tx_start_dma(struct ath_
|
|
||||||
bf->bf_buf_addr,
|
|
||||||
txctl->txq->axq_qnum);
|
|
||||||
|
|
||||||
- if (bf->bf_state.bfs_paprd)
|
|
||||||
- ar9003_hw_set_paprd_txdesc(ah, ds, bf->bf_state.bfs_paprd);
|
|
||||||
-
|
|
||||||
spin_lock_bh(&txctl->txq->axq_lock);
|
|
||||||
|
|
||||||
if (bf_isht(bf) && (sc->sc_flags & SC_OP_TXAGGR) &&
|
|
||||||
@@ -1684,6 +1681,9 @@ static void ath_tx_start_dma(struct ath_
|
|
||||||
bf->bf_state.bfs_ftype = txctl->frame_type;
|
|
||||||
bf->bf_state.bfs_paprd = txctl->paprd;
|
|
||||||
|
|
||||||
+ if (bf->bf_state.bfs_paprd)
|
|
||||||
+ ar9003_hw_set_paprd_txdesc(ah, ds, bf->bf_state.bfs_paprd);
|
|
||||||
+
|
|
||||||
if (txctl->paprd)
|
|
||||||
bf->bf_state.bfs_paprd_timestamp = jiffies;
|
|
||||||
|
|
@ -1,149 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
|
|
||||||
@@ -3104,6 +3104,36 @@ error:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static bool ar9300_otp_read_word(struct ath_hw *ah, int addr, u32 *data)
|
|
||||||
+{
|
|
||||||
+ REG_READ(ah, AR9300_OTP_BASE + (4 * addr));
|
|
||||||
+
|
|
||||||
+ if (!ath9k_hw_wait(ah, AR9300_OTP_STATUS, AR9300_OTP_STATUS_TYPE,
|
|
||||||
+ AR9300_OTP_STATUS_VALID, 1000))
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ *data = REG_READ(ah, AR9300_OTP_READ_DATA);
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static bool ar9300_read_otp(struct ath_hw *ah, int address, u8 *buffer,
|
|
||||||
+ int count)
|
|
||||||
+{
|
|
||||||
+ u32 data;
|
|
||||||
+ int i;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < count; i++) {
|
|
||||||
+ int offset = 8 * ((address - i) % 4);
|
|
||||||
+ if (!ar9300_otp_read_word(ah, (address - i) / 4, &data))
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ buffer[i] = (data >> offset) & 0xff;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return true;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static void ar9300_comp_hdr_unpack(u8 *best, int *code, int *reference,
|
|
||||||
int *length, int *major, int *minor)
|
|
||||||
{
|
|
||||||
@@ -3221,6 +3251,26 @@ static int ar9300_compress_decision(stru
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+typedef bool (*eeprom_read_op)(struct ath_hw *ah, int address, u8 *buffer,
|
|
||||||
+ int count);
|
|
||||||
+
|
|
||||||
+static bool ar9300_check_header(void *data)
|
|
||||||
+{
|
|
||||||
+ u32 *word = data;
|
|
||||||
+ return !(*word == 0 || *word == ~0);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static bool ar9300_check_eeprom_header(struct ath_hw *ah, eeprom_read_op read,
|
|
||||||
+ int base_addr)
|
|
||||||
+{
|
|
||||||
+ u8 header[4];
|
|
||||||
+
|
|
||||||
+ if (!read(ah, base_addr, header, 4))
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ return ar9300_check_header(header);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*
|
|
||||||
* Read the configuration data from the eeprom.
|
|
||||||
* The data can be put in any specified memory buffer.
|
|
||||||
@@ -3241,6 +3291,7 @@ static int ar9300_eeprom_restore_interna
|
|
||||||
int it;
|
|
||||||
u16 checksum, mchecksum;
|
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
|
||||||
+ eeprom_read_op read;
|
|
||||||
|
|
||||||
word = kzalloc(2048, GFP_KERNEL);
|
|
||||||
if (!word)
|
|
||||||
@@ -3248,14 +3299,42 @@ static int ar9300_eeprom_restore_interna
|
|
||||||
|
|
||||||
memcpy(mptr, &ar9300_default, mdata_size);
|
|
||||||
|
|
||||||
+ read = ar9300_read_eeprom;
|
|
||||||
cptr = AR9300_BASE_ADDR;
|
|
||||||
+ ath_print(common, ATH_DBG_EEPROM,
|
|
||||||
+ "Trying EEPROM accesss at Address 0x%04x\n", cptr);
|
|
||||||
+ if (ar9300_check_eeprom_header(ah, read, cptr))
|
|
||||||
+ goto found;
|
|
||||||
+
|
|
||||||
+ cptr = AR9300_BASE_ADDR_512;
|
|
||||||
+ ath_print(common, ATH_DBG_EEPROM,
|
|
||||||
+ "Trying EEPROM accesss at Address 0x%04x\n", cptr);
|
|
||||||
+ if (ar9300_check_eeprom_header(ah, read, cptr))
|
|
||||||
+ goto found;
|
|
||||||
+
|
|
||||||
+ read = ar9300_read_otp;
|
|
||||||
+ cptr = AR9300_BASE_ADDR;
|
|
||||||
+ ath_print(common, ATH_DBG_EEPROM,
|
|
||||||
+ "Trying OTP accesss at Address 0x%04x\n", cptr);
|
|
||||||
+ if (ar9300_check_eeprom_header(ah, read, cptr))
|
|
||||||
+ goto found;
|
|
||||||
+
|
|
||||||
+ cptr = AR9300_BASE_ADDR_512;
|
|
||||||
+ ath_print(common, ATH_DBG_EEPROM,
|
|
||||||
+ "Trying OTP accesss at Address 0x%04x\n", cptr);
|
|
||||||
+ if (ar9300_check_eeprom_header(ah, read, cptr))
|
|
||||||
+ goto found;
|
|
||||||
+
|
|
||||||
+ goto fail;
|
|
||||||
+
|
|
||||||
+found:
|
|
||||||
+ ath_print(common, ATH_DBG_EEPROM, "Found valid EEPROM data");
|
|
||||||
+
|
|
||||||
for (it = 0; it < MSTATE; it++) {
|
|
||||||
- if (!ar9300_read_eeprom(ah, cptr, word, COMP_HDR_LEN))
|
|
||||||
+ if (!read(ah, cptr, word, COMP_HDR_LEN))
|
|
||||||
goto fail;
|
|
||||||
|
|
||||||
- if ((word[0] == 0 && word[1] == 0 && word[2] == 0 &&
|
|
||||||
- word[3] == 0) || (word[0] == 0xff && word[1] == 0xff
|
|
||||||
- && word[2] == 0xff && word[3] == 0xff))
|
|
||||||
+ if (!ar9300_check_header(word))
|
|
||||||
break;
|
|
||||||
|
|
||||||
ar9300_comp_hdr_unpack(word, &code, &reference,
|
|
||||||
@@ -3272,8 +3351,7 @@ static int ar9300_eeprom_restore_interna
|
|
||||||
}
|
|
||||||
|
|
||||||
osize = length;
|
|
||||||
- ar9300_read_eeprom(ah, cptr, word,
|
|
||||||
- COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
|
|
||||||
+ read(ah, cptr, word, COMP_HDR_LEN + osize + COMP_CKSUM_LEN);
|
|
||||||
checksum = ar9300_comp_cksum(&word[COMP_HDR_LEN], length);
|
|
||||||
mchecksum = word[COMP_HDR_LEN + osize] |
|
|
||||||
(word[COMP_HDR_LEN + osize + 1] << 8);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.h
|
|
||||||
@@ -79,6 +79,15 @@
|
|
||||||
#define FIXED_CCA_THRESHOLD 15
|
|
||||||
|
|
||||||
#define AR9300_BASE_ADDR 0x3ff
|
|
||||||
+#define AR9300_BASE_ADDR_512 0x1ff
|
|
||||||
+
|
|
||||||
+#define AR9300_OTP_BASE 0x14000
|
|
||||||
+#define AR9300_OTP_STATUS 0x15f18
|
|
||||||
+#define AR9300_OTP_STATUS_TYPE 0x7
|
|
||||||
+#define AR9300_OTP_STATUS_VALID 0x4
|
|
||||||
+#define AR9300_OTP_STATUS_ACCESS_BUSY 0x2
|
|
||||||
+#define AR9300_OTP_STATUS_SM_BUSY 0x1
|
|
||||||
+#define AR9300_OTP_READ_DATA 0x15f1c
|
|
||||||
|
|
||||||
enum targetPowerHTRates {
|
|
||||||
HT_TARGET_RATE_0_8_16,
|
|
@ -16,7 +16,7 @@ Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
|
|||||||
|
|
||||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||||
@@ -590,6 +590,10 @@ static void rt2800pci_kill_tx_queue(stru
|
@@ -592,6 +592,10 @@ static void rt2800pci_kill_tx_queue(stru
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
--- a/drivers/net/wireless/mwl8k.c
|
--- a/drivers/net/wireless/mwl8k.c
|
||||||
+++ b/drivers/net/wireless/mwl8k.c
|
+++ b/drivers/net/wireless/mwl8k.c
|
||||||
@@ -3902,6 +3902,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
@@ -4056,6 +4056,7 @@ MODULE_FIRMWARE("mwl8k/fmimage_8366.fw")
|
||||||
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
MODULE_FIRMWARE(MWL8K_8366_AP_FW(MWL8K_8366_AP_FW_API));
|
||||||
|
|
||||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||||
+ { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, },
|
+ { PCI_VDEVICE(MARVELL, 0x2a02), .driver_data = MWL8363, },
|
||||||
|
Loading…
x
Reference in New Issue
Block a user