Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 150295
b: refs/heads/master
c: d3707d9
h: refs/heads/master
i:
  150293: 0f443dd
  150291: 88c8f2a
  150287: 55e4c2e
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed May 13, 2009
1 parent 9b2a5a3 commit 336f37c
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b59066a291ca7c12a1e5b58f3ada5ab6e32cb6bd
refs/heads/master: d3707d9918d47c0997a6b1e4ae24e7ab55e43796
38 changes: 38 additions & 0 deletions trunk/net/mac80211/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,42 @@ static const struct file_operations reset_ops = {
.open = mac80211_open_file_generic,
};

static ssize_t noack_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
struct ieee80211_local *local = file->private_data;
int res;
char buf[10];

res = scnprintf(buf, sizeof(buf), "%d\n", local->wifi_wme_noack_test);

return simple_read_from_buffer(user_buf, count, ppos, buf, res);
}

static ssize_t noack_write(struct file *file,
const char __user *user_buf,
size_t count, loff_t *ppos)
{
struct ieee80211_local *local = file->private_data;
char buf[10];
size_t len;

len = min(count, sizeof(buf) - 1);
if (copy_from_user(buf, user_buf, len))
return -EFAULT;
buf[len] = '\0';

local->wifi_wme_noack_test = !!simple_strtoul(buf, NULL, 0);

return count;
}

static const struct file_operations noack_ops = {
.read = noack_read,
.write = noack_write,
.open = mac80211_open_file_generic
};

/* statistics stuff */

#define DEBUGFS_STATS_FILE(name, buflen, fmt, value...) \
Expand Down Expand Up @@ -275,6 +311,7 @@ void debugfs_hw_add(struct ieee80211_local *local)
DEBUGFS_ADD(wep_iv);
DEBUGFS_ADD(tsf);
DEBUGFS_ADD_MODE(reset, 0200);
DEBUGFS_ADD(noack);

statsd = debugfs_create_dir("statistics", phyd);
local->debugfs.statistics = statsd;
Expand Down Expand Up @@ -330,6 +367,7 @@ void debugfs_hw_del(struct ieee80211_local *local)
DEBUGFS_DEL(wep_iv);
DEBUGFS_DEL(tsf);
DEBUGFS_DEL(reset);
DEBUGFS_DEL(noack);

DEBUGFS_STATS_DEL(transmitted_fragment_count);
DEBUGFS_STATS_DEL(multicast_transmitted_frame_count);
Expand Down
1 change: 1 addition & 0 deletions trunk/net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,7 @@ struct ieee80211_local {
struct dentry *wep_iv;
struct dentry *tsf;
struct dentry *reset;
struct dentry *noack;
struct dentry *statistics;
struct local_debugfsdentries_statsdentries {
struct dentry *transmitted_fragment_count;
Expand Down
5 changes: 4 additions & 1 deletion trunk/net/mac80211/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,10 @@ __ieee80211_tx_prepare(struct ieee80211_tx_data *tx,
info->flags |= IEEE80211_TX_CTL_NO_ACK;
} else {
tx->flags |= IEEE80211_TX_UNICAST;
info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
if (unlikely(local->wifi_wme_noack_test))
info->flags |= IEEE80211_TX_CTL_NO_ACK;
else
info->flags &= ~IEEE80211_TX_CTL_NO_ACK;
}

if (tx->flags & IEEE80211_TX_FRAGMENTED) {
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/mac80211/wme.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ u16 ieee80211_select_queue(struct net_device *dev, struct sk_buff *skb)
u8 *p = ieee80211_get_qos_ctl(hdr);
u8 ack_policy = 0;
tid = skb->priority & IEEE80211_QOS_CTL_TAG1D_MASK;
if (local->wifi_wme_noack_test)
if (unlikely(local->wifi_wme_noack_test))
ack_policy |= QOS_CONTROL_ACK_POLICY_NOACK <<
QOS_CONTROL_ACK_POLICY_SHIFT;
/* qos header is 2 bytes, second reserved */
Expand Down

0 comments on commit 336f37c

Please sign in to comment.