aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2013-02-01 11:40:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-01 14:27:27 -0500
commitb26f5f09ebdeb85ab152344cc1d6d484a3ce967d (patch)
treea7c0e8e272900f8bde4ed73f67d67e8d7913f8a2 /drivers/net/wireless/rtlwifi
parent8925d518663628f769173d3586c66987fdd3ab61 (diff)
rtlwifi: rtl8723ae: Fix W=1 compile warnings
Whe this driver is built with "make W=1", the following warnings are output: drivers/net/wireless/rtlwifi/rtl8723ae/fw.c:515:5: warning: variable ‘own’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c:1436:5: warning: variable ‘bt_retry_cnt’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/hw.c:706:6: warning: variable ‘reg_ratr’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/hw.c:2033:41: warning: variable ‘cur_rfstate’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:620:23: warning: variable ‘radiob_arraylen’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:619:7: warning: variable ‘radiob_array_table’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:617:7: warning: variable ‘rtstatus’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1534:6: warning: variable ‘bbvalue’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1716:6: warning: variable ‘reg_ecc’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1715:61: warning: variable ‘reg_ec4’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/phy.c:1715:34: warning: variable ‘reg_eac’ set but not used [-Wunused-but-set-variable] drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:247:6: warning: variable ‘psaddr’ set but not used [-Wunused-but-set-variable] Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/fw.c2
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c2
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/hw.c8
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/phy.c20
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8723ae/trx.c2
5 files changed, 4 insertions, 30 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/fw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/fw.c
index 3b71dab4f3b2..35cb8f83eed4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/fw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/fw.c
@@ -512,7 +512,6 @@ static bool _rtl8723ae_cmd_send_packet(struct ieee80211_hw *hw,
512 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); 512 struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
513 struct rtl8192_tx_ring *ring; 513 struct rtl8192_tx_ring *ring;
514 struct rtl_tx_desc *pdesc; 514 struct rtl_tx_desc *pdesc;
515 u8 own;
516 unsigned long flags; 515 unsigned long flags;
517 struct sk_buff *pskb = NULL; 516 struct sk_buff *pskb = NULL;
518 517
@@ -525,7 +524,6 @@ static bool _rtl8723ae_cmd_send_packet(struct ieee80211_hw *hw,
525 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags); 524 spin_lock_irqsave(&rtlpriv->locks.irq_th_lock, flags);
526 525
527 pdesc = &ring->desc[0]; 526 pdesc = &ring->desc[0];
528 own = (u8) rtlpriv->cfg->ops->get_desc((u8 *) pdesc, true, HW_DESC_OWN);
529 527
530 rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *) pdesc, 1, 1, skb); 528 rtlpriv->cfg->ops->fill_tx_cmddesc(hw, (u8 *) pdesc, 1, 1, skb);
531 529
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c
index 887d521fe690..68c28340f791 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hal_btc.c
@@ -1433,7 +1433,6 @@ static void _rtl8723ae_dm_bt_coexist_2_ant(struct ieee80211_hw *hw)
1433 struct rtl_priv *rtlpriv = rtl_priv(hw); 1433 struct rtl_priv *rtlpriv = rtl_priv(hw);
1434 struct rtl_hal *rtlhal = rtl_hal(rtlpriv); 1434 struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
1435 struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw); 1435 struct rtl_pci_priv *rtlpcipriv = rtl_pcipriv(hw);
1436 u8 bt_retry_cnt;
1437 u8 bt_info_original; 1436 u8 bt_info_original;
1438 RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_DMESG, 1437 RT_TRACE(rtlpriv, COMP_BT_COEXIST, DBG_DMESG,
1439 "[BTCoex] Get bt info by fw!!\n"); 1438 "[BTCoex] Get bt info by fw!!\n");
@@ -1445,7 +1444,6 @@ static void _rtl8723ae_dm_bt_coexist_2_ant(struct ieee80211_hw *hw)
1445 "[BTCoex] c2h for btInfo not rcvd yet!!\n"); 1444 "[BTCoex] c2h for btInfo not rcvd yet!!\n");
1446 } 1445 }
1447 1446
1448 bt_retry_cnt = rtlhal->hal_coex_8723.bt_retry_cnt;
1449 bt_info_original = rtlhal->hal_coex_8723.c2h_bt_info_original; 1447 bt_info_original = rtlhal->hal_coex_8723.c2h_bt_info_original;
1450 1448
1451 /* when bt inquiry or page scan, we have to set h2c 0x25 1449 /* when bt inquiry or page scan, we have to set h2c 0x25
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
index 0a8c03863fb2..149804816ac4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
@@ -703,11 +703,9 @@ static void _rtl8723ae_hw_configure(struct ieee80211_hw *hw)
703 struct rtl_priv *rtlpriv = rtl_priv(hw); 703 struct rtl_priv *rtlpriv = rtl_priv(hw);
704 struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw); 704 struct rtl_pci_priv *pcipriv = rtl_pcipriv(hw);
705 u8 reg_bw_opmode; 705 u8 reg_bw_opmode;
706 u32 reg_ratr, reg_prsr; 706 u32 reg_prsr;
707 707
708 reg_bw_opmode = BW_OPMODE_20MHZ; 708 reg_bw_opmode = BW_OPMODE_20MHZ;
709 reg_ratr = RATE_ALL_CCK | RATE_ALL_OFDM_AG |
710 RATE_ALL_OFDM_1SS | RATE_ALL_OFDM_2SS;
711 reg_prsr = RATE_ALL_CCK | RATE_ALL_OFDM_AG; 709 reg_prsr = RATE_ALL_CCK | RATE_ALL_OFDM_AG;
712 710
713 rtl_write_byte(rtlpriv, REG_INIRTS_RATE_SEL, 0x8); 711 rtl_write_byte(rtlpriv, REG_INIRTS_RATE_SEL, 0x8);
@@ -2030,7 +2028,7 @@ bool rtl8723ae_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
2030 struct rtl_priv *rtlpriv = rtl_priv(hw); 2028 struct rtl_priv *rtlpriv = rtl_priv(hw);
2031 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw)); 2029 struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
2032 struct rtl_phy *rtlphy = &(rtlpriv->phy); 2030 struct rtl_phy *rtlphy = &(rtlpriv->phy);
2033 enum rf_pwrstate e_rfpowerstate_toset, cur_rfstate; 2031 enum rf_pwrstate e_rfpowerstate_toset;
2034 u8 u1tmp; 2032 u8 u1tmp;
2035 bool actuallyset = false; 2033 bool actuallyset = false;
2036 2034
@@ -2049,8 +2047,6 @@ bool rtl8723ae_gpio_radio_on_off_checking(struct ieee80211_hw *hw, u8 *valid)
2049 spin_unlock(&rtlpriv->locks.rf_ps_lock); 2047 spin_unlock(&rtlpriv->locks.rf_ps_lock);
2050 } 2048 }
2051 2049
2052 cur_rfstate = ppsc->rfpwr_state;
2053
2054 rtl_write_byte(rtlpriv, REG_GPIO_IO_SEL_2, 2050 rtl_write_byte(rtlpriv, REG_GPIO_IO_SEL_2,
2055 rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL_2)&~(BIT(1))); 2051 rtl_read_byte(rtlpriv, REG_GPIO_IO_SEL_2)&~(BIT(1)));
2056 2052
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
index 3d8536bb0d2b..eafbb18dd48e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/phy.c
@@ -614,17 +614,11 @@ bool rtl8723ae_phy_config_rf_with_headerfile(struct ieee80211_hw *hw,
614{ 614{
615 struct rtl_priv *rtlpriv = rtl_priv(hw); 615 struct rtl_priv *rtlpriv = rtl_priv(hw);
616 int i; 616 int i;
617 bool rtstatus = true;
618 u32 *radioa_array_table; 617 u32 *radioa_array_table;
619 u32 *radiob_array_table; 618 u16 radioa_arraylen;
620 u16 radioa_arraylen, radiob_arraylen;
621 619
622 radioa_arraylen = Rtl8723ERADIOA_1TARRAYLENGTH; 620 radioa_arraylen = Rtl8723ERADIOA_1TARRAYLENGTH;
623 radioa_array_table = RTL8723E_RADIOA_1TARRAY; 621 radioa_array_table = RTL8723E_RADIOA_1TARRAY;
624 radiob_arraylen = RTL8723E_RADIOB_1TARRAYLENGTH;
625 radiob_array_table = RTL8723E_RADIOB_1TARRAY;
626
627 rtstatus = true;
628 622
629 switch (rfpath) { 623 switch (rfpath) {
630 case RF90_PATH_A: 624 case RF90_PATH_A:
@@ -1531,11 +1525,8 @@ static void _rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw,
1531 0x522, 0x550, 0x551, 0x040 1525 0x522, 0x550, 0x551, 0x040
1532 }; 1526 };
1533 const u32 retrycount = 2; 1527 const u32 retrycount = 2;
1534 u32 bbvalue;
1535 1528
1536 if (t == 0) { 1529 if (t == 0) {
1537 bbvalue = rtl_get_bbreg(hw, 0x800, MASKDWORD);
1538
1539 phy_save_adda_regs(hw, adda_reg, rtlphy->adda_backup, 16); 1530 phy_save_adda_regs(hw, adda_reg, rtlphy->adda_backup, 16);
1540 phy_save_mac_regs(hw, iqk_mac_reg, rtlphy->iqk_mac_backup); 1531 phy_save_mac_regs(hw, iqk_mac_reg, rtlphy->iqk_mac_backup);
1541 } 1532 }
@@ -1712,8 +1703,7 @@ void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery)
1712 long result[4][8]; 1703 long result[4][8];
1713 u8 i, final_candidate; 1704 u8 i, final_candidate;
1714 bool patha_ok, pathb_ok; 1705 bool patha_ok, pathb_ok;
1715 long reg_e94, reg_e9c, reg_ea4, reg_eac, reg_eb4, reg_ebc, reg_ec4, 1706 long reg_e94, reg_e9c, reg_ea4, reg_eb4, reg_ebc, reg_tmp = 0;
1716 reg_ecc, reg_tmp = 0;
1717 bool is12simular, is13simular, is23simular; 1707 bool is12simular, is13simular, is23simular;
1718 bool start_conttx = false, singletone = false; 1708 bool start_conttx = false, singletone = false;
1719 u32 iqk_bb_reg[10] = { 1709 u32 iqk_bb_reg[10] = {
@@ -1780,21 +1770,15 @@ void rtl8723ae_phy_iq_calibrate(struct ieee80211_hw *hw, bool recovery)
1780 reg_e94 = result[i][0]; 1770 reg_e94 = result[i][0];
1781 reg_e9c = result[i][1]; 1771 reg_e9c = result[i][1];
1782 reg_ea4 = result[i][2]; 1772 reg_ea4 = result[i][2];
1783 reg_eac = result[i][3];
1784 reg_eb4 = result[i][4]; 1773 reg_eb4 = result[i][4];
1785 reg_ebc = result[i][5]; 1774 reg_ebc = result[i][5];
1786 reg_ec4 = result[i][6];
1787 reg_ecc = result[i][7];
1788 } 1775 }
1789 if (final_candidate != 0xff) { 1776 if (final_candidate != 0xff) {
1790 rtlphy->reg_e94 = reg_e94 = result[final_candidate][0]; 1777 rtlphy->reg_e94 = reg_e94 = result[final_candidate][0];
1791 rtlphy->reg_e9c = reg_e9c = result[final_candidate][1]; 1778 rtlphy->reg_e9c = reg_e9c = result[final_candidate][1];
1792 reg_ea4 = result[final_candidate][2]; 1779 reg_ea4 = result[final_candidate][2];
1793 reg_eac = result[final_candidate][3];
1794 rtlphy->reg_eb4 = reg_eb4 = result[final_candidate][4]; 1780 rtlphy->reg_eb4 = reg_eb4 = result[final_candidate][4];
1795 rtlphy->reg_ebc = reg_ebc = result[final_candidate][5]; 1781 rtlphy->reg_ebc = reg_ebc = result[final_candidate][5];
1796 reg_ec4 = result[final_candidate][6];
1797 reg_ecc = result[final_candidate][7];
1798 patha_ok = pathb_ok = true; 1782 patha_ok = pathb_ok = true;
1799 } else { 1783 } else {
1800 rtlphy->reg_e94 = rtlphy->reg_eb4 = 0x100; 1784 rtlphy->reg_e94 = rtlphy->reg_eb4 = 0x100;
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
index ce8ad12bce5b..b1fd2b328abf 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/trx.c
@@ -244,7 +244,6 @@ static void _rtl8723ae_translate_rx_signal_stuff(struct ieee80211_hw *hw,
244 struct ieee80211_hdr *hdr; 244 struct ieee80211_hdr *hdr;
245 u8 *tmp_buf; 245 u8 *tmp_buf;
246 u8 *praddr; 246 u8 *praddr;
247 u8 *psaddr;
248 __le16 fc; 247 __le16 fc;
249 u16 type; 248 u16 type;
250 bool packet_matchbssid, packet_toself, packet_beacon = false; 249 bool packet_matchbssid, packet_toself, packet_beacon = false;
@@ -255,7 +254,6 @@ static void _rtl8723ae_translate_rx_signal_stuff(struct ieee80211_hw *hw,
255 fc = hdr->frame_control; 254 fc = hdr->frame_control;
256 type = WLAN_FC_GET_TYPE(fc); 255 type = WLAN_FC_GET_TYPE(fc);
257 praddr = hdr->addr1; 256 praddr = hdr->addr1;
258 psaddr = ieee80211_get_SA(hdr);
259 257
260 packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) && 258 packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) &&
261 (!compare_ether_addr(mac->bssid, 259 (!compare_ether_addr(mac->bssid,