Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224259
b: refs/heads/master
c: 6a2de93
h: refs/heads/master
i:
  224257: df1dd3b
  224255: 142e3d1
v: v3
  • Loading branch information
Teemu Paasikivi authored and John W. Linville committed Nov 15, 2010
1 parent e78a923 commit 97249e1
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 8 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: 18357850b694ba3fa29363c7d86ccd8783f4a065
refs/heads/master: 6a2de93b2553c2e9a72997370534993c85c1eee6
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/wl12xx/wl1271_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2367,18 +2367,18 @@ static const struct ieee80211_ops wl1271_ops = {
};


u8 wl1271_rate_to_idx(struct wl1271 *wl, int rate)
u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band)
{
u8 idx;

BUG_ON(wl->band >= sizeof(wl1271_band_rate_to_idx)/sizeof(u8 *));
BUG_ON(band >= sizeof(wl1271_band_rate_to_idx)/sizeof(u8 *));

if (unlikely(rate >= CONF_HW_RXTX_RATE_MAX)) {
wl1271_error("Illegal RX rate from HW: %d", rate);
return 0;
}

idx = wl1271_band_rate_to_idx[wl->band][rate];
idx = wl1271_band_rate_to_idx[band][rate];
if (unlikely(idx == CONF_HW_RXTX_RATE_UNSUPPORTED)) {
wl1271_error("Unsupported RX rate from HW: %d", rate);
return 0;
Expand Down
10 changes: 9 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,18 @@ static void wl1271_rx_status(struct wl1271 *wl,
struct ieee80211_rx_status *status,
u8 beacon)
{
enum ieee80211_band desc_band;

memset(status, 0, sizeof(struct ieee80211_rx_status));

status->band = wl->band;
status->rate_idx = wl1271_rate_to_idx(wl, desc->rate);

if ((desc->flags & WL1271_RX_DESC_BAND_MASK) == WL1271_RX_DESC_BAND_BG)
desc_band = IEEE80211_BAND_2GHZ;
else
desc_band = IEEE80211_BAND_5GHZ;

status->rate_idx = wl1271_rate_to_idx(desc->rate, desc_band);

#ifdef CONFIG_WL1271_HT
/* 11n support */
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_rx.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ struct wl1271_rx_descriptor {
} __packed;

void wl1271_rx(struct wl1271 *wl, struct wl1271_fw_status *status);
u8 wl1271_rate_to_idx(struct wl1271 *wl, int rate);
u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band);

#endif
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ static void wl1271_tx_complete_packet(struct wl1271 *wl,
if (result->status == TX_SUCCESS) {
if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
info->flags |= IEEE80211_TX_STAT_ACK;
rate = wl1271_rate_to_idx(wl, result->rate_class_index);
rate = wl1271_rate_to_idx(result->rate_class_index, wl->band);
retries = result->ack_failures;
} else if (result->status == TX_RETRY_EXCEEDED) {
wl->stats.excessive_retries++;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/wl12xx/wl1271_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void wl1271_tx_work_locked(struct wl1271 *wl);
void wl1271_tx_complete(struct wl1271 *wl);
void wl1271_tx_reset(struct wl1271 *wl);
void wl1271_tx_flush(struct wl1271 *wl);
u8 wl1271_rate_to_idx(struct wl1271 *wl, int rate);
u8 wl1271_rate_to_idx(int rate, enum ieee80211_band band);
u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set);

#endif

0 comments on commit 97249e1

Please sign in to comment.