Commit 6d255202 authored by Larry Finger's avatar Larry Finger Committed by Kalle Valo

rtlwifi: rtl8192cu: Fix problems with blank lines

The following problems were found:

WARNING: Missing a blank line after declarations
CHECK: Please don't use multiple blank lines
CHECK: Please use a blank line after function/struct/union/enum declarations

There are no code changes.
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 2973af74
...@@ -747,6 +747,7 @@ static void _rtl92cu_init_queue_priority(struct ieee80211_hw *hw, ...@@ -747,6 +747,7 @@ static void _rtl92cu_init_queue_priority(struct ieee80211_hw *hw,
u8 queue_sel) u8 queue_sel)
{ {
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
if (IS_NORMAL_CHIP(rtlhal->version)) if (IS_NORMAL_CHIP(rtlhal->version))
_rtl92cu_init_chipn_queue_priority(hw, wmm_enable, out_ep_num, _rtl92cu_init_chipn_queue_priority(hw, wmm_enable, out_ep_num,
queue_sel); queue_sel);
...@@ -813,6 +814,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw) ...@@ -813,6 +814,7 @@ static int _rtl92cu_init_mac(struct ieee80211_hw *hw)
u8 wmm_enable = false; /* TODO */ u8 wmm_enable = false; /* TODO */
u8 out_ep_nums = rtlusb->out_ep_nums; u8 out_ep_nums = rtlusb->out_ep_nums;
u8 queue_sel = rtlusb->out_queue_sel; u8 queue_sel = rtlusb->out_queue_sel;
err = _rtl92cu_init_power_on(hw); err = _rtl92cu_init_power_on(hw);
if (err) { if (err) {
...@@ -1013,6 +1015,7 @@ d. SYS_FUNC_EN 0x02[7:0] = 0x16 reset BB state machine ...@@ -1013,6 +1015,7 @@ d. SYS_FUNC_EN 0x02[7:0] = 0x16 reset BB state machine
e. SYS_FUNC_EN 0x02[7:0] = 0x14 reset BB state machine e. SYS_FUNC_EN 0x02[7:0] = 0x14 reset BB state machine
***************************************/ ***************************************/
u8 erfpath = 0, value8 = 0; u8 erfpath = 0, value8 = 0;
rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF); rtl_write_byte(rtlpriv, REG_TXPAUSE, 0xFF);
rtl_set_rfreg(hw, (enum radio_path)erfpath, 0x0, MASKBYTE0, 0x0); rtl_set_rfreg(hw, (enum radio_path)erfpath, 0x0, MASKBYTE0, 0x0);
...@@ -1204,6 +1207,7 @@ static void _rtl92cu_stop_tx_beacon(struct ieee80211_hw *hw) ...@@ -1204,6 +1207,7 @@ static void _rtl92cu_stop_tx_beacon(struct ieee80211_hw *hw)
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtlpriv); struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
u8 tmp1byte = 0; u8 tmp1byte = 0;
if (IS_NORMAL_CHIP(rtlhal->version)) { if (IS_NORMAL_CHIP(rtlhal->version)) {
tmp1byte = rtl_read_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2); tmp1byte = rtl_read_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2);
rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2, rtl_write_byte(rtlpriv, REG_FWHW_TXQ_CTRL + 2,
...@@ -1353,6 +1357,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) ...@@ -1353,6 +1357,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
if (check_bssid) { if (check_bssid) {
u8 tmp; u8 tmp;
if (IS_NORMAL_CHIP(rtlhal->version)) { if (IS_NORMAL_CHIP(rtlhal->version)) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
tmp = BIT(4); tmp = BIT(4);
...@@ -1365,6 +1370,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) ...@@ -1365,6 +1370,7 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
_rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp); _rtl92cu_set_bcn_ctrl_reg(hw, 0, tmp);
} else { } else {
u8 tmp; u8 tmp;
if (IS_NORMAL_CHIP(rtlhal->version)) { if (IS_NORMAL_CHIP(rtlhal->version)) {
reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN); reg_rcr &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
tmp = BIT(4); tmp = BIT(4);
...@@ -1631,6 +1637,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -1631,6 +1637,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
case HW_VAR_ACK_PREAMBLE:{ case HW_VAR_ACK_PREAMBLE:{
u8 reg_tmp; u8 reg_tmp;
u8 short_preamble = (bool)*val; u8 short_preamble = (bool)*val;
reg_tmp = 0; reg_tmp = 0;
if (short_preamble) if (short_preamble)
reg_tmp |= 0x80; reg_tmp |= 0x80;
...@@ -1881,6 +1888,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) ...@@ -1881,6 +1888,7 @@ void rtl92cu_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
break; break;
case HW_VAR_KEEP_ALIVE:{ case HW_VAR_KEEP_ALIVE:{
u8 array[2]; u8 array[2];
array[0] = 0xff; array[0] = 0xff;
array[1] = *((u8 *)val); array[1] = *((u8 *)val);
rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2, rtl92c_fill_h2c_cmd(hw, H2C_92C_KEEP_ALIVE_CTRL, 2,
...@@ -1963,7 +1971,6 @@ static void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw, ...@@ -1963,7 +1971,6 @@ static void rtl92cu_update_hal_rate_table(struct ieee80211_hw *hw,
if (nmode && ((curtxbw_40mhz && if (nmode && ((curtxbw_40mhz &&
curshortgi_40mhz) || (!curtxbw_40mhz && curshortgi_40mhz) || (!curtxbw_40mhz &&
curshortgi_20mhz))) { curshortgi_20mhz))) {
ratr_value |= 0x10000000; ratr_value |= 0x10000000;
tmp_ratr_value = (ratr_value >> 12); tmp_ratr_value = (ratr_value >> 12);
......
...@@ -14,14 +14,12 @@ ...@@ -14,14 +14,12 @@
#define TX_TOTAL_PAGE_NUMBER 0xF8 #define TX_TOTAL_PAGE_NUMBER 0xF8
#define TX_PAGE_BOUNDARY (TX_TOTAL_PAGE_NUMBER + 1) #define TX_PAGE_BOUNDARY (TX_TOTAL_PAGE_NUMBER + 1)
#define CHIP_B_PAGE_NUM_PUBQ 0xE7 #define CHIP_B_PAGE_NUM_PUBQ 0xE7
/* For Test Chip Setting /* For Test Chip Setting
* (HPQ + LPQ + PUBQ) shall be TX_TOTAL_PAGE_NUMBER */ * (HPQ + LPQ + PUBQ) shall be TX_TOTAL_PAGE_NUMBER */
#define CHIP_A_PAGE_NUM_PUBQ 0x7E #define CHIP_A_PAGE_NUM_PUBQ 0x7E
/* For Chip A Setting */ /* For Chip A Setting */
#define WMM_CHIP_A_TX_TOTAL_PAGE_NUMBER 0xF5 #define WMM_CHIP_A_TX_TOTAL_PAGE_NUMBER 0xF5
#define WMM_CHIP_A_TX_PAGE_BOUNDARY \ #define WMM_CHIP_A_TX_PAGE_BOUNDARY \
...@@ -31,8 +29,6 @@ ...@@ -31,8 +29,6 @@
#define WMM_CHIP_A_PAGE_NUM_HPQ 0x29 #define WMM_CHIP_A_PAGE_NUM_HPQ 0x29
#define WMM_CHIP_A_PAGE_NUM_LPQ 0x29 #define WMM_CHIP_A_PAGE_NUM_LPQ 0x29
/* Note: For Chip B Setting ,modify later */ /* Note: For Chip B Setting ,modify later */
#define WMM_CHIP_B_TX_TOTAL_PAGE_NUMBER 0xF5 #define WMM_CHIP_B_TX_TOTAL_PAGE_NUMBER 0xF5
#define WMM_CHIP_B_TX_PAGE_BOUNDARY \ #define WMM_CHIP_B_TX_PAGE_BOUNDARY \
......
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
#define RX_EVM rx_evm_percentage #define RX_EVM rx_evm_percentage
#define RX_SIGQ rx_mimo_sig_qual #define RX_SIGQ rx_mimo_sig_qual
void rtl92c_read_chip_version(struct ieee80211_hw *hw) void rtl92c_read_chip_version(struct ieee80211_hw *hw)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
...@@ -143,6 +142,7 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data) ...@@ -143,6 +142,7 @@ bool rtl92c_llt_write(struct ieee80211_hw *hw, u32 address, u32 data)
} while (++count); } while (++count);
return status; return status;
} }
/** /**
* rtl92c_init_LLT_table - Init LLT table * rtl92c_init_LLT_table - Init LLT table
* @io: io callback * @io: io callback
...@@ -189,6 +189,7 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary) ...@@ -189,6 +189,7 @@ bool rtl92c_init_llt_table(struct ieee80211_hw *hw, u32 boundary)
} }
return rst; return rst;
} }
void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index, void rtl92c_set_key(struct ieee80211_hw *hw, u32 key_index,
u8 *p_macaddr, bool is_group, u8 enc_algo, u8 *p_macaddr, bool is_group, u8 enc_algo,
bool is_wepkey, bool clear_all) bool is_wepkey, bool clear_all)
...@@ -370,6 +371,7 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci) ...@@ -370,6 +371,7 @@ void rtl92c_set_qos(struct ieee80211_hw *hw, int aci)
void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size) void rtl92c_init_driver_info_size(struct ieee80211_hw *hw, u8 size)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
rtl_write_byte(rtlpriv, REG_RX_DRVINFO_SZ, size); rtl_write_byte(rtlpriv, REG_RX_DRVINFO_SZ, size);
} }
...@@ -647,6 +649,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -647,6 +649,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
pstats->RX_SIGQ[1] = -1; pstats->RX_SIGQ[1] = -1;
if (is_cck_rate) { if (is_cck_rate) {
u8 report, cck_highpwr; u8 report, cck_highpwr;
cck_buf = (struct phy_sts_cck_8192s_t *)p_drvinfo; cck_buf = (struct phy_sts_cck_8192s_t *)p_drvinfo;
if (!in_powersavemode) if (!in_powersavemode)
cck_highpwr = rtlphy->cck_high_power; cck_highpwr = rtlphy->cck_high_power;
...@@ -654,6 +657,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -654,6 +657,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
cck_highpwr = false; cck_highpwr = false;
if (!cck_highpwr) { if (!cck_highpwr) {
u8 cck_agc_rpt = cck_buf->cck_agc_rpt; u8 cck_agc_rpt = cck_buf->cck_agc_rpt;
report = cck_buf->cck_agc_rpt & 0xc0; report = cck_buf->cck_agc_rpt & 0xc0;
report = report >> 6; report = report >> 6;
switch (report) { switch (report) {
...@@ -672,6 +676,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -672,6 +676,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
} }
} else { } else {
u8 cck_agc_rpt = cck_buf->cck_agc_rpt; u8 cck_agc_rpt = cck_buf->cck_agc_rpt;
report = p_drvinfo->cfosho[0] & 0x60; report = p_drvinfo->cfosho[0] & 0x60;
report = report >> 5; report = report >> 5;
switch (report) { switch (report) {
...@@ -694,6 +699,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, ...@@ -694,6 +699,7 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,
pstats->recvsignalpower = rx_pwr_all; pstats->recvsignalpower = rx_pwr_all;
if (packet_match_bssid) { if (packet_match_bssid) {
u8 sq; u8 sq;
if (pstats->rx_pwdb_all > 40) if (pstats->rx_pwdb_all > 40)
sq = 100; sq = 100;
else { else {
......
...@@ -18,7 +18,6 @@ void rtl92c_enable_interrupt(struct ieee80211_hw *hw); ...@@ -18,7 +18,6 @@ void rtl92c_enable_interrupt(struct ieee80211_hw *hw);
void rtl92c_disable_interrupt(struct ieee80211_hw *hw); void rtl92c_disable_interrupt(struct ieee80211_hw *hw);
void rtl92c_set_qos(struct ieee80211_hw *hw, int aci); void rtl92c_set_qos(struct ieee80211_hw *hw, int aci);
/*--------------------------------------------------------------- /*---------------------------------------------------------------
* Hardware init functions * Hardware init functions
*---------------------------------------------------------------*/ *---------------------------------------------------------------*/
...@@ -130,6 +129,4 @@ void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw, ...@@ -130,6 +129,4 @@ void rtl92c_translate_rx_signal_stuff(struct ieee80211_hw *hw,
* Card disable functions * Card disable functions
*---------------------------------------------------------------*/ *---------------------------------------------------------------*/
#endif #endif
...@@ -108,6 +108,7 @@ static void threeoutepmapping(struct ieee80211_hw *hw, bool bwificfg, ...@@ -108,6 +108,7 @@ static void threeoutepmapping(struct ieee80211_hw *hw, bool bwificfg,
struct rtl_ep_map *ep_map) struct rtl_ep_map *ep_map)
{ {
struct rtl_priv *rtlpriv = rtl_priv(hw); struct rtl_priv *rtlpriv = rtl_priv(hw);
if (bwificfg) { /* for WMM */ if (bwificfg) { /* for WMM */
RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
"USB 3EP Setting for WMM.....\n"); "USB 3EP Setting for WMM.....\n");
...@@ -141,6 +142,7 @@ static void oneoutepmapping(struct ieee80211_hw *hw, struct rtl_ep_map *ep_map) ...@@ -141,6 +142,7 @@ static void oneoutepmapping(struct ieee80211_hw *hw, struct rtl_ep_map *ep_map)
ep_map->ep_mapping[RTL_TXQ_BCN] = 2; ep_map->ep_mapping[RTL_TXQ_BCN] = 2;
ep_map->ep_mapping[RTL_TXQ_HI] = 2; ep_map->ep_mapping[RTL_TXQ_HI] = 2;
} }
static int _out_ep_mapping(struct ieee80211_hw *hw) static int _out_ep_mapping(struct ieee80211_hw *hw)
{ {
int err = 0; int err = 0;
...@@ -174,11 +176,13 @@ static int _out_ep_mapping(struct ieee80211_hw *hw) ...@@ -174,11 +176,13 @@ static int _out_ep_mapping(struct ieee80211_hw *hw)
return err; return err;
} }
/* endpoint mapping */ /* endpoint mapping */
int rtl8192cu_endpoint_mapping(struct ieee80211_hw *hw) int rtl8192cu_endpoint_mapping(struct ieee80211_hw *hw)
{ {
struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw)); struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
int error = 0; int error = 0;
if (likely(IS_NORMAL_CHIP(rtlhal->version))) if (likely(IS_NORMAL_CHIP(rtlhal->version)))
error = configvernoutep(hw); error = configvernoutep(hw);
else else
...@@ -442,6 +446,7 @@ static void _rtl_fill_usb_tx_desc(u8 *txdesc) ...@@ -442,6 +446,7 @@ static void _rtl_fill_usb_tx_desc(u8 *txdesc)
SET_TX_DESC_LAST_SEG(txdesc, 1); SET_TX_DESC_LAST_SEG(txdesc, 1);
SET_TX_DESC_FIRST_SEG(txdesc, 1); SET_TX_DESC_FIRST_SEG(txdesc, 1);
} }
/** /**
* For HW recovery information * For HW recovery information
*/ */
...@@ -531,11 +536,13 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw, ...@@ -531,11 +536,13 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
sta = ieee80211_find_sta(mac->vif, mac->bssid); sta = ieee80211_find_sta(mac->vif, mac->bssid);
if (sta) { if (sta) {
u8 ampdu_density = sta->ht_cap.ampdu_density; u8 ampdu_density = sta->ht_cap.ampdu_density;
SET_TX_DESC_AMPDU_DENSITY(txdesc, ampdu_density); SET_TX_DESC_AMPDU_DENSITY(txdesc, ampdu_density);
} }
rcu_read_unlock(); rcu_read_unlock();
if (info->control.hw_key) { if (info->control.hw_key) {
struct ieee80211_key_conf *keyconf = info->control.hw_key; struct ieee80211_key_conf *keyconf = info->control.hw_key;
switch (keyconf->cipher) { switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_WEP40: case WLAN_CIPHER_SUITE_WEP40:
case WLAN_CIPHER_SUITE_WEP104: case WLAN_CIPHER_SUITE_WEP104:
......
...@@ -198,7 +198,6 @@ struct rx_drv_info_92c { ...@@ -198,7 +198,6 @@ struct rx_drv_info_92c {
#define SET_TX_DESC_OWN(__txdesc, __value) \ #define SET_TX_DESC_OWN(__txdesc, __value) \
SET_BITS_TO_LE_4BYTE(__txdesc, 31, 1, __value) SET_BITS_TO_LE_4BYTE(__txdesc, 31, 1, __value)
/* Dword 1 */ /* Dword 1 */
#define SET_TX_DESC_MACID(__txdesc, __value) \ #define SET_TX_DESC_MACID(__txdesc, __value) \
SET_BITS_TO_LE_4BYTE(__txdesc + 4, 0, 5, __value) SET_BITS_TO_LE_4BYTE(__txdesc + 4, 0, 5, __value)
...@@ -355,7 +354,6 @@ struct rx_drv_info_92c { ...@@ -355,7 +354,6 @@ struct rx_drv_info_92c {
#define SET_TX_DESC_MCSG15_MAX_LEN(__txdesc, __value) \ #define SET_TX_DESC_MCSG15_MAX_LEN(__txdesc, __value) \
SET_BITS_TO_LE_4BYTE(__txdesc + 28, 28, 4, __value) SET_BITS_TO_LE_4BYTE(__txdesc + 28, 28, 4, __value)
int rtl8192cu_endpoint_mapping(struct ieee80211_hw *hw); int rtl8192cu_endpoint_mapping(struct ieee80211_hw *hw);
u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index); u16 rtl8192cu_mq_to_hwq(__le16 fc, u16 mac80211_queue_index);
bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw, bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment