rtlwifi: rtl8192cu: Convert to use the new rate-mapping routine in rtlwifi
This patch also removes the now unused code from rtl8192ce/def.h. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
78851b66b1
commit
2b67e88f64
@@ -337,10 +337,10 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
|
||||
rx_status->flag |= RX_FLAG_MACTIME_MPDU;
|
||||
if (stats->decrypted)
|
||||
rx_status->flag |= RX_FLAG_DECRYPTED;
|
||||
rx_status->rate_idx = _rtl92c_rate_mapping(hw,
|
||||
(bool)GET_RX_DESC_RX_HT(pdesc),
|
||||
(u8)GET_RX_DESC_RX_MCS(pdesc),
|
||||
(bool)GET_RX_DESC_PAGGR(pdesc));
|
||||
rx_status->rate_idx = rtlwifi_rate_mapping(hw,
|
||||
(bool)GET_RX_DESC_RX_HT(pdesc),
|
||||
(u8)GET_RX_DESC_RX_MCS(pdesc),
|
||||
(bool)GET_RX_DESC_PAGGR(pdesc));
|
||||
rx_status->mactime = GET_RX_DESC_TSFL(pdesc);
|
||||
if (phystatus) {
|
||||
p_drvinfo = (struct rx_fwinfo_92c *)(pdesc + RTL_RX_DESC_SIZE);
|
||||
@@ -406,11 +406,10 @@ static void _rtl_rx_process(struct ieee80211_hw *hw, struct sk_buff *skb)
|
||||
if (GET_RX_DESC_RX_HT(rxdesc))
|
||||
rx_status->flag |= RX_FLAG_HT;
|
||||
/* Data rate */
|
||||
rx_status->rate_idx = _rtl92c_rate_mapping(hw,
|
||||
(bool)GET_RX_DESC_RX_HT(rxdesc),
|
||||
(u8)GET_RX_DESC_RX_MCS(rxdesc),
|
||||
(bool)GET_RX_DESC_PAGGR(rxdesc)
|
||||
);
|
||||
rx_status->rate_idx = rtlwifi_rate_mapping(hw,
|
||||
(bool)GET_RX_DESC_RX_HT(rxdesc),
|
||||
(u8)GET_RX_DESC_RX_MCS(rxdesc),
|
||||
(bool)GET_RX_DESC_PAGGR(rxdesc));
|
||||
/* There is a phy status after this rx descriptor. */
|
||||
if (GET_RX_DESC_PHY_STATUS(rxdesc)) {
|
||||
p_drvinfo = (struct rx_fwinfo_92c *)(rxdesc + RTL_RX_DESC_SIZE);
|
||||
@@ -545,7 +544,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
|
||||
SET_TX_DESC_RTS_BW(txdesc, 0);
|
||||
SET_TX_DESC_RTS_SC(txdesc, tcb_desc->rts_sc);
|
||||
SET_TX_DESC_RTS_SHORT(txdesc,
|
||||
((tcb_desc->rts_rate <= DESC92C_RATE54M) ?
|
||||
((tcb_desc->rts_rate <= DESC92_RATE54M) ?
|
||||
(tcb_desc->rts_use_shortpreamble ? 1 : 0)
|
||||
: (tcb_desc->rts_use_shortgi ? 1 : 0)));
|
||||
if (mac->bw_40) {
|
||||
@@ -643,7 +642,7 @@ void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
|
||||
}
|
||||
SET_TX_DESC_USE_RATE(pDesc, 1); /* use data rate which is set by Sw */
|
||||
SET_TX_DESC_OWN(pDesc, 1);
|
||||
SET_TX_DESC_TX_RATE(pDesc, DESC92C_RATE1M);
|
||||
SET_TX_DESC_TX_RATE(pDesc, DESC92_RATE1M);
|
||||
_rtl_tx_desc_checksum(pDesc);
|
||||
}
|
||||
|
||||
@@ -659,7 +658,7 @@ void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw,
|
||||
memset((void *)pdesc, 0, RTL_TX_HEADER_SIZE);
|
||||
if (firstseg)
|
||||
SET_TX_DESC_OFFSET(pdesc, RTL_TX_HEADER_SIZE);
|
||||
SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M);
|
||||
SET_TX_DESC_TX_RATE(pdesc, DESC92_RATE1M);
|
||||
SET_TX_DESC_SEQ(pdesc, 0);
|
||||
SET_TX_DESC_LINIP(pdesc, 0);
|
||||
SET_TX_DESC_QUEUE_SEL(pdesc, fw_queue);
|
||||
|
Reference in New Issue
Block a user