Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202778
b: refs/heads/master
c: 9f167f6
h: refs/heads/master
v: v3
  • Loading branch information
Vasanthakumar Thiagarajan authored and John W. Linville committed Jun 2, 2010
1 parent 1897c82 commit 41e6e03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 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: 93ef24b29bb6d6d50763c44c0debec4a9547fc58
refs/heads/master: 9f167f6480c87e22ce1b934cc839d1786b373b70
23 changes: 8 additions & 15 deletions trunk/drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -823,16 +823,14 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc,

/* Assumes you've already done the endian to CPU conversion */
static bool ath9k_rx_accept(struct ath_common *common,
struct sk_buff *skb,
struct ieee80211_hdr *hdr,
struct ieee80211_rx_status *rxs,
struct ath_rx_status *rx_stats,
bool *decrypt_error)
{
struct ath_hw *ah = common->ah;
struct ieee80211_hdr *hdr;
__le16 fc;

hdr = (struct ieee80211_hdr *) skb->data;
fc = hdr->frame_control;

if (!rx_stats->rs_datalen)
Expand Down Expand Up @@ -903,8 +901,7 @@ static bool ath9k_rx_accept(struct ath_common *common,
static int ath9k_process_rate(struct ath_common *common,
struct ieee80211_hw *hw,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rxs,
struct sk_buff *skb)
struct ieee80211_rx_status *rxs)
{
struct ieee80211_supported_band *sband;
enum ieee80211_band band;
Expand Down Expand Up @@ -942,25 +939,21 @@ static int ath9k_process_rate(struct ath_common *common,
*/
ath_print(common, ATH_DBG_XMIT, "unsupported hw bitrate detected "
"0x%02x using 1 Mbit\n", rx_stats->rs_rate);
if ((common->debug_mask & ATH_DBG_XMIT))
print_hex_dump_bytes("", DUMP_PREFIX_NONE, skb->data, skb->len);

return -EINVAL;
}

static void ath9k_process_rssi(struct ath_common *common,
struct ieee80211_hw *hw,
struct sk_buff *skb,
struct ieee80211_hdr *hdr,
struct ath_rx_status *rx_stats)
{
struct ath_hw *ah = common->ah;
struct ieee80211_sta *sta;
struct ieee80211_hdr *hdr;
struct ath_node *an;
int last_rssi = ATH_RSSI_DUMMY_MARKER;
__le16 fc;

hdr = (struct ieee80211_hdr *)skb->data;
fc = hdr->frame_control;

rcu_read_lock();
Expand Down Expand Up @@ -999,7 +992,7 @@ static void ath9k_process_rssi(struct ath_common *common,
*/
static int ath9k_rx_skb_preprocess(struct ath_common *common,
struct ieee80211_hw *hw,
struct sk_buff *skb,
struct ieee80211_hdr *hdr,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rx_status,
bool *decrypt_error)
Expand All @@ -1012,12 +1005,12 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common,
* everything but the rate is checked here, the rate check is done
* separately to avoid doing two lookups for a rate for each frame.
*/
if (!ath9k_rx_accept(common, skb, rx_status, rx_stats, decrypt_error))
if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
return -EINVAL;

ath9k_process_rssi(common, hw, skb, rx_stats);
ath9k_process_rssi(common, hw, hdr, rx_stats);

if (ath9k_process_rate(common, hw, rx_stats, rx_status, skb))
if (ath9k_process_rate(common, hw, rx_stats, rx_status))
return -EINVAL;

rx_status->mactime = ath9k_hw_extend_tsf(ah, rx_stats->rs_tstamp);
Expand Down Expand Up @@ -1142,7 +1135,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
if (flush)
goto requeue;

retval = ath9k_rx_skb_preprocess(common, hw, skb, &rs,
retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
rxs, &decrypt_error);
if (retval)
goto requeue;
Expand Down

0 comments on commit 41e6e03

Please sign in to comment.