parent
6ce1fd2301
commit
282981d257
@ -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