aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLarry Finger <Larry.Finger@lwfinger.net>2014-01-26 14:17:33 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-27 12:39:40 -0500
commitee5de8ddfbd7ca33c770980336f8ee1db26d57e4 (patch)
tree26f9bfd825688aeebd538b8925266448a47cf599
parentcc11f372e9371ec3a3dad02396dbe0a55eec0b8f (diff)
staging: r8821ae: Fix build problems
As initially introduced, this driver failed to build in the linux-next tree due to changes coming from newer developments arising in the wireless trees. This patch removes incompatible code and provides definitions for symbols that have been removed from mac80211. In addition, several warnings were fixed. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8821ae/base.c5
-rw-r--r--drivers/staging/rtl8821ae/ps.c4
-rw-r--r--drivers/staging/rtl8821ae/regd.h6
-rw-r--r--drivers/staging/rtl8821ae/rtl8821ae/dm.c8
-rw-r--r--drivers/staging/rtl8821ae/rtl8821ae/phy.c2
-rw-r--r--drivers/staging/rtl8821ae/rtl8821ae/trx.c4
6 files changed, 17 insertions, 12 deletions
diff --git a/drivers/staging/rtl8821ae/base.c b/drivers/staging/rtl8821ae/base.c
index b5a50d0c6304..18c936fbdf1e 100644
--- a/drivers/staging/rtl8821ae/base.c
+++ b/drivers/staging/rtl8821ae/base.c
@@ -369,7 +369,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
369 369
370 /* TODO: Correct this value for our hw */ 370 /* TODO: Correct this value for our hw */
371 /* TODO: define these hard code value */ 371 /* TODO: define these hard code value */
372 hw->channel_change_time = 100;
373 hw->max_listen_interval = 10; 372 hw->max_listen_interval = 10;
374 hw->max_rate_tries = 4; 373 hw->max_rate_tries = 4;
375 /* hw->max_rates = 1; */ 374 /* hw->max_rates = 1; */
@@ -1182,7 +1181,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
1182 return; 1181 return;
1183 1182
1184 /* and only beacons from the associated BSSID, please */ 1183 /* and only beacons from the associated BSSID, please */
1185 if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid)) 1184 if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
1186 return; 1185 return;
1187 1186
1188 rtlpriv->link_info.bcn_rx_inperiod ++; 1187 rtlpriv->link_info.bcn_rx_inperiod ++;
@@ -1650,7 +1649,7 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
1650 return; 1649 return;
1651 1650
1652 /* and only beacons from the associated BSSID, please */ 1651 /* and only beacons from the associated BSSID, please */
1653 if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid)) 1652 if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
1654 return; 1653 return;
1655 1654
1656 if (rtl_find_221_ie(hw, data, len)) { 1655 if (rtl_find_221_ie(hw, data, len)) {
diff --git a/drivers/staging/rtl8821ae/ps.c b/drivers/staging/rtl8821ae/ps.c
index 6c86436e8dd3..f12ffa83c58d 100644
--- a/drivers/staging/rtl8821ae/ps.c
+++ b/drivers/staging/rtl8821ae/ps.c
@@ -527,7 +527,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
527 return; 527 return;
528 528
529 /* and only beacons from the associated BSSID, please */ 529 /* and only beacons from the associated BSSID, please */
530 if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid)) 530 if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
531 return; 531 return;
532 532
533 rtlpriv->psc.last_beacon = jiffies; 533 rtlpriv->psc.last_beacon = jiffies;
@@ -1007,7 +1007,7 @@ void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len)
1007 return; 1007 return;
1008 1008
1009 /* and only beacons from the associated BSSID, please */ 1009 /* and only beacons from the associated BSSID, please */
1010 if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid)) 1010 if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
1011 return; 1011 return;
1012 1012
1013 /* check if this really is a beacon */ 1013 /* check if this really is a beacon */
diff --git a/drivers/staging/rtl8821ae/regd.h b/drivers/staging/rtl8821ae/regd.h
index c126cf9c92ad..abc60ab8165c 100644
--- a/drivers/staging/rtl8821ae/regd.h
+++ b/drivers/staging/rtl8821ae/regd.h
@@ -30,6 +30,12 @@
30#ifndef __RTL_REGD_H__ 30#ifndef __RTL_REGD_H__
31#define __RTL_REGD_H__ 31#define __RTL_REGD_H__
32 32
33#define IEEE80211_CHAN_NO_IBSS 1<<2
34#define IEEE80211_CHAN_PASSIVE_SCAN 1<<1
35#define WIPHY_FLAG_CUSTOM_REGULATORY BIT(0)
36#define WIPHY_FLAG_STRICT_REGULATORY BIT(1)
37#define WIPHY_FLAG_DISABLE_BEACON_HINTS BIT(2)
38
33struct country_code_to_enum_rd { 39struct country_code_to_enum_rd {
34 u16 countrycode; 40 u16 countrycode;
35 const char *iso_name; 41 const char *iso_name;
diff --git a/drivers/staging/rtl8821ae/rtl8821ae/dm.c b/drivers/staging/rtl8821ae/rtl8821ae/dm.c
index 41bd21d0e8cd..8634206b8929 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/dm.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/dm.c
@@ -1339,7 +1339,7 @@ void rtl8812ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
1339 u32 final_bb_swing_idx[2]; 1339 u32 final_bb_swing_idx[2];
1340 u8 pwr_tracking_limit = 26; /*+1.0dB*/ 1340 u8 pwr_tracking_limit = 26; /*+1.0dB*/
1341 u8 tx_rate = 0xFF; 1341 u8 tx_rate = 0xFF;
1342 char final_ofdm_swing_index = 0; 1342 s8 final_ofdm_swing_index = 0;
1343 1343
1344 if(rtldm->tx_rate != 0xFF) 1344 if(rtldm->tx_rate != 0xFF)
1345 tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate); 1345 tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
@@ -1999,7 +1999,7 @@ void rtl8821ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
1999 u32 final_bb_swing_idx[1]; 1999 u32 final_bb_swing_idx[1];
2000 u8 pwr_tracking_limit = 26; /*+1.0dB*/ 2000 u8 pwr_tracking_limit = 26; /*+1.0dB*/
2001 u8 tx_rate = 0xFF; 2001 u8 tx_rate = 0xFF;
2002 char final_ofdm_swing_index = 0; 2002 s8 final_ofdm_swing_index = 0;
2003 2003
2004 if(rtldm->tx_rate != 0xFF) 2004 if(rtldm->tx_rate != 0xFF)
2005 tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate); 2005 tx_rate = rtl8812ae_hw_rate_to_mrate(hw, rtldm->tx_rate);
@@ -2599,8 +2599,8 @@ static void rtl8821ae_dm_check_edca_turbo(struct ieee80211_hw *hw)
2599 struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw)); 2599 struct rtl_dm *rtldm = rtl_dm(rtl_priv(hw));
2600 2600
2601 /*Keep past Tx/Rx packet count for RT-to-RT EDCA turbo.*/ 2601 /*Keep past Tx/Rx packet count for RT-to-RT EDCA turbo.*/
2602 u64 cur_tx_ok_cnt = 0; 2602 unsigned long cur_tx_ok_cnt = 0;
2603 u64 cur_rx_ok_cnt = 0; 2603 unsigned long cur_rx_ok_cnt = 0;
2604 u32 edca_be_ul = 0x5ea42b; 2604 u32 edca_be_ul = 0x5ea42b;
2605 u32 edca_be_dl = 0x5ea42b; 2605 u32 edca_be_dl = 0x5ea42b;
2606 u32 edca_be = 0x5ea42b; 2606 u32 edca_be = 0x5ea42b;
diff --git a/drivers/staging/rtl8821ae/rtl8821ae/phy.c b/drivers/staging/rtl8821ae/rtl8821ae/phy.c
index 09ffdc2e63a3..d02fca38a2b2 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/phy.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/phy.c
@@ -3427,7 +3427,7 @@ void _rtl8812ae_iqk_tx(
3427 bool iqk0_ready = false, tx0_finish = false, rx0_finish = false; 3427 bool iqk0_ready = false, tx0_finish = false, rx0_finish = false;
3428 bool tx1iqkok = false, rx1iqkok = false, tx1_fail = true, rx1_fail; 3428 bool tx1iqkok = false, rx1iqkok = false, tx1_fail = true, rx1_fail;
3429 bool iqk1_ready = false, tx1_finish = false, rx1_finish = false, vdf_enable = false; 3429 bool iqk1_ready = false, tx1_finish = false, rx1_finish = false, vdf_enable = false;
3430 int i, tx_dt[3], rx_dt[3], ii, dx = 0, dy = 0; 3430 int i, tx_dt[3] = {0}, rx_dt[3] = {0}, ii, dx = 0, dy = 0;
3431 3431
3432 RT_TRACE(COMP_IQK, DBG_LOUD, 3432 RT_TRACE(COMP_IQK, DBG_LOUD,
3433 ("BandWidth = %d.\n", 3433 ("BandWidth = %d.\n",
diff --git a/drivers/staging/rtl8821ae/rtl8821ae/trx.c b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
index 2c797878567d..75ae4387fe19 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/trx.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/trx.c
@@ -458,13 +458,13 @@ static void _rtl8821ae_translate_rx_signal_stuff(struct ieee80211_hw *hw,
458 memcpy(pstatus->psaddr, psaddr, ETH_ALEN); 458 memcpy(pstatus->psaddr, psaddr, ETH_ALEN);
459 459
460 b_packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) && 460 b_packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) &&
461 (!compare_ether_addr(mac->bssid, (fc & IEEE80211_FCTL_TODS) ? 461 (!ether_addr_equal(mac->bssid, (fc & IEEE80211_FCTL_TODS) ?
462 hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ? 462 hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ?
463 hdr->addr2 : hdr->addr3)) && (!pstatus->b_hwerror) && 463 hdr->addr2 : hdr->addr3)) && (!pstatus->b_hwerror) &&
464 (!pstatus->b_crc) && (!pstatus->b_icv)); 464 (!pstatus->b_crc) && (!pstatus->b_icv));
465 465
466 b_packet_toself = b_packet_matchbssid && 466 b_packet_toself = b_packet_matchbssid &&
467 (!compare_ether_addr(praddr, rtlefuse->dev_addr)); 467 (!ether_addr_equal(praddr, rtlefuse->dev_addr));
468 468
469 if (ieee80211_is_beacon(fc)) 469 if (ieee80211_is_beacon(fc))
470 b_packet_beacon = true; 470 b_packet_beacon = true;