aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192de/hw.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192de/hw.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index b338d526c422..f4051f4f0390 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -235,12 +235,12 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
235 for (e_aci = 0; e_aci < AC_MAX; e_aci++) 235 for (e_aci = 0; e_aci < AC_MAX; e_aci++)
236 rtlpriv->cfg->ops->set_hw_reg(hw, 236 rtlpriv->cfg->ops->set_hw_reg(hw,
237 HW_VAR_AC_PARAM, 237 HW_VAR_AC_PARAM,
238 (u8 *) (&e_aci)); 238 (&e_aci));
239 break; 239 break;
240 } 240 }
241 case HW_VAR_ACK_PREAMBLE: { 241 case HW_VAR_ACK_PREAMBLE: {
242 u8 reg_tmp; 242 u8 reg_tmp;
243 u8 short_preamble = (bool) (*(u8 *) val); 243 u8 short_preamble = (bool) (*val);
244 244
245 reg_tmp = (mac->cur_40_prime_sc) << 5; 245 reg_tmp = (mac->cur_40_prime_sc) << 5;
246 if (short_preamble) 246 if (short_preamble)
@@ -252,7 +252,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
252 u8 min_spacing_to_set; 252 u8 min_spacing_to_set;
253 u8 sec_min_space; 253 u8 sec_min_space;
254 254
255 min_spacing_to_set = *((u8 *) val); 255 min_spacing_to_set = *val;
256 if (min_spacing_to_set <= 7) { 256 if (min_spacing_to_set <= 7) {
257 sec_min_space = 0; 257 sec_min_space = 0;
258 if (min_spacing_to_set < sec_min_space) 258 if (min_spacing_to_set < sec_min_space)
@@ -271,7 +271,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
271 case HW_VAR_SHORTGI_DENSITY: { 271 case HW_VAR_SHORTGI_DENSITY: {
272 u8 density_to_set; 272 u8 density_to_set;
273 273
274 density_to_set = *((u8 *) val); 274 density_to_set = *val;
275 mac->min_space_cfg = rtlpriv->rtlhal.minspace_cfg; 275 mac->min_space_cfg = rtlpriv->rtlhal.minspace_cfg;
276 mac->min_space_cfg |= (density_to_set << 3); 276 mac->min_space_cfg |= (density_to_set << 3);
277 RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD, 277 RT_TRACE(rtlpriv, COMP_MLME, DBG_LOUD,
@@ -293,7 +293,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
293 regtoSet = 0x66626641; 293 regtoSet = 0x66626641;
294 else 294 else
295 regtoSet = 0xb972a841; 295 regtoSet = 0xb972a841;
296 factor_toset = *((u8 *) val); 296 factor_toset = *val;
297 if (factor_toset <= 3) { 297 if (factor_toset <= 3) {
298 factor_toset = (1 << (factor_toset + 2)); 298 factor_toset = (1 << (factor_toset + 2));
299 if (factor_toset > 0xf) 299 if (factor_toset > 0xf)
@@ -316,15 +316,15 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
316 break; 316 break;
317 } 317 }
318 case HW_VAR_AC_PARAM: { 318 case HW_VAR_AC_PARAM: {
319 u8 e_aci = *((u8 *) val); 319 u8 e_aci = *val;
320 rtl92d_dm_init_edca_turbo(hw); 320 rtl92d_dm_init_edca_turbo(hw);
321 if (rtlpci->acm_method != eAcmWay2_SW) 321 if (rtlpci->acm_method != eAcmWay2_SW)
322 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ACM_CTRL, 322 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ACM_CTRL,
323 (u8 *) (&e_aci)); 323 &e_aci);
324 break; 324 break;
325 } 325 }
326 case HW_VAR_ACM_CTRL: { 326 case HW_VAR_ACM_CTRL: {
327 u8 e_aci = *((u8 *) val); 327 u8 e_aci = *val;
328 union aci_aifsn *p_aci_aifsn = 328 union aci_aifsn *p_aci_aifsn =
329 (union aci_aifsn *)(&(mac->ac[0].aifs)); 329 (union aci_aifsn *)(&(mac->ac[0].aifs));
330 u8 acm = p_aci_aifsn->f.acm; 330 u8 acm = p_aci_aifsn->f.acm;
@@ -376,7 +376,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
376 rtlpci->receive_config = ((u32 *) (val))[0]; 376 rtlpci->receive_config = ((u32 *) (val))[0];
377 break; 377 break;
378 case HW_VAR_RETRY_LIMIT: { 378 case HW_VAR_RETRY_LIMIT: {
379 u8 retry_limit = ((u8 *) (val))[0]; 379 u8 retry_limit = val[0];
380 380
381 rtl_write_word(rtlpriv, REG_RL, 381 rtl_write_word(rtlpriv, REG_RL,
382 retry_limit << RETRY_LIMIT_SHORT_SHIFT | 382 retry_limit << RETRY_LIMIT_SHORT_SHIFT |
@@ -390,16 +390,16 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
390 rtlefuse->efuse_usedbytes = *((u16 *) val); 390 rtlefuse->efuse_usedbytes = *((u16 *) val);
391 break; 391 break;
392 case HW_VAR_EFUSE_USAGE: 392 case HW_VAR_EFUSE_USAGE:
393 rtlefuse->efuse_usedpercentage = *((u8 *) val); 393 rtlefuse->efuse_usedpercentage = *val;
394 break; 394 break;
395 case HW_VAR_IO_CMD: 395 case HW_VAR_IO_CMD:
396 rtl92d_phy_set_io_cmd(hw, (*(enum io_type *)val)); 396 rtl92d_phy_set_io_cmd(hw, (*(enum io_type *)val));
397 break; 397 break;
398 case HW_VAR_WPA_CONFIG: 398 case HW_VAR_WPA_CONFIG:
399 rtl_write_byte(rtlpriv, REG_SECCFG, *((u8 *) val)); 399 rtl_write_byte(rtlpriv, REG_SECCFG, *val);
400 break; 400 break;
401 case HW_VAR_SET_RPWM: 401 case HW_VAR_SET_RPWM:
402 rtl92d_fill_h2c_cmd(hw, H2C_PWRM, 1, (u8 *) (val)); 402 rtl92d_fill_h2c_cmd(hw, H2C_PWRM, 1, (val));
403 break; 403 break;
404 case HW_VAR_H2C_FW_PWRMODE: 404 case HW_VAR_H2C_FW_PWRMODE:
405 break; 405 break;
@@ -407,7 +407,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
407 ppsc->fw_current_inpsmode = *((bool *) val); 407 ppsc->fw_current_inpsmode = *((bool *) val);
408 break; 408 break;
409 case HW_VAR_H2C_FW_JOINBSSRPT: { 409 case HW_VAR_H2C_FW_JOINBSSRPT: {
410 u8 mstatus = (*(u8 *) val); 410 u8 mstatus = (*val);
411 u8 tmp_regcr, tmp_reg422; 411 u8 tmp_regcr, tmp_reg422;
412 bool recover = false; 412 bool recover = false;
413 413
@@ -435,7 +435,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
435 rtl_write_byte(rtlpriv, REG_CR + 1, 435 rtl_write_byte(rtlpriv, REG_CR + 1,
436 (tmp_regcr & ~(BIT(0)))); 436 (tmp_regcr & ~(BIT(0))));
437 } 437 }
438 rtl92d_set_fw_joinbss_report_cmd(hw, (*(u8 *) val)); 438 rtl92d_set_fw_joinbss_report_cmd(hw, (*val));
439 break; 439 break;
440 } 440 }
441 case HW_VAR_AID: { 441 case HW_VAR_AID: {
@@ -447,7 +447,7 @@ void rtl92de_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val)
447 break; 447 break;
448 } 448 }
449 case HW_VAR_CORRECT_TSF: { 449 case HW_VAR_CORRECT_TSF: {
450 u8 btype_ibss = ((u8 *) (val))[0]; 450 u8 btype_ibss = val[0];
451 451
452 if (btype_ibss) 452 if (btype_ibss)
453 _rtl92de_stop_tx_beacon(hw); 453 _rtl92de_stop_tx_beacon(hw);
@@ -1794,7 +1794,7 @@ static void _rtl92de_read_adapter_info(struct ieee80211_hw *hw)
1794 "RTL819X Not boot from eeprom, check it !!\n"); 1794 "RTL819X Not boot from eeprom, check it !!\n");
1795 return; 1795 return;
1796 } 1796 }
1797 rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; 1797 rtlefuse->eeprom_oemid = hwinfo[EEPROM_CUSTOMER_ID];
1798 _rtl92de_read_macphymode_and_bandtype(hw, hwinfo); 1798 _rtl92de_read_macphymode_and_bandtype(hw, hwinfo);
1799 1799
1800 /* VID, DID SE 0xA-D */ 1800 /* VID, DID SE 0xA-D */
@@ -2115,7 +2115,7 @@ void rtl92de_update_channel_access_setting(struct ieee80211_hw *hw)
2115 u16 sifs_timer; 2115 u16 sifs_timer;
2116 2116
2117 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME, 2117 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME,
2118 (u8 *)&mac->slot_time); 2118 &mac->slot_time);
2119 if (!mac->ht_enable) 2119 if (!mac->ht_enable)
2120 sifs_timer = 0x0a0a; 2120 sifs_timer = 0x0a0a;
2121 else 2121 else