Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 290584
b: refs/heads/master
c: d2e2d76
h: refs/heads/master
v: v3
  • Loading branch information
Pontus Fuchs authored and Luciano Coelho committed Feb 15, 2012
1 parent 2c609e5 commit 2b8624d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 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: d18da7fcca449f09c91a209b4f5006959c5a7656
refs/heads/master: d2e2d769e3d328ba7cbf08e8ed85e3f817915843
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ enum {
CONF_HW_RXTX_RATE_UNSUPPORTED = 0xff
};

/* Rates between and including these are MCS rates */
#define CONF_HW_RXTX_RATE_MCS_MIN CONF_HW_RXTX_RATE_MCS7
#define CONF_HW_RXTX_RATE_MCS_MAX CONF_HW_RXTX_RATE_MCS0

enum {
CONF_SG_DISABLE = 0,
CONF_SG_PROTECTIVE,
Expand Down
12 changes: 11 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,14 @@ void wl1271_tx_work(struct work_struct *work)
mutex_unlock(&wl->mutex);
}

static u8 wl1271_tx_get_rate_flags(u8 rate_class_index)
{
if (rate_class_index >= CONF_HW_RXTX_RATE_MCS_MIN &&
rate_class_index <= CONF_HW_RXTX_RATE_MCS_MAX)
return IEEE80211_TX_RC_MCS;
return 0;
}

static void wl1271_tx_complete_packet(struct wl1271 *wl,
struct wl1271_tx_hw_res_descr *result)
{
Expand All @@ -773,6 +781,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
struct sk_buff *skb;
int id = result->id;
int rate = -1;
u8 rate_flags = 0;
u8 retries = 0;

/* check for id legality */
Expand All @@ -799,6 +808,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
info->flags |= IEEE80211_TX_STAT_ACK;
rate = wl1271_rate_to_idx(result->rate_class_index,
wlvif->band);
rate_flags = wl1271_tx_get_rate_flags(result->rate_class_index);
retries = result->ack_failures;
} else if (result->status == TX_RETRY_EXCEEDED) {
wl->stats.excessive_retries++;
Expand All @@ -807,7 +817,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,

info->status.rates[0].idx = rate;
info->status.rates[0].count = retries;
info->status.rates[0].flags = 0;
info->status.rates[0].flags = rate_flags;
info->status.ack_signal = -1;

wl->stats.retry_count += result->ack_failures;
Expand Down

0 comments on commit 2b8624d

Please sign in to comment.