aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOleksij Rempel <linux@rempel-privat.de>2013-05-24 06:18:30 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-05-30 14:42:34 -0400
commitab276103357637fb26cc851369b5abbdc42afbf4 (patch)
tree468852d3715808f05e90d2ea13c9f5598a1018f8 /drivers
parenta910e4a94f6923c8c988565525f017f687bf7205 (diff)
ath9k: remove useless flag conversation.
some flags used only outside of ath9k - In this case we can use "enum mac80211_rx_flags" and pass it upstream without extra conversation. Signed-off-by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mac.c5
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.c11
-rw-r--r--drivers/net/wireless/ath/ath9k/mac.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/recv.c5
4 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mac.c b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
index 301bf72c53bf..5163abd3937c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
@@ -469,6 +469,7 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
469 469
470 rxs->rs_status = 0; 470 rxs->rs_status = 0;
471 rxs->rs_flags = 0; 471 rxs->rs_flags = 0;
472 rxs->flag = 0;
472 473
473 rxs->rs_datalen = rxsp->status2 & AR_DataLen; 474 rxs->rs_datalen = rxsp->status2 & AR_DataLen;
474 rxs->rs_tstamp = rxsp->status3; 475 rxs->rs_tstamp = rxsp->status3;
@@ -493,8 +494,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
493 rxs->rs_isaggr = (rxsp->status11 & AR_RxAggr) ? 1 : 0; 494 rxs->rs_isaggr = (rxsp->status11 & AR_RxAggr) ? 1 : 0;
494 rxs->rs_moreaggr = (rxsp->status11 & AR_RxMoreAggr) ? 1 : 0; 495 rxs->rs_moreaggr = (rxsp->status11 & AR_RxMoreAggr) ? 1 : 0;
495 rxs->rs_antenna = (MS(rxsp->status4, AR_RxAntenna) & 0x7); 496 rxs->rs_antenna = (MS(rxsp->status4, AR_RxAntenna) & 0x7);
496 rxs->rs_flags = (rxsp->status4 & AR_GI) ? ATH9K_RX_GI : 0; 497 rxs->flag |= (rxsp->status4 & AR_GI) ? RX_FLAG_SHORT_GI : 0;
497 rxs->rs_flags |= (rxsp->status4 & AR_2040) ? ATH9K_RX_2040 : 0; 498 rxs->flag |= (rxsp->status4 & AR_2040) ? RX_FLAG_40MHZ : 0;
498 499
499 rxs->evm0 = rxsp->status6; 500 rxs->evm0 = rxsp->status6;
500 rxs->evm1 = rxsp->status7; 501 rxs->evm1 = rxsp->status7;
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c
index 498fee04afa0..a52081d73bef 100644
--- a/drivers/net/wireless/ath/ath9k/mac.c
+++ b/drivers/net/wireless/ath/ath9k/mac.c
@@ -547,6 +547,7 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
547 547
548 rs->rs_status = 0; 548 rs->rs_status = 0;
549 rs->rs_flags = 0; 549 rs->rs_flags = 0;
550 rs->flag = 0;
550 551
551 rs->rs_datalen = ads.ds_rxstatus1 & AR_DataLen; 552 rs->rs_datalen = ads.ds_rxstatus1 & AR_DataLen;
552 rs->rs_tstamp = ads.AR_RcvTimestamp; 553 rs->rs_tstamp = ads.AR_RcvTimestamp;
@@ -586,10 +587,12 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
586 rs->rs_moreaggr = 587 rs->rs_moreaggr =
587 (ads.ds_rxstatus8 & AR_RxMoreAggr) ? 1 : 0; 588 (ads.ds_rxstatus8 & AR_RxMoreAggr) ? 1 : 0;
588 rs->rs_antenna = MS(ads.ds_rxstatus3, AR_RxAntenna); 589 rs->rs_antenna = MS(ads.ds_rxstatus3, AR_RxAntenna);
589 rs->rs_flags = 590
590 (ads.ds_rxstatus3 & AR_GI) ? ATH9K_RX_GI : 0; 591 /* directly mapped flags for ieee80211_rx_status */
591 rs->rs_flags |= 592 rs->flag |=
592 (ads.ds_rxstatus3 & AR_2040) ? ATH9K_RX_2040 : 0; 593 (ads.ds_rxstatus3 & AR_GI) ? RX_FLAG_SHORT_GI : 0;
594 rs->flag |=
595 (ads.ds_rxstatus3 & AR_2040) ? RX_FLAG_40MHZ : 0;
593 596
594 if (ads.ds_rxstatus8 & AR_PreDelimCRCErr) 597 if (ads.ds_rxstatus8 & AR_PreDelimCRCErr)
595 rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE; 598 rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE;
diff --git a/drivers/net/wireless/ath/ath9k/mac.h b/drivers/net/wireless/ath/ath9k/mac.h
index 5865f92998e1..3f1e7754a1a7 100644
--- a/drivers/net/wireless/ath/ath9k/mac.h
+++ b/drivers/net/wireless/ath/ath9k/mac.h
@@ -149,6 +149,7 @@ struct ath_rx_status {
149 u32 evm2; 149 u32 evm2;
150 u32 evm3; 150 u32 evm3;
151 u32 evm4; 151 u32 evm4;
152 u32 flag; /* see enum mac80211_rx_flags */
152}; 153};
153 154
154struct ath_htc_rx_status { 155struct ath_htc_rx_status {
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 8be2b5d8c155..b4b758deb30e 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -868,10 +868,7 @@ static int ath9k_process_rate(struct ath_common *common,
868 if (rx_stats->rs_rate & 0x80) { 868 if (rx_stats->rs_rate & 0x80) {
869 /* HT rate */ 869 /* HT rate */
870 rxs->flag |= RX_FLAG_HT; 870 rxs->flag |= RX_FLAG_HT;
871 if (rx_stats->rs_flags & ATH9K_RX_2040) 871 rxs->flag |= rx_stats->flag;
872 rxs->flag |= RX_FLAG_40MHZ;
873 if (rx_stats->rs_flags & ATH9K_RX_GI)
874 rxs->flag |= RX_FLAG_SHORT_GI;
875 rxs->rate_idx = rx_stats->rs_rate & 0x7f; 872 rxs->rate_idx = rx_stats->rs_rate & 0x7f;
876 return 0; 873 return 0;
877 } 874 }