staging: r8821ae: Fix build problems
authorLarry Finger <Larry.Finger@lwfinger.net>
Sun, 26 Jan 2014 19:17:33 +0000 (13:17 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Jan 2014 17:39:40 +0000 (09:39 -0800)
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>
drivers/staging/rtl8821ae/base.c
drivers/staging/rtl8821ae/ps.c
drivers/staging/rtl8821ae/regd.h
drivers/staging/rtl8821ae/rtl8821ae/dm.c
drivers/staging/rtl8821ae/rtl8821ae/phy.c
drivers/staging/rtl8821ae/rtl8821ae/trx.c

index b5a50d0c6304ec283b2cd73ab6962468dab5f13d..18c936fbdf1e9df6689953874b338fa1a6248e03 100644 (file)
@@ -369,7 +369,6 @@ static void _rtl_init_mac80211(struct ieee80211_hw *hw)
 
        /* TODO: Correct this value for our hw */
        /* TODO: define these hard code value */
-       hw->channel_change_time = 100;
        hw->max_listen_interval = 10;
        hw->max_rate_tries = 4;
        /* hw->max_rates = 1; */
@@ -1182,7 +1181,7 @@ void rtl_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb)
                return;
 
        /* and only beacons from the associated BSSID, please */
-       if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
+       if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
                return;
 
        rtlpriv->link_info.bcn_rx_inperiod ++;
@@ -1650,7 +1649,7 @@ void rtl_recognize_peer(struct ieee80211_hw *hw, u8 *data, unsigned int len)
                return;
 
        /* and only beacons from the associated BSSID, please */
-       if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
+       if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
                return;
 
        if (rtl_find_221_ie(hw, data, len)) {
index 6c86436e8dd353586113b1133ab0966f4e5bc89d..f12ffa83c58d60b51632d5496ee7c0a617fe6b09 100644 (file)
@@ -527,7 +527,7 @@ void rtl_swlps_beacon(struct ieee80211_hw *hw, void *data, unsigned int len)
                return;
 
        /* and only beacons from the associated BSSID, please */
-       if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
+       if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
                return;
 
        rtlpriv->psc.last_beacon = jiffies;
@@ -1007,7 +1007,7 @@ void rtl_p2p_info(struct ieee80211_hw *hw, void *data, unsigned int len)
                return;
 
        /* and only beacons from the associated BSSID, please */
-       if (compare_ether_addr(hdr->addr3, rtlpriv->mac80211.bssid))
+       if (ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
                return;
 
        /* check if this really is a beacon */
index c126cf9c92ad07f0757ad1e9ca1f99956f6e976d..abc60ab8165cb0ab499208232050de3fbcb0c1ba 100644 (file)
 #ifndef __RTL_REGD_H__
 #define __RTL_REGD_H__
 
+#define IEEE80211_CHAN_NO_IBSS         1<<2
+#define IEEE80211_CHAN_PASSIVE_SCAN    1<<1
+#define WIPHY_FLAG_CUSTOM_REGULATORY   BIT(0)
+#define WIPHY_FLAG_STRICT_REGULATORY   BIT(1)
+#define WIPHY_FLAG_DISABLE_BEACON_HINTS        BIT(2)
+
 struct country_code_to_enum_rd {
        u16 countrycode;
        const char *iso_name;
index 41bd21d0e8cd600cc0d2d91af08ece4491d76fee..8634206b892986b39bb406de189997414a7a5c0e 100644 (file)
@@ -1339,7 +1339,7 @@ void rtl8812ae_dm_txpwr_track_set_pwr(struct ieee80211_hw *hw,
        u32 final_bb_swing_idx[2];
        u8 pwr_tracking_limit = 26; /*+1.0dB*/
        u8 tx_rate = 0xFF;
-       char final_ofdm_swing_index = 0;
+       s8 final_ofdm_swing_index = 0;
 
        if(rtldm->tx_rate != 0xFF)
                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,
        u32 final_bb_swing_idx[1];
        u8 pwr_tracking_limit = 26; /*+1.0dB*/
        u8 tx_rate = 0xFF;
-       char final_ofdm_swing_index = 0;
+       s8 final_ofdm_swing_index = 0;
 
        if(rtldm->tx_rate != 0xFF)
                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)
        struct rtl_dm *rtldm =  rtl_dm(rtl_priv(hw));
 
        /*Keep past Tx/Rx packet count for RT-to-RT EDCA turbo.*/
-       u64 cur_tx_ok_cnt = 0;
-       u64 cur_rx_ok_cnt = 0;
+       unsigned long cur_tx_ok_cnt = 0;
+       unsigned long cur_rx_ok_cnt = 0;
        u32 edca_be_ul = 0x5ea42b;
        u32 edca_be_dl = 0x5ea42b;
        u32 edca_be = 0x5ea42b;
index 09ffdc2e63a33d3d433191ac51294d54394f283d..d02fca38a2b2e31b981dc4e08087a381d96b35ed 100644 (file)
@@ -3427,7 +3427,7 @@ void _rtl8812ae_iqk_tx(
        bool iqk0_ready = false, tx0_finish = false, rx0_finish = false;
        bool tx1iqkok = false, rx1iqkok = false, tx1_fail = true, rx1_fail;
        bool iqk1_ready = false, tx1_finish = false, rx1_finish = false, vdf_enable = false;
-       int i, tx_dt[3], rx_dt[3], ii, dx = 0, dy = 0;
+       int i, tx_dt[3] = {0}, rx_dt[3] = {0}, ii, dx = 0, dy = 0;
 
        RT_TRACE(COMP_IQK, DBG_LOUD,
                        ("BandWidth = %d.\n",
index 2c797878567d86b2db1d15da04238cfbca978e18..75ae4387fe19ff8f34cb828118dba6bab5cae1a4 100644 (file)
@@ -458,13 +458,13 @@ static void _rtl8821ae_translate_rx_signal_stuff(struct ieee80211_hw *hw,
        memcpy(pstatus->psaddr, psaddr, ETH_ALEN);
 
        b_packet_matchbssid = ((IEEE80211_FTYPE_CTL != type) &&
-            (!compare_ether_addr(mac->bssid, (fc & IEEE80211_FCTL_TODS) ?
+            (!ether_addr_equal(mac->bssid, (fc & IEEE80211_FCTL_TODS) ?
                                  hdr->addr1 : (fc & IEEE80211_FCTL_FROMDS) ?
                                  hdr->addr2 : hdr->addr3)) && (!pstatus->b_hwerror) &&
                                  (!pstatus->b_crc) && (!pstatus->b_icv));
 
        b_packet_toself = b_packet_matchbssid &&
-           (!compare_ether_addr(praddr, rtlefuse->dev_addr));
+           (!ether_addr_equal(praddr, rtlefuse->dev_addr));
 
        if (ieee80211_is_beacon(fc))
                b_packet_beacon = true;