mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-03 21:09:42 +02:00
mac80211: update to wireless-testing 2010-03-24
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20497 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
249a5e63b3
commit
de79b64c19
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-03-03
|
||||
PKG_VERSION:=2010-03-24
|
||||
PKG_RELEASE:=3
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=af8da65ca4c25b1b69e3d2896d2bbb2f
|
||||
PKG_MD5SUM:=73357c52b5d6888ea3228b2ca8aa5eca
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
@ -676,9 +676,11 @@ MAKE_OPTS:= \
|
||||
CONFIG_AT76C50X_USB= \
|
||||
CONFIG_WL12XX= \
|
||||
CONFIG_EEPROM_93CX6= \
|
||||
CONFIG_HERMES= \
|
||||
CONFIG_AR9170_USB=$(if $(CONFIG_PACKAGE_kmod-ar9170),m) \
|
||||
CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
||||
CONFIG_IWM= \
|
||||
CONFIG_ATH9K_HTC= \
|
||||
MADWIFI= \
|
||||
OLD_IWL= \
|
||||
KLIB_BUILD="$(LINUX_DIR)" \
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -271,8 +271,8 @@ endif
|
||||
@@ -269,8 +269,8 @@ endif
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
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")
|
||||
@@ -461,8 +461,8 @@ endif
|
||||
@@ -492,8 +492,8 @@ endif
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
ifdef CONFIG_COMPAT_KERNEL_31
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -296,10 +296,10 @@ endif
|
||||
@@ -299,10 +299,10 @@ endif
|
||||
CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
@ -13,9 +13,9 @@
|
||||
+# CONFIG_ATL1E=m
|
||||
+# CONFIG_ATL1C=m
|
||||
|
||||
endif
|
||||
## end of PCI
|
||||
@@ -338,10 +338,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
CONFIG_HERMES=m
|
||||
CONFIG_HERMES_CACHE_FW_ON_INIT=y
|
||||
@@ -355,10 +355,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
else
|
||||
|
@ -9,7 +9,7 @@
|
||||
CONFIG_SSB=m
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
@@ -197,7 +197,7 @@ CONFIG_B43=m
|
||||
@@ -194,7 +194,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
@ -18,7 +18,7 @@
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
@@ -248,7 +248,7 @@ CONFIG_SSB_BLOCKIO=y
|
||||
@@ -246,7 +246,7 @@ CONFIG_SSB_BLOCKIO=y
|
||||
CONFIG_SSB_PCIHOST=y
|
||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -382,8 +382,8 @@ endif # end of SPI driver list
|
||||
@@ -407,8 +407,8 @@ endif # end of SPI driver list
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
|
||||
@ -10,4 +10,4 @@
|
||||
+# CONFIG_B43_SDIO=y
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
||||
ifdef CONFIG_COMPAT_KERNEL_27
|
||||
ifneq ($(CONFIG_ARM),)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath5k/reset.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/reset.c
|
||||
@@ -1360,10 +1360,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
||||
@@ -1377,10 +1377,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
||||
* guess we can tweak it and see how it goes ;-)
|
||||
*/
|
||||
if (ah->ah_version != AR5K_AR5210) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -2111,7 +2111,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -2097,7 +2097,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);
|
||||
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
--- a/net/wireless/nl80211.c
|
||||
+++ b/net/wireless/nl80211.c
|
||||
@@ -885,6 +885,11 @@ static int nl80211_send_iface(struct sk_
|
||||
@@ -886,6 +886,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);
|
||||
|
@ -1,42 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1947,10 +1947,10 @@ static void ath_tx_rc_status(struct ath_
|
||||
tx_rateindex = ds->ds_txstat.ts_rateindex;
|
||||
WARN_ON(tx_rateindex >= hw->max_rates);
|
||||
|
||||
- if (update_rc)
|
||||
- tx_info->pad[0] |= ATH_TX_INFO_UPDATE_RC;
|
||||
if (ds->ds_txstat.ts_status & ATH9K_TXERR_FILT)
|
||||
tx_info->flags |= IEEE80211_TX_STAT_TX_FILTERED;
|
||||
+ if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && update_rc)
|
||||
+ tx_info->flags |= IEEE80211_TX_STAT_AMPDU;
|
||||
|
||||
if ((ds->ds_txstat.ts_status & ATH9K_TXERR_FILT) == 0 &&
|
||||
(bf->bf_flags & ATH9K_TXDESC_NOACK) == 0 && update_rc) {
|
||||
--- a/drivers/net/wireless/ath/ath9k/rc.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/rc.h
|
||||
@@ -172,7 +172,6 @@ struct ath_rate_priv {
|
||||
|
||||
#define ATH_TX_INFO_FRAME_TYPE_INTERNAL (1 << 0)
|
||||
#define ATH_TX_INFO_FRAME_TYPE_PAUSE (1 << 1)
|
||||
-#define ATH_TX_INFO_UPDATE_RC (1 << 2)
|
||||
#define ATH_TX_INFO_XRETRY (1 << 3)
|
||||
#define ATH_TX_INFO_UNDERRUN (1 << 4)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/rc.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/rc.c
|
||||
@@ -1226,8 +1226,12 @@ static void ath_tx_status(void *priv, st
|
||||
long_retry = rate->count - 1;
|
||||
}
|
||||
|
||||
- if (!priv_sta || !ieee80211_is_data(fc) ||
|
||||
- !(tx_info->pad[0] & ATH_TX_INFO_UPDATE_RC))
|
||||
+ if (!priv_sta || !ieee80211_is_data(fc))
|
||||
+ return;
|
||||
+
|
||||
+ /* This packet was aggregated but doesn't carry status info */
|
||||
+ if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) &&
|
||||
+ !(tx_info->flags & IEEE80211_TX_STAT_AMPDU))
|
||||
return;
|
||||
|
||||
if (tx_info->flags & IEEE80211_TX_STAT_TX_FILTERED)
|
@ -1,80 +0,0 @@
|
||||
--- a/net/mac80211/rc80211_minstrel.h
|
||||
+++ b/net/mac80211/rc80211_minstrel.h
|
||||
@@ -80,6 +80,11 @@ struct minstrel_priv {
|
||||
unsigned int lookaround_rate_mrr;
|
||||
};
|
||||
|
||||
+struct minstrel_debugfs_info {
|
||||
+ size_t len;
|
||||
+ char buf[];
|
||||
+};
|
||||
+
|
||||
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||
void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
|
||||
|
||||
--- a/net/mac80211/rc80211_minstrel_debugfs.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_debugfs.c
|
||||
@@ -52,21 +52,15 @@
|
||||
#include <net/mac80211.h>
|
||||
#include "rc80211_minstrel.h"
|
||||
|
||||
-struct minstrel_stats_info {
|
||||
- struct minstrel_sta_info *mi;
|
||||
- char buf[4096];
|
||||
- size_t len;
|
||||
-};
|
||||
-
|
||||
static int
|
||||
minstrel_stats_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct minstrel_sta_info *mi = inode->i_private;
|
||||
- struct minstrel_stats_info *ms;
|
||||
+ struct minstrel_debugfs_info *ms;
|
||||
unsigned int i, tp, prob, eprob;
|
||||
char *p;
|
||||
|
||||
- ms = kmalloc(sizeof(*ms), GFP_KERNEL);
|
||||
+ ms = kmalloc(sizeof(*ms) + 4096, GFP_KERNEL);
|
||||
if (!ms)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -107,35 +101,18 @@ minstrel_stats_open(struct inode *inode,
|
||||
}
|
||||
|
||||
static ssize_t
|
||||
-minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o)
|
||||
+minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)
|
||||
{
|
||||
- struct minstrel_stats_info *ms;
|
||||
- char *src;
|
||||
+ struct minstrel_debugfs_info *ms;
|
||||
|
||||
ms = file->private_data;
|
||||
- src = ms->buf;
|
||||
-
|
||||
- len = min(len, ms->len);
|
||||
- if (len <= *o)
|
||||
- return 0;
|
||||
-
|
||||
- src += *o;
|
||||
- len -= *o;
|
||||
- *o += len;
|
||||
-
|
||||
- if (copy_to_user(buf, src, len))
|
||||
- return -EFAULT;
|
||||
-
|
||||
- return len;
|
||||
+ return simple_read_from_buffer(buf, len, ppos, ms->buf, ms->len);
|
||||
}
|
||||
|
||||
static int
|
||||
minstrel_stats_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
- struct minstrel_stats_info *ms = file->private_data;
|
||||
-
|
||||
- kfree(ms);
|
||||
-
|
||||
+ kfree(file->private_data);
|
||||
return 0;
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
--- a/net/mac80211/rc80211_minstrel.h
|
||||
+++ b/net/mac80211/rc80211_minstrel.h
|
||||
@@ -85,7 +85,13 @@ struct minstrel_debugfs_info {
|
||||
char buf[];
|
||||
};
|
||||
|
||||
+extern struct rate_control_ops mac80211_minstrel;
|
||||
void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
|
||||
void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
|
||||
|
||||
+/* debugfs */
|
||||
+int minstrel_stats_open(struct inode *inode, struct file *file);
|
||||
+ssize_t minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *o);
|
||||
+int minstrel_stats_release(struct inode *inode, struct file *file);
|
||||
+
|
||||
#endif
|
||||
--- a/net/mac80211/rc80211_minstrel.c
|
||||
+++ b/net/mac80211/rc80211_minstrel.c
|
||||
@@ -541,7 +541,7 @@ minstrel_free(void *priv)
|
||||
kfree(priv);
|
||||
}
|
||||
|
||||
-static struct rate_control_ops mac80211_minstrel = {
|
||||
+struct rate_control_ops mac80211_minstrel = {
|
||||
.name = "minstrel",
|
||||
.tx_status = minstrel_tx_status,
|
||||
.get_rate = minstrel_get_rate,
|
||||
--- a/net/mac80211/rc80211_minstrel_debugfs.c
|
||||
+++ b/net/mac80211/rc80211_minstrel_debugfs.c
|
||||
@@ -52,7 +52,7 @@
|
||||
#include <net/mac80211.h>
|
||||
#include "rc80211_minstrel.h"
|
||||
|
||||
-static int
|
||||
+int
|
||||
minstrel_stats_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
struct minstrel_sta_info *mi = inode->i_private;
|
||||
@@ -100,7 +100,7 @@ minstrel_stats_open(struct inode *inode,
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static ssize_t
|
||||
+ssize_t
|
||||
minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos)
|
||||
{
|
||||
struct minstrel_debugfs_info *ms;
|
||||
@@ -109,7 +109,7 @@ minstrel_stats_read(struct file *file, c
|
||||
return simple_read_from_buffer(buf, len, ppos, ms->buf, ms->len);
|
||||
}
|
||||
|
||||
-static int
|
||||
+int
|
||||
minstrel_stats_release(struct inode *inode, struct file *file)
|
||||
{
|
||||
kfree(file->private_data);
|
@ -1,48 +0,0 @@
|
||||
--- a/net/mac80211/status.c
|
||||
+++ b/net/mac80211/status.c
|
||||
@@ -171,7 +171,7 @@ void ieee80211_tx_status(struct ieee8021
|
||||
struct net_device *prev_dev = NULL;
|
||||
struct sta_info *sta, *tmp;
|
||||
int retry_count = -1, i;
|
||||
- bool injected;
|
||||
+ bool send_to_cooked;
|
||||
|
||||
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
|
||||
/* the HW cannot have attempted that rate */
|
||||
@@ -296,11 +296,15 @@ void ieee80211_tx_status(struct ieee8021
|
||||
/* this was a transmitted frame, but now we want to reuse it */
|
||||
skb_orphan(skb);
|
||||
|
||||
+ /* Need to make a copy before skb->cb gets cleared */
|
||||
+ send_to_cooked = !!(info->flags & IEEE80211_TX_CTL_INJECTED) ||
|
||||
+ (type != IEEE80211_FTYPE_DATA);
|
||||
+
|
||||
/*
|
||||
* This is a bit racy but we can avoid a lot of work
|
||||
* with this test...
|
||||
*/
|
||||
- if (!local->monitors && !local->cooked_mntrs) {
|
||||
+ if (!local->monitors && (!send_to_cooked || !local->cooked_mntrs)) {
|
||||
dev_kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
@@ -345,9 +349,6 @@ void ieee80211_tx_status(struct ieee8021
|
||||
/* for now report the total retry_count */
|
||||
rthdr->data_retries = retry_count;
|
||||
|
||||
- /* Need to make a copy before skb->cb gets cleared */
|
||||
- injected = !!(info->flags & IEEE80211_TX_CTL_INJECTED);
|
||||
-
|
||||
/* XXX: is this sufficient for BPF? */
|
||||
skb_set_mac_header(skb, 0);
|
||||
skb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||
@@ -362,8 +363,7 @@ void ieee80211_tx_status(struct ieee8021
|
||||
continue;
|
||||
|
||||
if ((sdata->u.mntr_flags & MONITOR_FLAG_COOK_FRAMES) &&
|
||||
- !injected &&
|
||||
- (type == IEEE80211_FTYPE_DATA))
|
||||
+ !send_to_cooked)
|
||||
continue;
|
||||
|
||||
if (prev_dev) {
|
@ -1,37 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1353,25 +1353,6 @@ static enum ath9k_pkt_type get_hw_packet
|
||||
return htype;
|
||||
}
|
||||
|
||||
-static bool is_pae(struct sk_buff *skb)
|
||||
-{
|
||||
- struct ieee80211_hdr *hdr;
|
||||
- __le16 fc;
|
||||
-
|
||||
- hdr = (struct ieee80211_hdr *)skb->data;
|
||||
- fc = hdr->frame_control;
|
||||
-
|
||||
- if (ieee80211_is_data(fc)) {
|
||||
- if (ieee80211_is_nullfunc(fc) ||
|
||||
- /* Port Access Entity (IEEE 802.1X) */
|
||||
- (skb->protocol == cpu_to_be16(ETH_P_PAE))) {
|
||||
- return true;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return false;
|
||||
-}
|
||||
-
|
||||
static int get_hw_crypto_keytype(struct sk_buff *skb)
|
||||
{
|
||||
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
|
||||
@@ -1696,7 +1677,7 @@ static void ath_tx_start_dma(struct ath_
|
||||
goto tx_done;
|
||||
}
|
||||
|
||||
- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
|
||||
+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
|
||||
/*
|
||||
* Try aggregation if it's a unicast data frame
|
||||
* and the destination is HT capable.
|
Loading…
Reference in New Issue
Block a user