diff options
author | Vasanthakumar Thiagarajan <vasanth@atheros.com> | 2010-05-20 17:34:46 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-06-02 16:13:31 -0400 |
commit | 9f167f6480c87e22ce1b934cc839d1786b373b70 (patch) | |
tree | c6796903a54c806098d0b4d295140da8d1ee7bba /drivers/net | |
parent | 93ef24b29bb6d6d50763c44c0debec4a9547fc58 (diff) |
ath9k: Clean up few function parameters in recv.c
ath9k_rx_skb_preprocess() needs only ieee80211 frame header,
pass only frame headers instead of skb to that function. Also
remove ineffective frame dump in ath9k_process_rate().
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index a0f89a48509e..3563e44553f9 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -823,16 +823,14 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc, | |||
823 | 823 | ||
824 | /* Assumes you've already done the endian to CPU conversion */ | 824 | /* Assumes you've already done the endian to CPU conversion */ |
825 | static bool ath9k_rx_accept(struct ath_common *common, | 825 | static bool ath9k_rx_accept(struct ath_common *common, |
826 | struct sk_buff *skb, | 826 | struct ieee80211_hdr *hdr, |
827 | struct ieee80211_rx_status *rxs, | 827 | struct ieee80211_rx_status *rxs, |
828 | struct ath_rx_status *rx_stats, | 828 | struct ath_rx_status *rx_stats, |
829 | bool *decrypt_error) | 829 | bool *decrypt_error) |
830 | { | 830 | { |
831 | struct ath_hw *ah = common->ah; | 831 | struct ath_hw *ah = common->ah; |
832 | struct ieee80211_hdr *hdr; | ||
833 | __le16 fc; | 832 | __le16 fc; |
834 | 833 | ||
835 | hdr = (struct ieee80211_hdr *) skb->data; | ||
836 | fc = hdr->frame_control; | 834 | fc = hdr->frame_control; |
837 | 835 | ||
838 | if (!rx_stats->rs_datalen) | 836 | if (!rx_stats->rs_datalen) |
@@ -903,8 +901,7 @@ static bool ath9k_rx_accept(struct ath_common *common, | |||
903 | static int ath9k_process_rate(struct ath_common *common, | 901 | static int ath9k_process_rate(struct ath_common *common, |
904 | struct ieee80211_hw *hw, | 902 | struct ieee80211_hw *hw, |
905 | struct ath_rx_status *rx_stats, | 903 | struct ath_rx_status *rx_stats, |
906 | struct ieee80211_rx_status *rxs, | 904 | struct ieee80211_rx_status *rxs) |
907 | struct sk_buff *skb) | ||
908 | { | 905 | { |
909 | struct ieee80211_supported_band *sband; | 906 | struct ieee80211_supported_band *sband; |
910 | enum ieee80211_band band; | 907 | enum ieee80211_band band; |
@@ -942,25 +939,21 @@ static int ath9k_process_rate(struct ath_common *common, | |||
942 | */ | 939 | */ |
943 | ath_print(common, ATH_DBG_XMIT, "unsupported hw bitrate detected " | 940 | ath_print(common, ATH_DBG_XMIT, "unsupported hw bitrate detected " |
944 | "0x%02x using 1 Mbit\n", rx_stats->rs_rate); | 941 | "0x%02x using 1 Mbit\n", rx_stats->rs_rate); |
945 | if ((common->debug_mask & ATH_DBG_XMIT)) | ||
946 | print_hex_dump_bytes("", DUMP_PREFIX_NONE, skb->data, skb->len); | ||
947 | 942 | ||
948 | return -EINVAL; | 943 | return -EINVAL; |
949 | } | 944 | } |
950 | 945 | ||
951 | static void ath9k_process_rssi(struct ath_common *common, | 946 | static void ath9k_process_rssi(struct ath_common *common, |
952 | struct ieee80211_hw *hw, | 947 | struct ieee80211_hw *hw, |
953 | struct sk_buff *skb, | 948 | struct ieee80211_hdr *hdr, |
954 | struct ath_rx_status *rx_stats) | 949 | struct ath_rx_status *rx_stats) |
955 | { | 950 | { |
956 | struct ath_hw *ah = common->ah; | 951 | struct ath_hw *ah = common->ah; |
957 | struct ieee80211_sta *sta; | 952 | struct ieee80211_sta *sta; |
958 | struct ieee80211_hdr *hdr; | ||
959 | struct ath_node *an; | 953 | struct ath_node *an; |
960 | int last_rssi = ATH_RSSI_DUMMY_MARKER; | 954 | int last_rssi = ATH_RSSI_DUMMY_MARKER; |
961 | __le16 fc; | 955 | __le16 fc; |
962 | 956 | ||
963 | hdr = (struct ieee80211_hdr *)skb->data; | ||
964 | fc = hdr->frame_control; | 957 | fc = hdr->frame_control; |
965 | 958 | ||
966 | rcu_read_lock(); | 959 | rcu_read_lock(); |
@@ -999,7 +992,7 @@ static void ath9k_process_rssi(struct ath_common *common, | |||
999 | */ | 992 | */ |
1000 | static int ath9k_rx_skb_preprocess(struct ath_common *common, | 993 | static int ath9k_rx_skb_preprocess(struct ath_common *common, |
1001 | struct ieee80211_hw *hw, | 994 | struct ieee80211_hw *hw, |
1002 | struct sk_buff *skb, | 995 | struct ieee80211_hdr *hdr, |
1003 | struct ath_rx_status *rx_stats, | 996 | struct ath_rx_status *rx_stats, |
1004 | struct ieee80211_rx_status *rx_status, | 997 | struct ieee80211_rx_status *rx_status, |
1005 | bool *decrypt_error) | 998 | bool *decrypt_error) |
@@ -1012,12 +1005,12 @@ static int ath9k_rx_skb_preprocess(struct ath_common *common, | |||
1012 | * everything but the rate is checked here, the rate check is done | 1005 | * everything but the rate is checked here, the rate check is done |
1013 | * separately to avoid doing two lookups for a rate for each frame. | 1006 | * separately to avoid doing two lookups for a rate for each frame. |
1014 | */ | 1007 | */ |
1015 | if (!ath9k_rx_accept(common, skb, rx_status, rx_stats, decrypt_error)) | 1008 | if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error)) |
1016 | return -EINVAL; | 1009 | return -EINVAL; |
1017 | 1010 | ||
1018 | ath9k_process_rssi(common, hw, skb, rx_stats); | 1011 | ath9k_process_rssi(common, hw, hdr, rx_stats); |
1019 | 1012 | ||
1020 | if (ath9k_process_rate(common, hw, rx_stats, rx_status, skb)) | 1013 | if (ath9k_process_rate(common, hw, rx_stats, rx_status)) |
1021 | return -EINVAL; | 1014 | return -EINVAL; |
1022 | 1015 | ||
1023 | rx_status->mactime = ath9k_hw_extend_tsf(ah, rx_stats->rs_tstamp); | 1016 | rx_status->mactime = ath9k_hw_extend_tsf(ah, rx_stats->rs_tstamp); |
@@ -1142,7 +1135,7 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp) | |||
1142 | if (flush) | 1135 | if (flush) |
1143 | goto requeue; | 1136 | goto requeue; |
1144 | 1137 | ||
1145 | retval = ath9k_rx_skb_preprocess(common, hw, skb, &rs, | 1138 | retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs, |
1146 | rxs, &decrypt_error); | 1139 | rxs, &decrypt_error); |
1147 | if (retval) | 1140 | if (retval) |
1148 | goto requeue; | 1141 | goto requeue; |