@@ -974,9 +974,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
974974 struct ath_hw * ah = common -> ah ;
975975 struct ath_htc_rx_status * rxstatus ;
976976 struct ath_rx_status rx_stats ;
977- int hdrlen , padsize ;
978977 bool decrypt_error ;
979- __le16 fc ;
980978
981979 if (skb -> len < HTC_RX_FRAME_HEADER_SIZE ) {
982980 ath_err (common , "Corrupted RX frame, dropping (len: %d)\n" ,
@@ -1000,16 +998,6 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
1000998 memcpy (& rxbuf -> rxstatus , rxstatus , HTC_RX_FRAME_HEADER_SIZE );
1001999 skb_pull (skb , HTC_RX_FRAME_HEADER_SIZE );
10021000
1003- hdr = (struct ieee80211_hdr * )skb -> data ;
1004- fc = hdr -> frame_control ;
1005- hdrlen = ieee80211_get_hdrlen_from_skb (skb );
1006-
1007- padsize = hdrlen & 3 ;
1008- if (padsize && skb -> len >= hdrlen + padsize + FCS_LEN ) {
1009- memmove (skb -> data + padsize , skb -> data , hdrlen );
1010- skb_pull (skb , padsize );
1011- }
1012-
10131001 memset (rx_status , 0 , sizeof (struct ieee80211_rx_status ));
10141002
10151003 rx_status_htc_to_ath (& rx_stats , & rxbuf -> rxstatus );
@@ -1018,23 +1006,13 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
10181006 * everything but the rate is checked here, the rate check is done
10191007 * separately to avoid doing two lookups for a rate for each frame.
10201008 */
1009+ hdr = (struct ieee80211_hdr * )skb -> data ;
10211010 if (!ath9k_cmn_rx_accept (common , hdr , rx_status , & rx_stats ,
10221011 & decrypt_error , priv -> rxfilter ))
10231012 goto rx_next ;
10241013
1025- if (!(rxbuf -> rxstatus .rs_status & ATH9K_RXERR_DECRYPT )) {
1026- u8 keyix ;
1027- keyix = rxbuf -> rxstatus .rs_keyix ;
1028- if (keyix != ATH9K_RXKEYIX_INVALID ) {
1029- rx_status -> flag |= RX_FLAG_DECRYPTED ;
1030- } else if (ieee80211_has_protected (fc ) &&
1031- skb -> len >= hdrlen + 4 ) {
1032- keyix = skb -> data [hdrlen + 3 ] >> 6 ;
1033- if (test_bit (keyix , common -> keymap ))
1034- rx_status -> flag |= RX_FLAG_DECRYPTED ;
1035- }
1036- }
1037-
1014+ ath9k_cmn_rx_skb_postprocess (common , skb , & rx_stats ,
1015+ rx_status , decrypt_error );
10381016
10391017 if (ath9k_cmn_process_rate (common , hw , & rx_stats , rx_status ))
10401018 goto rx_next ;
0 commit comments