1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-24 00:14:05 +02:00

mac80211: update to wireless-testing 2010-05-12 plus some pending patches

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@21454 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2010-05-15 15:56:51 +00:00
parent c1a68ed433
commit 34ad7f6499
17 changed files with 6897 additions and 1478 deletions

View File

@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211 PKG_NAME:=mac80211
PKG_VERSION:=2010-04-28 PKG_VERSION:=2010-05-12
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:=4b8c23ac7f33af7556034635af744c67 PKG_MD5SUM:=73e2aa6b917bdb0bae079433fe26a500
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)
@ -779,6 +779,7 @@ BUILDFLAGS:= \
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \ $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
$(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \ $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \ -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
-DCONFIG_MAC80211_RC_MINSTREL_HT \
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \ $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
$(if $(CONFIG_PACKAGE_ATH9K_USE_MINSTREL),-DATH9K_USE_MINSTREL) \ $(if $(CONFIG_PACKAGE_ATH9K_USE_MINSTREL),-DATH9K_USE_MINSTREL) \
$(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \ $(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
@ -877,6 +878,7 @@ MAKE_OPTS:= \
CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \ CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
CONFIG_IWM= \ CONFIG_IWM= \
CONFIG_ATH9K_HTC= \ CONFIG_ATH9K_HTC= \
CONFIG_MAC80211_RC_MINSTREL_HT=y \
MADWIFI= \ MADWIFI= \
OLD_IWL= \ OLD_IWL= \
KLIB_BUILD="$(LINUX_DIR)" \ KLIB_BUILD="$(LINUX_DIR)" \

View File

@ -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")
@@ -481,8 +481,8 @@ endif @@ -483,8 +483,8 @@ endif
# 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

View File

@ -41,7 +41,7 @@
CONFIG_P54_PCI=m CONFIG_P54_PCI=m
# CONFIG_B44=m # CONFIG_B44=m
@@ -411,7 +395,6 @@ endif # end of SPI driver list @@ -413,7 +397,6 @@ endif # end of SPI driver list
ifneq ($(CONFIG_MMC),) ifneq ($(CONFIG_MMC),)

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -380,7 +380,7 @@ endif # end of SPI driver list @@ -382,7 +382,7 @@ endif # end of SPI driver list
ifneq ($(CONFIG_MMC),) ifneq ($(CONFIG_MMC),)

View File

@ -53,7 +53,7 @@
#include <pcmcia/cs_types.h> #include <pcmcia/cs_types.h>
#include <pcmcia/cistpl.h> #include <pcmcia/cistpl.h>
#include <pcmcia/ds.h> #include <pcmcia/ds.h>
@@ -70,9 +70,9 @@ static inline struct sk_buff *netdev_all @@ -67,9 +67,9 @@ static inline struct sk_buff *netdev_all
return skb; return skb;
} }

View File

@ -11,8 +11,8 @@
{ {
--- a/compat/compat-2.6.29.c --- a/compat/compat-2.6.29.c
+++ b/compat/compat-2.6.29.c +++ b/compat/compat-2.6.29.c
@@ -16,7 +16,7 @@ @@ -53,7 +53,7 @@ void netdev_attach_ops(struct net_device
#include <linux/etherdevice.h> EXPORT_SYMBOL(netdev_attach_ops);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
-#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE) -#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)

View File

@ -1,8 +1,8 @@
--- a/include/linux/compat-2.6.34.h --- a/include/linux/compat-2.6.34.h
+++ b/include/linux/compat-2.6.34.h +++ b/include/linux/compat-2.6.34.h
@@ -197,6 +197,8 @@ do { \ @@ -200,6 +200,8 @@ do { \
*/ #define usb_alloc_coherent(dev, size, mem_flags, dma) usb_buffer_alloc(dev, size, mem_flags, dma)
#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr) #define usb_free_coherent(dev, size, addr, dma) usb_buffer_free(dev, size, addr, dma)
+#define rcu_dereference_check(p, c) rcu_dereference(p) +#define rcu_dereference_check(p, c) rcu_dereference(p)
+ +

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath/ath9k/hw.c --- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1380,7 +1380,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st @@ -1400,7 +1400,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
if (ah->config.rx_intr_mitigation) { if (ah->config.rx_intr_mitigation) {
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500); REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);

View File

@ -1,130 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -78,6 +78,90 @@ static const struct file_operations fops
#define DMA_BUF_LEN 1024
+static ssize_t read_file_tx_chainmask(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ char buf[32];
+ unsigned int len;
+
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", common->tx_chainmask);
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t write_file_tx_chainmask(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ unsigned long mask;
+ char buf[32];
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EINVAL;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &mask))
+ return -EINVAL;
+
+ common->tx_chainmask = mask;
+ sc->sc_ah->caps.tx_chainmask = mask;
+ return count;
+}
+
+static const struct file_operations fops_tx_chainmask = {
+ .read = read_file_tx_chainmask,
+ .write = write_file_tx_chainmask,
+ .open = ath9k_debugfs_open,
+ .owner = THIS_MODULE
+};
+
+
+static ssize_t read_file_rx_chainmask(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ char buf[32];
+ unsigned int len;
+
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", common->rx_chainmask);
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t write_file_rx_chainmask(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
+ unsigned long mask;
+ char buf[32];
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EINVAL;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &mask))
+ return -EINVAL;
+
+ common->rx_chainmask = mask;
+ sc->sc_ah->caps.rx_chainmask = mask;
+ return count;
+}
+
+static const struct file_operations fops_rx_chainmask = {
+ .read = read_file_rx_chainmask,
+ .write = write_file_rx_chainmask,
+ .open = ath9k_debugfs_open,
+ .owner = THIS_MODULE
+};
+
+
static ssize_t read_file_dma(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
@@ -731,6 +815,16 @@ int ath9k_init_debug(struct ath_hw *ah)
goto err;
#endif
+ sc->debug.debugfs_rx_chainmask = debugfs_create_file("rx_chainmask",
+ S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_rx_chainmask);
+ if (!sc->debug.debugfs_rx_chainmask)
+ goto err;
+
+ sc->debug.debugfs_tx_chainmask = debugfs_create_file("tx_chainmask",
+ S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_tx_chainmask);
+ if (!sc->debug.debugfs_tx_chainmask)
+ goto err;
+
sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
sc->debug.debugfs_phy, sc, &fops_dma);
if (!sc->debug.debugfs_dma)
@@ -781,6 +875,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
struct ath_common *common = ath9k_hw_common(ah);
struct ath_softc *sc = (struct ath_softc *) common->priv;
+ debugfs_remove(sc->debug.debugfs_tx_chainmask);
+ debugfs_remove(sc->debug.debugfs_rx_chainmask);
debugfs_remove(sc->debug.debugfs_recv);
debugfs_remove(sc->debug.debugfs_xmit);
debugfs_remove(sc->debug.debugfs_wiphy);
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -152,6 +152,8 @@ struct ath_stats {
};
struct ath9k_debug {
+ struct dentry *debugfs_rx_chainmask;
+ struct dentry *debugfs_tx_chainmask;
struct dentry *debugfs_phy;
struct dentry *debugfs_debug;
struct dentry *debugfs_dma;

File diff suppressed because it is too large Load Diff

View File

@ -1,128 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -795,6 +795,86 @@ static const struct file_operations fops
.owner = THIS_MODULE
};
+static ssize_t read_file_regidx(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ char buf[32];
+ unsigned int len;
+
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", sc->debug.regidx);
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ unsigned long regidx;
+ char buf[32];
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EINVAL;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &regidx))
+ return -EINVAL;
+
+ sc->debug.regidx = regidx;
+ return count;
+}
+
+static const struct file_operations fops_regidx = {
+ .read = read_file_regidx,
+ .write = write_file_regidx,
+ .open = ath9k_debugfs_open,
+ .owner = THIS_MODULE
+};
+
+static ssize_t read_file_regval(struct file *file, char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_hw *ah = sc->sc_ah;
+ char buf[32];
+ unsigned int len;
+ u32 regval;
+
+ regval = REG_READ_D(ah, sc->debug.regidx);
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", regval);
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
+}
+
+static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath_softc *sc = file->private_data;
+ struct ath_hw *ah = sc->sc_ah;
+ unsigned long regval;
+ char buf[32];
+ ssize_t len;
+
+ len = min(count, sizeof(buf) - 1);
+ if (copy_from_user(buf, user_buf, len))
+ return -EINVAL;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &regval))
+ return -EINVAL;
+
+ REG_WRITE_D(ah, sc->debug.regidx, regval);
+ return count;
+}
+
+static const struct file_operations fops_regval = {
+ .read = read_file_regval,
+ .write = write_file_regval,
+ .open = ath9k_debugfs_open,
+ .owner = THIS_MODULE
+};
+
int ath9k_init_debug(struct ath_hw *ah)
{
struct ath_common *common = ath9k_hw_common(ah);
@@ -864,6 +944,17 @@ int ath9k_init_debug(struct ath_hw *ah)
if (!sc->debug.debugfs_recv)
goto err;
+ sc->debug.regidx = 0;
+ sc->debug.debugfs_regidx = debugfs_create_file("regidx",
+ S_IRUSR|S_IWUSR, sc->debug.debugfs_phy, sc, &fops_regidx);
+ if (!sc->debug.debugfs_regidx)
+ goto err;
+
+ sc->debug.debugfs_regval = debugfs_create_file("regval",
+ S_IRUSR|S_IWUSR, sc->debug.debugfs_phy, sc, &fops_regval);
+ if (!sc->debug.debugfs_regval)
+ goto err;
+
return 0;
err:
ath9k_exit_debug(ah);
@@ -877,6 +968,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
debugfs_remove(sc->debug.debugfs_tx_chainmask);
debugfs_remove(sc->debug.debugfs_rx_chainmask);
+ debugfs_remove(sc->debug.debugfs_regval);
+ debugfs_remove(sc->debug.debugfs_regidx);
debugfs_remove(sc->debug.debugfs_recv);
debugfs_remove(sc->debug.debugfs_xmit);
debugfs_remove(sc->debug.debugfs_wiphy);
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -162,6 +162,9 @@ struct ath9k_debug {
struct dentry *debugfs_wiphy;
struct dentry *debugfs_xmit;
struct dentry *debugfs_recv;
+ struct dentry *debugfs_regidx;
+ struct dentry *debugfs_regval;
+ u32 regidx;
struct ath_stats stats;
};

View File

@ -1,34 +0,0 @@
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -76,6 +76,7 @@ struct cfg80211_registered_device {
/* current channel */
struct ieee80211_channel *channel;
+ enum nl80211_channel_type channel_type;
/* must be last because of the way we do wiphy_priv(),
* and it should at least be aligned to NETDEV_ALIGN */
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -97,6 +97,7 @@ int rdev_set_freq(struct cfg80211_regist
return result;
rdev->channel = chan;
+ rdev->channel_type = channel_type;
return 0;
}
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -887,6 +887,11 @@ static int nl80211_send_iface(struct sk_
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
+ if (rdev->channel) {
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, rdev->channel->center_freq);
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, rdev->channel_type);
+ }
+
NLA_PUT_U32(msg, NL80211_ATTR_GENERATION,
rdev->devlist_generation ^

File diff suppressed because it is too large Load Diff

View File

@ -1,24 +0,0 @@
--- a/drivers/net/wireless/ath/ath9k/common.c
+++ b/drivers/net/wireless/ath/ath9k/common.c
@@ -57,13 +57,19 @@ static bool ath9k_rx_accept(struct ath_c
* rs_more indicates chained descriptors which can be used
* to link buffers together for a sort of scatter-gather
* operation.
- *
+ * reject the frame, we don't support scatter-gather yet and
+ * the frame is probably corrupt anyway
+ */
+ if (rx_stats->rs_more)
+ return false;
+
+ /*
* The rx_stats->rs_status will not be set until the end of the
* chained descriptors so it can be ignored if rs_more is set. The
* rs_more will be false at the last element of the chained
* descriptors.
*/
- if (!rx_stats->rs_more && rx_stats->rs_status != 0) {
+ if (rx_stats->rs_status != 0) {
if (rx_stats->rs_status & ATH9K_RXERR_CRC)
rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
if (rx_stats->rs_status & ATH9K_RXERR_PHY)

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -225,6 +225,7 @@ void rt2x00pci_uninitialize(struct rt2x0 @@ -216,6 +216,7 @@ void rt2x00pci_uninitialize(struct rt2x0
} }
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize); EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
@ -8,7 +8,7 @@
/* /*
* PCI driver handlers. * PCI driver handlers.
*/ */
@@ -399,6 +400,7 @@ int rt2x00pci_resume(struct pci_dev *pci @@ -390,6 +391,7 @@ int rt2x00pci_resume(struct pci_dev *pci
} }
EXPORT_SYMBOL_GPL(rt2x00pci_resume); EXPORT_SYMBOL_GPL(rt2x00pci_resume);
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c --- a/drivers/net/wireless/rt2x00/rt2x00pci.c
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c +++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
@@ -215,7 +215,7 @@ void rt2x00pci_uninitialize(struct rt2x0 @@ -206,7 +206,7 @@ void rt2x00pci_uninitialize(struct rt2x0
/* /*
* Free irq line. * Free irq line.
*/ */