diff options
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192cu')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 11 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/phy.h | 14 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/rf.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 48 | ||||
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8192cu/trx.h | 5 |
9 files changed, 66 insertions, 41 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c index e43be2547827..52e2af58c1ed 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | |||
@@ -39,6 +39,7 @@ | |||
39 | #include "mac.h" | 39 | #include "mac.h" |
40 | #include "dm.h" | 40 | #include "dm.h" |
41 | #include "hw.h" | 41 | #include "hw.h" |
42 | #include "../rtl8192ce/hw.h" | ||
42 | #include "trx.h" | 43 | #include "trx.h" |
43 | #include "led.h" | 44 | #include "led.h" |
44 | #include "table.h" | 45 | #include "table.h" |
@@ -605,10 +606,10 @@ void rtl92cu_read_eeprom_info(struct ieee80211_hw *hw) | |||
605 | if (!IS_NORMAL_CHIP(rtlhal->version)) | 606 | if (!IS_NORMAL_CHIP(rtlhal->version)) |
606 | return; | 607 | return; |
607 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); | 608 | tmp_u1b = rtl_read_byte(rtlpriv, REG_9346CR); |
608 | rtlefuse->epromtype = (tmp_u1b & EEPROMSEL) ? | 609 | rtlefuse->epromtype = (tmp_u1b & BOOT_FROM_EEPROM) ? |
609 | EEPROM_93C46 : EEPROM_BOOT_EFUSE; | 610 | EEPROM_93C46 : EEPROM_BOOT_EFUSE; |
610 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("Boot from %s\n", | 611 | RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, ("Boot from %s\n", |
611 | (tmp_u1b & EEPROMSEL) ? "EERROM" : "EFUSE")); | 612 | (tmp_u1b & BOOT_FROM_EEPROM) ? "EERROM" : "EFUSE")); |
612 | rtlefuse->autoload_failflag = (tmp_u1b & EEPROM_EN) ? false : true; | 613 | rtlefuse->autoload_failflag = (tmp_u1b & EEPROM_EN) ? false : true; |
613 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload %s\n", | 614 | RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, ("Autoload %s\n", |
614 | (tmp_u1b & EEPROM_EN) ? "OK!!" : "ERR!!")); | 615 | (tmp_u1b & EEPROM_EN) ? "OK!!" : "ERR!!")); |
@@ -977,7 +978,7 @@ static void _rtl92cu_init_wmac_setting(struct ieee80211_hw *hw) | |||
977 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 978 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
978 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 979 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
979 | 980 | ||
980 | mac->rx_conf = (RCR_APM | RCR_AM | RCR_ADF | RCR_AB | RCR_APP_FCS | | 981 | mac->rx_conf = (RCR_APM | RCR_AM | RCR_ADF | RCR_AB | RCR_APPFCS | |
981 | RCR_APP_ICV | RCR_AMF | RCR_HTC_LOC_CTRL | | 982 | RCR_APP_ICV | RCR_AMF | RCR_HTC_LOC_CTRL | |
982 | RCR_APP_MIC | RCR_APP_PHYSTS | RCR_ACRC32); | 983 | RCR_APP_MIC | RCR_APP_PHYSTS | RCR_ACRC32); |
983 | rtl_write_dword(rtlpriv, REG_RCR, mac->rx_conf); | 984 | rtl_write_dword(rtlpriv, REG_RCR, mac->rx_conf); |
@@ -2182,7 +2183,9 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) | |||
2182 | } | 2183 | } |
2183 | } | 2184 | } |
2184 | 2185 | ||
2185 | void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw) | 2186 | void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, |
2187 | struct ieee80211_sta *sta, | ||
2188 | u8 rssi_level) | ||
2186 | { | 2189 | { |
2187 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 2190 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
2188 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 2191 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h index 62af555bb61c..32f85cba106a 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.h | |||
@@ -98,13 +98,14 @@ void rtl92cu_update_interrupt_mask(struct ieee80211_hw *hw, | |||
98 | u32 add_msr, u32 rm_msr); | 98 | u32 add_msr, u32 rm_msr); |
99 | void rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val); | 99 | void rtl92cu_get_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val); |
100 | void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val); | 100 | void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val); |
101 | void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw); | 101 | void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, |
102 | struct ieee80211_sta *sta, | ||
103 | u8 rssi_level); | ||
102 | void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level); | 104 | void rtl92cu_update_hal_rate_mask(struct ieee80211_hw *hw, u8 rssi_level); |
103 | 105 | ||
104 | void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw); | 106 | void rtl92cu_update_channel_access_setting(struct ieee80211_hw *hw); |
105 | bool rtl92cu_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid); | 107 | bool rtl92cu_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 * valid); |
106 | void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid); | 108 | void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid); |
107 | u8 _rtl92c_get_chnl_group(u8 chnl); | ||
108 | int rtl92c_download_fw(struct ieee80211_hw *hw); | 109 | int rtl92c_download_fw(struct ieee80211_hw *hw); |
109 | void rtl92c_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode); | 110 | void rtl92c_set_fw_pwrmode_cmd(struct ieee80211_hw *hw, u8 mode); |
110 | void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished); | 111 | void rtl92c_set_fw_rsvdpagepkt(struct ieee80211_hw *hw, bool dl_finished); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c index 4e020e654e6b..9a3d0239e27e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.c | |||
@@ -38,7 +38,7 @@ | |||
38 | #include "table.h" | 38 | #include "table.h" |
39 | 39 | ||
40 | u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw, | 40 | u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw, |
41 | enum radio_path rfpath, u32 regaddr, u32 bitmask) | 41 | enum radio_path rfpath, u32 regaddr, u32 bitmask) |
42 | { | 42 | { |
43 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 43 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
44 | u32 original_value, readback_value, bitshift; | 44 | u32 original_value, readback_value, bitshift; |
@@ -64,8 +64,8 @@ u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw, | |||
64 | } | 64 | } |
65 | 65 | ||
66 | void rtl92cu_phy_set_rf_reg(struct ieee80211_hw *hw, | 66 | void rtl92cu_phy_set_rf_reg(struct ieee80211_hw *hw, |
67 | enum radio_path rfpath, | 67 | enum radio_path rfpath, |
68 | u32 regaddr, u32 bitmask, u32 data) | 68 | u32 regaddr, u32 bitmask, u32 data) |
69 | { | 69 | { |
70 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 70 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
71 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 71 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
@@ -163,7 +163,7 @@ bool _rtl92cu_phy_config_mac_with_headerfile(struct ieee80211_hw *hw) | |||
163 | } | 163 | } |
164 | 164 | ||
165 | bool _rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, | 165 | bool _rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, |
166 | u8 configtype) | 166 | u8 configtype) |
167 | { | 167 | { |
168 | int i; | 168 | int i; |
169 | u32 *phy_regarray_table; | 169 | u32 *phy_regarray_table; |
@@ -223,7 +223,7 @@ bool _rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, | |||
223 | } | 223 | } |
224 | 224 | ||
225 | bool _rtl92cu_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, | 225 | bool _rtl92cu_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, |
226 | u8 configtype) | 226 | u8 configtype) |
227 | { | 227 | { |
228 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 228 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
229 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 229 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
@@ -459,7 +459,7 @@ void _rtl92cu_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t) | |||
459 | } | 459 | } |
460 | } | 460 | } |
461 | 461 | ||
462 | bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, | 462 | static bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, |
463 | enum rf_pwrstate rfpwr_state) | 463 | enum rf_pwrstate rfpwr_state) |
464 | { | 464 | { |
465 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 465 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
@@ -595,7 +595,7 @@ bool _rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, | |||
595 | } | 595 | } |
596 | 596 | ||
597 | bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, | 597 | bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, |
598 | enum rf_pwrstate rfpwr_state) | 598 | enum rf_pwrstate rfpwr_state) |
599 | { | 599 | { |
600 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 600 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
601 | bool bresult = false; | 601 | bool bresult = false; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.h b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.h index 06299559ab68..ff81a61729d7 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/phy.h +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/phy.h | |||
@@ -34,3 +34,17 @@ bool rtl8192_phy_check_is_legal_rfpath(struct ieee80211_hw *hw, u32 rfpath); | |||
34 | void rtl92c_phy_set_io(struct ieee80211_hw *hw); | 34 | void rtl92c_phy_set_io(struct ieee80211_hw *hw); |
35 | bool _rtl92cu_phy_config_mac_with_headerfile(struct ieee80211_hw *hw); | 35 | bool _rtl92cu_phy_config_mac_with_headerfile(struct ieee80211_hw *hw); |
36 | bool rtl92cu_phy_bb_config(struct ieee80211_hw *hw); | 36 | bool rtl92cu_phy_bb_config(struct ieee80211_hw *hw); |
37 | u32 rtl92cu_phy_query_rf_reg(struct ieee80211_hw *hw, | ||
38 | enum radio_path rfpath, u32 regaddr, u32 bitmask); | ||
39 | void rtl92cu_phy_set_rf_reg(struct ieee80211_hw *hw, | ||
40 | enum radio_path rfpath, | ||
41 | u32 regaddr, u32 bitmask, u32 data); | ||
42 | bool rtl92cu_phy_mac_config(struct ieee80211_hw *hw); | ||
43 | bool _rtl92cu_phy_config_bb_with_pgheaderfile(struct ieee80211_hw *hw, | ||
44 | u8 configtype); | ||
45 | void _rtl92cu_phy_lc_calibrate(struct ieee80211_hw *hw, bool is2t); | ||
46 | bool _rtl92cu_phy_config_bb_with_headerfile(struct ieee80211_hw *hw, | ||
47 | u8 configtype); | ||
48 | void rtl92cu_phy_set_bw_mode_callback(struct ieee80211_hw *hw); | ||
49 | bool rtl92cu_phy_set_rf_power_state(struct ieee80211_hw *hw, | ||
50 | enum rf_pwrstate rfpwr_state); | ||
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c index 1c79c226f145..c7576ec4744e 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.c | |||
@@ -62,7 +62,7 @@ void rtl92cu_phy_rf6052_set_bandwidth(struct ieee80211_hw *hw, u8 bandwidth) | |||
62 | } | 62 | } |
63 | 63 | ||
64 | void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | 64 | void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, |
65 | u8 *ppowerlevel) | 65 | u8 *ppowerlevel) |
66 | { | 66 | { |
67 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 67 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
68 | struct rtl_phy *rtlphy = &(rtlpriv->phy); | 68 | struct rtl_phy *rtlphy = &(rtlpriv->phy); |
@@ -389,7 +389,7 @@ static void _rtl92c_write_ofdm_power_reg(struct ieee80211_hw *hw, | |||
389 | } | 389 | } |
390 | 390 | ||
391 | void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, | 391 | void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, |
392 | u8 *ppowerlevel, u8 channel) | 392 | u8 *ppowerlevel, u8 channel) |
393 | { | 393 | { |
394 | u32 writeVal[2], powerBase0[2], powerBase1[2]; | 394 | u32 writeVal[2], powerBase0[2], powerBase1[2]; |
395 | u8 index = 0; | 395 | u8 index = 0; |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h index 86c2728cfa00..500a2094b6bb 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/rf.h | |||
@@ -43,5 +43,9 @@ extern void rtl92c_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, | |||
43 | bool rtl92cu_phy_rf6052_config(struct ieee80211_hw *hw); | 43 | bool rtl92cu_phy_rf6052_config(struct ieee80211_hw *hw); |
44 | bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, | 44 | bool rtl92cu_phy_config_rf_with_headerfile(struct ieee80211_hw *hw, |
45 | enum radio_path rfpath); | 45 | enum radio_path rfpath); |
46 | void rtl92cu_phy_rf6052_set_cck_txpower(struct ieee80211_hw *hw, | ||
47 | u8 *ppowerlevel); | ||
48 | void rtl92cu_phy_rf6052_set_ofdm_txpower(struct ieee80211_hw *hw, | ||
49 | u8 *ppowerlevel, u8 channel); | ||
46 | 50 | ||
47 | #endif | 51 | #endif |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c index 71244a38d49e..bee7c1480f63 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/sw.c | |||
@@ -94,7 +94,7 @@ static struct rtl_hal_ops rtl8192cu_hal_ops = { | |||
94 | .update_interrupt_mask = rtl92cu_update_interrupt_mask, | 94 | .update_interrupt_mask = rtl92cu_update_interrupt_mask, |
95 | .get_hw_reg = rtl92cu_get_hw_reg, | 95 | .get_hw_reg = rtl92cu_get_hw_reg, |
96 | .set_hw_reg = rtl92cu_set_hw_reg, | 96 | .set_hw_reg = rtl92cu_set_hw_reg, |
97 | .update_rate_table = rtl92cu_update_hal_rate_table, | 97 | .update_rate_tbl = rtl92cu_update_hal_rate_table, |
98 | .update_rate_mask = rtl92cu_update_hal_rate_mask, | 98 | .update_rate_mask = rtl92cu_update_hal_rate_mask, |
99 | .fill_tx_desc = rtl92cu_tx_fill_desc, | 99 | .fill_tx_desc = rtl92cu_tx_fill_desc, |
100 | .fill_fake_txdesc = rtl92cu_fill_fake_txdesc, | 100 | .fill_fake_txdesc = rtl92cu_fill_fake_txdesc, |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c index 3f0cb81c424f..79c98f62175f 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | |||
@@ -498,14 +498,14 @@ static void _rtl_tx_desc_checksum(u8 *txdesc) | |||
498 | void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | 498 | void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, |
499 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, | 499 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, |
500 | struct ieee80211_tx_info *info, struct sk_buff *skb, | 500 | struct ieee80211_tx_info *info, struct sk_buff *skb, |
501 | unsigned int queue_index) | 501 | u8 queue_index, |
502 | struct rtl_tcb_desc *tcb_desc) | ||
502 | { | 503 | { |
503 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 504 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
504 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); | 505 | struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); |
505 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); | 506 | struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); |
506 | bool defaultadapter = true; | 507 | bool defaultadapter = true; |
507 | struct ieee80211_sta *sta; | 508 | struct ieee80211_sta *sta = info->control.sta = info->control.sta; |
508 | struct rtl_tcb_desc tcb_desc; | ||
509 | u8 *qc = ieee80211_get_qos_ctl(hdr); | 509 | u8 *qc = ieee80211_get_qos_ctl(hdr); |
510 | u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; | 510 | u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; |
511 | u16 seq_number; | 511 | u16 seq_number; |
@@ -517,15 +517,15 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
517 | u8 *txdesc; | 517 | u8 *txdesc; |
518 | 518 | ||
519 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; | 519 | seq_number = (le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4; |
520 | rtl_get_tcb_desc(hw, info, skb, &tcb_desc); | 520 | rtl_get_tcb_desc(hw, info, sta, skb, tcb_desc); |
521 | txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE); | 521 | txdesc = (u8 *)skb_push(skb, RTL_TX_HEADER_SIZE); |
522 | memset(txdesc, 0, RTL_TX_HEADER_SIZE); | 522 | memset(txdesc, 0, RTL_TX_HEADER_SIZE); |
523 | SET_TX_DESC_PKT_SIZE(txdesc, pktlen); | 523 | SET_TX_DESC_PKT_SIZE(txdesc, pktlen); |
524 | SET_TX_DESC_LINIP(txdesc, 0); | 524 | SET_TX_DESC_LINIP(txdesc, 0); |
525 | SET_TX_DESC_PKT_OFFSET(txdesc, RTL_DUMMY_OFFSET); | 525 | SET_TX_DESC_PKT_OFFSET(txdesc, RTL_DUMMY_OFFSET); |
526 | SET_TX_DESC_OFFSET(txdesc, RTL_TX_HEADER_SIZE); | 526 | SET_TX_DESC_OFFSET(txdesc, RTL_TX_HEADER_SIZE); |
527 | SET_TX_DESC_TX_RATE(txdesc, tcb_desc.hw_rate); | 527 | SET_TX_DESC_TX_RATE(txdesc, tcb_desc->hw_rate); |
528 | if (tcb_desc.use_shortgi || tcb_desc.use_shortpreamble) | 528 | if (tcb_desc->use_shortgi || tcb_desc->use_shortpreamble) |
529 | SET_TX_DESC_DATA_SHORTGI(txdesc, 1); | 529 | SET_TX_DESC_DATA_SHORTGI(txdesc, 1); |
530 | if (mac->tids[tid].agg.agg_state == RTL_AGG_ON && | 530 | if (mac->tids[tid].agg.agg_state == RTL_AGG_ON && |
531 | info->flags & IEEE80211_TX_CTL_AMPDU) { | 531 | info->flags & IEEE80211_TX_CTL_AMPDU) { |
@@ -535,21 +535,21 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
535 | SET_TX_DESC_AGG_BREAK(txdesc, 1); | 535 | SET_TX_DESC_AGG_BREAK(txdesc, 1); |
536 | } | 536 | } |
537 | SET_TX_DESC_SEQ(txdesc, seq_number); | 537 | SET_TX_DESC_SEQ(txdesc, seq_number); |
538 | SET_TX_DESC_RTS_ENABLE(txdesc, ((tcb_desc.rts_enable && | 538 | SET_TX_DESC_RTS_ENABLE(txdesc, ((tcb_desc->rts_enable && |
539 | !tcb_desc.cts_enable) ? 1 : 0)); | 539 | !tcb_desc->cts_enable) ? 1 : 0)); |
540 | SET_TX_DESC_HW_RTS_ENABLE(txdesc, ((tcb_desc.rts_enable || | 540 | SET_TX_DESC_HW_RTS_ENABLE(txdesc, ((tcb_desc->rts_enable || |
541 | tcb_desc.cts_enable) ? 1 : 0)); | 541 | tcb_desc->cts_enable) ? 1 : 0)); |
542 | SET_TX_DESC_CTS2SELF(txdesc, ((tcb_desc.cts_enable) ? 1 : 0)); | 542 | SET_TX_DESC_CTS2SELF(txdesc, ((tcb_desc->cts_enable) ? 1 : 0)); |
543 | SET_TX_DESC_RTS_STBC(txdesc, ((tcb_desc.rts_stbc) ? 1 : 0)); | 543 | SET_TX_DESC_RTS_STBC(txdesc, ((tcb_desc->rts_stbc) ? 1 : 0)); |
544 | SET_TX_DESC_RTS_RATE(txdesc, tcb_desc.rts_rate); | 544 | SET_TX_DESC_RTS_RATE(txdesc, tcb_desc->rts_rate); |
545 | SET_TX_DESC_RTS_BW(txdesc, 0); | 545 | SET_TX_DESC_RTS_BW(txdesc, 0); |
546 | SET_TX_DESC_RTS_SC(txdesc, tcb_desc.rts_sc); | 546 | SET_TX_DESC_RTS_SC(txdesc, tcb_desc->rts_sc); |
547 | SET_TX_DESC_RTS_SHORT(txdesc, | 547 | SET_TX_DESC_RTS_SHORT(txdesc, |
548 | ((tcb_desc.rts_rate <= DESC92C_RATE54M) ? | 548 | ((tcb_desc->rts_rate <= DESC92C_RATE54M) ? |
549 | (tcb_desc.rts_use_shortpreamble ? 1 : 0) | 549 | (tcb_desc->rts_use_shortpreamble ? 1 : 0) |
550 | : (tcb_desc.rts_use_shortgi ? 1 : 0))); | 550 | : (tcb_desc->rts_use_shortgi ? 1 : 0))); |
551 | if (mac->bw_40) { | 551 | if (mac->bw_40) { |
552 | if (tcb_desc.packet_bw) { | 552 | if (tcb_desc->packet_bw) { |
553 | SET_TX_DESC_DATA_BW(txdesc, 1); | 553 | SET_TX_DESC_DATA_BW(txdesc, 1); |
554 | SET_TX_DESC_DATA_SC(txdesc, 3); | 554 | SET_TX_DESC_DATA_SC(txdesc, 3); |
555 | } else { | 555 | } else { |
@@ -590,7 +590,7 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
590 | SET_TX_DESC_DATA_RATE_FB_LIMIT(txdesc, 0x1F); | 590 | SET_TX_DESC_DATA_RATE_FB_LIMIT(txdesc, 0x1F); |
591 | SET_TX_DESC_RTS_RATE_FB_LIMIT(txdesc, 0xF); | 591 | SET_TX_DESC_RTS_RATE_FB_LIMIT(txdesc, 0xF); |
592 | SET_TX_DESC_DISABLE_FB(txdesc, 0); | 592 | SET_TX_DESC_DISABLE_FB(txdesc, 0); |
593 | SET_TX_DESC_USE_RATE(txdesc, tcb_desc.use_driver_rate ? 1 : 0); | 593 | SET_TX_DESC_USE_RATE(txdesc, tcb_desc->use_driver_rate ? 1 : 0); |
594 | if (ieee80211_is_data_qos(fc)) { | 594 | if (ieee80211_is_data_qos(fc)) { |
595 | if (mac->rdg_en) { | 595 | if (mac->rdg_en) { |
596 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, | 596 | RT_TRACE(rtlpriv, COMP_SEND, DBG_TRACE, |
@@ -600,11 +600,11 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | |||
600 | } | 600 | } |
601 | } | 601 | } |
602 | if (rtlpriv->dm.useramask) { | 602 | if (rtlpriv->dm.useramask) { |
603 | SET_TX_DESC_RATE_ID(txdesc, tcb_desc.ratr_index); | 603 | SET_TX_DESC_RATE_ID(txdesc, tcb_desc->ratr_index); |
604 | SET_TX_DESC_MACID(txdesc, tcb_desc.mac_id); | 604 | SET_TX_DESC_MACID(txdesc, tcb_desc->mac_id); |
605 | } else { | 605 | } else { |
606 | SET_TX_DESC_RATE_ID(txdesc, 0xC + tcb_desc.ratr_index); | 606 | SET_TX_DESC_RATE_ID(txdesc, 0xC + tcb_desc->ratr_index); |
607 | SET_TX_DESC_MACID(txdesc, tcb_desc.ratr_index); | 607 | SET_TX_DESC_MACID(txdesc, tcb_desc->ratr_index); |
608 | } | 608 | } |
609 | if ((!ieee80211_is_data_qos(fc)) && ppsc->leisure_ps && | 609 | if ((!ieee80211_is_data_qos(fc)) && ppsc->leisure_ps && |
610 | ppsc->fwctrl_lps) { | 610 | ppsc->fwctrl_lps) { |
@@ -656,7 +656,7 @@ void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, | |||
656 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); | 656 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)(skb->data); |
657 | __le16 fc = hdr->frame_control; | 657 | __le16 fc = hdr->frame_control; |
658 | 658 | ||
659 | memset(pdesc, 0, RTL_TX_HEADER_SIZE); | 659 | memset((void *)pdesc, 0, RTL_TX_HEADER_SIZE); |
660 | if (firstseg) | 660 | if (firstseg) |
661 | SET_TX_DESC_OFFSET(pdesc, RTL_TX_HEADER_SIZE); | 661 | SET_TX_DESC_OFFSET(pdesc, RTL_TX_HEADER_SIZE); |
662 | SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M); | 662 | SET_TX_DESC_TX_RATE(pdesc, DESC92C_RATE1M); |
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h index b396d46edbb7..53de5f66e242 100644 --- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h | |||
@@ -37,6 +37,8 @@ | |||
37 | #define RTL92C_SIZE_MAX_RX_BUFFER 15360 /* 8192 */ | 37 | #define RTL92C_SIZE_MAX_RX_BUFFER 15360 /* 8192 */ |
38 | #define RX_DRV_INFO_SIZE_UNIT 8 | 38 | #define RX_DRV_INFO_SIZE_UNIT 8 |
39 | 39 | ||
40 | #define RTL_AGG_ON 1 | ||
41 | |||
40 | enum usb_rx_agg_mode { | 42 | enum usb_rx_agg_mode { |
41 | USB_RX_AGG_DISABLE, | 43 | USB_RX_AGG_DISABLE, |
42 | USB_RX_AGG_DMA, | 44 | USB_RX_AGG_DMA, |
@@ -419,7 +421,8 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *, | |||
419 | void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, | 421 | void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, |
420 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, | 422 | struct ieee80211_hdr *hdr, u8 *pdesc_tx, |
421 | struct ieee80211_tx_info *info, struct sk_buff *skb, | 423 | struct ieee80211_tx_info *info, struct sk_buff *skb, |
422 | unsigned int queue_index); | 424 | u8 queue_index, |
425 | struct rtl_tcb_desc *tcb_desc); | ||
423 | void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc, | 426 | void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc, |
424 | u32 buffer_len, bool bIsPsPoll); | 427 | u32 buffer_len, bool bIsPsPoll); |
425 | void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, | 428 | void rtl92cu_tx_fill_cmddesc(struct ieee80211_hw *hw, |