mirror of https://github.com/hak5/openwrt.git
mwlwifi: Update to latest version
Signed-off-by: Gabe Rodriguez <lifehacksback@gmail.com>lede-17.01
parent
2f2d1829be
commit
07e8cfed8a
|
@ -8,7 +8,7 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=mwlwifi
|
||||
PKG_VERSION:=10.3.0.17-20160520-1
|
||||
PKG_VERSION:=10.3.0.17-20160617
|
||||
PKG_RELEASE=1
|
||||
|
||||
PKG_LICENSE:=ISC
|
||||
|
@ -17,7 +17,7 @@ PKG_LICENSE_FILES:=
|
|||
PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=7d49296d12b44025278a52c5a26fb1b4236f320f
|
||||
PKG_SOURCE_VERSION:=b7aff3c2839b048407d716d1cb9326122ee401f8
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
|
||||
|
|
|
@ -1,92 +0,0 @@
|
|||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -423,11 +423,7 @@ static void mwl_set_ht_caps(struct mwl_p
|
||||
band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_20;
|
||||
band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_40;
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
||||
- hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
|
||||
-#else
|
||||
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
||||
-#endif
|
||||
band->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
|
||||
band->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_4;
|
||||
|
||||
@@ -563,29 +559,16 @@ static int mwl_wl_init(struct mwl_priv *
|
||||
hw->queues = SYSADPT_TX_WMM_QUEUES;
|
||||
|
||||
/* Set rssi values to dBm */
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
||||
- hw->flags |= IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_HAS_RATE_CONTROL;
|
||||
-#else
|
||||
ieee80211_hw_set(hw, SIGNAL_DBM);
|
||||
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
||||
-#endif
|
||||
|
||||
/* Ask mac80211 not to trigger PS mode
|
||||
* based on PM bit of incoming frames.
|
||||
*/
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
||||
- hw->flags |= IEEE80211_HW_AP_LINK_PS;
|
||||
-#else
|
||||
ieee80211_hw_set(hw, AP_LINK_PS);
|
||||
-#endif
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
||||
- hw->flags |= IEEE80211_HW_SUPPORTS_PER_STA_GTK |
|
||||
- IEEE80211_HW_MFP_CAPABLE;
|
||||
-#else
|
||||
ieee80211_hw_set(hw, SUPPORTS_PER_STA_GTK);
|
||||
ieee80211_hw_set(hw, MFP_CAPABLE);
|
||||
-#endif
|
||||
|
||||
hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
|
||||
hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||
--- a/dev.h
|
||||
+++ b/dev.h
|
||||
@@ -506,10 +506,6 @@ static inline struct mwl_sta *mwl_dev_ge
|
||||
return (struct mwl_sta *)&sta->drv_priv;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
|
||||
-#define ether_addr_copy(dst, src) memcpy(dst, src, ETH_ALEN)
|
||||
-#endif
|
||||
-
|
||||
/* Defined in mac80211.c. */
|
||||
extern const struct ieee80211_ops mwl_mac80211_ops;
|
||||
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -598,19 +598,11 @@ static int mwl_mac80211_get_survey(struc
|
||||
return 0;
|
||||
}
|
||||
|
||||
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0)
|
||||
-static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_vif *vif,
|
||||
- enum ieee80211_ampdu_mlme_action action,
|
||||
- struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn, u8 buf_size)
|
||||
-#else
|
||||
static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
enum ieee80211_ampdu_mlme_action action,
|
||||
struct ieee80211_sta *sta,
|
||||
u16 tid, u16 *ssn, u8 buf_size, bool amsdu)
|
||||
-#endif
|
||||
{
|
||||
int rc = 0;
|
||||
struct mwl_priv *priv = hw->priv;
|
||||
--- a/rx.c
|
||||
+++ b/rx.c
|
||||
@@ -232,10 +232,8 @@ static inline void mwl_rx_prepare_status
|
||||
status->flag |= RX_FLAG_VHT;
|
||||
if (bw == RX_RATE_INFO_HT40)
|
||||
status->flag |= RX_FLAG_40MHZ;
|
||||
-#if LINUX_VERSION_CODE > KERNEL_VERSION(3, 18, 0)
|
||||
if (bw == RX_RATE_INFO_HT80)
|
||||
status->vht_flag |= RX_VHT_FLAG_80MHZ;
|
||||
-#endif
|
||||
if (gi == RX_RATE_INFO_SHORT_INTERVAL)
|
||||
status->flag |= RX_FLAG_SHORT_GI;
|
||||
status->vht_nss = (nss + 1);
|
|
@ -1,267 +0,0 @@
|
|||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -260,12 +260,12 @@ static int mwl_mac80211_config(struct ie
|
||||
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
|
||||
int rate = 0;
|
||||
|
||||
- if (conf->chandef.chan->band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (conf->chandef.chan->band == NL80211_BAND_2GHZ) {
|
||||
mwl_fwcmd_set_apmode(hw, AP_MODE_2_4GHZ_11AC_MIXED);
|
||||
mwl_fwcmd_set_linkadapt_cs_mode(hw,
|
||||
LINK_CS_STATE_CONSERV);
|
||||
rate = mwl_rates_24[0].hw_value;
|
||||
- } else if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ) {
|
||||
+ } else if (conf->chandef.chan->band == NL80211_BAND_5GHZ) {
|
||||
mwl_fwcmd_set_apmode(hw, AP_MODE_11AC);
|
||||
mwl_fwcmd_set_linkadapt_cs_mode(hw,
|
||||
LINK_CS_STATE_AUTO);
|
||||
@@ -333,7 +333,7 @@ static void mwl_mac80211_bss_info_change
|
||||
if (idx)
|
||||
idx--;
|
||||
|
||||
- if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
|
||||
rate = mwl_rates_24[idx].hw_value;
|
||||
else
|
||||
rate = mwl_rates_50[idx].hw_value;
|
||||
@@ -600,10 +600,13 @@ static int mwl_mac80211_get_survey(struc
|
||||
|
||||
static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
- enum ieee80211_ampdu_mlme_action action,
|
||||
- struct ieee80211_sta *sta,
|
||||
- u16 tid, u16 *ssn, u8 buf_size, bool amsdu)
|
||||
+ struct ieee80211_ampdu_params *params)
|
||||
{
|
||||
+ enum ieee80211_ampdu_mlme_action action = params->action;
|
||||
+ struct ieee80211_sta *sta = params->sta;
|
||||
+ u16 tid = params->tid;
|
||||
+ u16 *ssn = ¶ms->ssn;
|
||||
+ u8 buf_size = params->buf_size;
|
||||
int rc = 0;
|
||||
struct mwl_priv *priv = hw->priv;
|
||||
struct mwl_ampdu_stream *stream;
|
||||
--- a/fwcmd.c
|
||||
+++ b/fwcmd.c
|
||||
@@ -730,9 +730,9 @@ static int mwl_fwcmd_set_country_code(st
|
||||
bool enable = false;
|
||||
|
||||
if (b_inf->ie_country_ptr) {
|
||||
- if (bss_conf->chandef.chan->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (bss_conf->chandef.chan->band == NL80211_BAND_2GHZ)
|
||||
a_band = false;
|
||||
- else if (bss_conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (bss_conf->chandef.chan->band == NL80211_BAND_5GHZ)
|
||||
a_band = true;
|
||||
else
|
||||
return -EINVAL;
|
||||
@@ -1075,9 +1075,9 @@ int mwl_fwcmd_max_tx_power(struct ieee80
|
||||
break;
|
||||
}
|
||||
|
||||
- if (channel->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (channel->band == NL80211_BAND_2GHZ)
|
||||
band = FREQ_BAND_2DOT4GHZ;
|
||||
- else if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (channel->band == NL80211_BAND_5GHZ)
|
||||
band = FREQ_BAND_5GHZ;
|
||||
|
||||
switch (conf->chandef.width) {
|
||||
@@ -1161,9 +1161,9 @@ int mwl_fwcmd_tx_power(struct ieee80211_
|
||||
break;
|
||||
}
|
||||
|
||||
- if (channel->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (channel->band == NL80211_BAND_2GHZ)
|
||||
band = FREQ_BAND_2DOT4GHZ;
|
||||
- else if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (channel->band == NL80211_BAND_5GHZ)
|
||||
band = FREQ_BAND_5GHZ;
|
||||
|
||||
switch (conf->chandef.width) {
|
||||
@@ -1354,9 +1354,9 @@ int mwl_fwcmd_set_rf_channel(struct ieee
|
||||
pcmd->action = cpu_to_le16(WL_SET);
|
||||
pcmd->curr_chnl = channel->hw_value;
|
||||
|
||||
- if (channel->band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (channel->band == NL80211_BAND_2GHZ) {
|
||||
freq_band = FREQ_BAND_2DOT4GHZ;
|
||||
- } else if (channel->band == IEEE80211_BAND_5GHZ) {
|
||||
+ } else if (channel->band == NL80211_BAND_5GHZ) {
|
||||
freq_band = FREQ_BAND_5GHZ;
|
||||
} else {
|
||||
mutex_unlock(&priv->fwcmd_mutex);
|
||||
@@ -1923,10 +1923,10 @@ int mwl_fwcmd_set_new_stn_add(struct iee
|
||||
}
|
||||
ether_addr_copy(pcmd->mac_addr, sta->addr);
|
||||
|
||||
- if (hw->conf.chandef.chan->band == IEEE80211_BAND_2GHZ)
|
||||
- rates = sta->supp_rates[IEEE80211_BAND_2GHZ];
|
||||
+ if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
|
||||
+ rates = sta->supp_rates[NL80211_BAND_2GHZ];
|
||||
else
|
||||
- rates = sta->supp_rates[IEEE80211_BAND_5GHZ] << 5;
|
||||
+ rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
|
||||
pcmd->peer_info.legacy_rate_bitmap = cpu_to_le32(rates);
|
||||
|
||||
if (sta->ht_cap.ht_supported) {
|
||||
@@ -2097,9 +2097,9 @@ int mwl_fwcmd_set_switch_channel(struct
|
||||
if (priv->csa_active)
|
||||
return 0;
|
||||
|
||||
- if (channel->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (channel->band == NL80211_BAND_2GHZ)
|
||||
freq_band = FREQ_BAND_2DOT4GHZ;
|
||||
- else if (channel->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (channel->band == NL80211_BAND_5GHZ)
|
||||
freq_band = FREQ_BAND_5GHZ;
|
||||
else
|
||||
return -EINVAL;
|
||||
--- a/main.c
|
||||
+++ b/main.c
|
||||
@@ -63,20 +63,20 @@ static struct mwl_chip_info mwl_chip_tbl
|
||||
};
|
||||
|
||||
static const struct ieee80211_channel mwl_channels_24[] = {
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, },
|
||||
- { .band = IEEE80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2412, .hw_value = 1, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2417, .hw_value = 2, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2422, .hw_value = 3, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2427, .hw_value = 4, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2432, .hw_value = 5, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2437, .hw_value = 6, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2442, .hw_value = 7, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2447, .hw_value = 8, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2452, .hw_value = 9, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2457, .hw_value = 10, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2462, .hw_value = 11, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2467, .hw_value = 12, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2472, .hw_value = 13, },
|
||||
+ { .band = NL80211_BAND_2GHZ, .center_freq = 2484, .hw_value = 14, },
|
||||
};
|
||||
|
||||
static const struct ieee80211_rate mwl_rates_24[] = {
|
||||
@@ -96,30 +96,30 @@ static const struct ieee80211_rate mwl_r
|
||||
};
|
||||
|
||||
static const struct ieee80211_channel mwl_channels_50[] = {
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5260, .hw_value = 52, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5280, .hw_value = 56, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5300, .hw_value = 60, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5320, .hw_value = 64, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5500, .hw_value = 100, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5520, .hw_value = 104, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5540, .hw_value = 108, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5560, .hw_value = 112, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5580, .hw_value = 116, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5600, .hw_value = 120, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5620, .hw_value = 124, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5640, .hw_value = 128, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5660, .hw_value = 132, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5680, .hw_value = 136, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5700, .hw_value = 140, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5720, .hw_value = 144, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5745, .hw_value = 149, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5765, .hw_value = 153, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5785, .hw_value = 157, },
|
||||
- { .band = IEEE80211_BAND_5GHZ, .center_freq = 5805, .hw_value = 161, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5180, .hw_value = 36, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5200, .hw_value = 40, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5220, .hw_value = 44, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5240, .hw_value = 48, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5260, .hw_value = 52, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5280, .hw_value = 56, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5300, .hw_value = 60, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5320, .hw_value = 64, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5500, .hw_value = 100, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5520, .hw_value = 104, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5540, .hw_value = 108, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5560, .hw_value = 112, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5580, .hw_value = 116, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5600, .hw_value = 120, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5620, .hw_value = 124, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5640, .hw_value = 128, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5660, .hw_value = 132, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5680, .hw_value = 136, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5700, .hw_value = 140, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5720, .hw_value = 144, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5745, .hw_value = 149, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5765, .hw_value = 153, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5785, .hw_value = 157, },
|
||||
+ { .band = NL80211_BAND_5GHZ, .center_freq = 5805, .hw_value = 161, },
|
||||
};
|
||||
|
||||
static const struct ieee80211_rate mwl_rates_50[] = {
|
||||
@@ -478,7 +478,7 @@ static void mwl_set_caps(struct mwl_priv
|
||||
BUILD_BUG_ON(sizeof(priv->rates_24) != sizeof(mwl_rates_24));
|
||||
memcpy(priv->rates_24, mwl_rates_24, sizeof(mwl_rates_24));
|
||||
|
||||
- priv->band_24.band = IEEE80211_BAND_2GHZ;
|
||||
+ priv->band_24.band = NL80211_BAND_2GHZ;
|
||||
priv->band_24.channels = priv->channels_24;
|
||||
priv->band_24.n_channels = ARRAY_SIZE(mwl_channels_24);
|
||||
priv->band_24.bitrates = priv->rates_24;
|
||||
@@ -487,7 +487,7 @@ static void mwl_set_caps(struct mwl_priv
|
||||
mwl_set_ht_caps(priv, &priv->band_24);
|
||||
mwl_set_vht_caps(priv, &priv->band_24);
|
||||
|
||||
- hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band_24;
|
||||
+ hw->wiphy->bands[NL80211_BAND_2GHZ] = &priv->band_24;
|
||||
}
|
||||
|
||||
/* set up band information for 5G */
|
||||
@@ -500,7 +500,7 @@ static void mwl_set_caps(struct mwl_priv
|
||||
BUILD_BUG_ON(sizeof(priv->rates_50) != sizeof(mwl_rates_50));
|
||||
memcpy(priv->rates_50, mwl_rates_50, sizeof(mwl_rates_50));
|
||||
|
||||
- priv->band_50.band = IEEE80211_BAND_5GHZ;
|
||||
+ priv->band_50.band = NL80211_BAND_5GHZ;
|
||||
priv->band_50.channels = priv->channels_50;
|
||||
priv->band_50.n_channels = ARRAY_SIZE(mwl_channels_50);
|
||||
priv->band_50.bitrates = priv->rates_50;
|
||||
@@ -509,7 +509,7 @@ static void mwl_set_caps(struct mwl_priv
|
||||
mwl_set_ht_caps(priv, &priv->band_50);
|
||||
mwl_set_vht_caps(priv, &priv->band_50);
|
||||
|
||||
- hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &priv->band_50;
|
||||
+ hw->wiphy->bands[NL80211_BAND_5GHZ] = &priv->band_50;
|
||||
}
|
||||
}
|
||||
|
||||
--- a/rx.c
|
||||
+++ b/rx.c
|
||||
@@ -243,7 +243,7 @@ static inline void mwl_rx_prepare_status
|
||||
status->rate_idx = rt;
|
||||
|
||||
if (pdesc->channel > BAND_24_CHANNEL_NUM) {
|
||||
- status->band = IEEE80211_BAND_5GHZ;
|
||||
+ status->band = NL80211_BAND_5GHZ;
|
||||
if ((!(status->flag & RX_FLAG_HT)) &&
|
||||
(!(status->flag & RX_FLAG_VHT))) {
|
||||
status->rate_idx -= 5;
|
||||
@@ -251,7 +251,7 @@ static inline void mwl_rx_prepare_status
|
||||
status->rate_idx = BAND_50_RATE_NUM - 1;
|
||||
}
|
||||
} else {
|
||||
- status->band = IEEE80211_BAND_2GHZ;
|
||||
+ status->band = NL80211_BAND_2GHZ;
|
||||
if ((!(status->flag & RX_FLAG_HT)) &&
|
||||
(!(status->flag & RX_FLAG_VHT))) {
|
||||
if (status->rate_idx >= BAND_24_RATE_NUM)
|
|
@ -1,73 +0,0 @@
|
|||
--- a/fwcmd.c
|
||||
+++ b/fwcmd.c
|
||||
@@ -132,7 +132,7 @@ static int mwl_fwcmd_wait_complete(struc
|
||||
int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[2]));
|
||||
else
|
||||
int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0]));
|
||||
- mdelay(1);
|
||||
+ usleep_range(1000, 2000);
|
||||
} while ((int_code != cmd) && (--curr_iteration));
|
||||
|
||||
if (curr_iteration == 0) {
|
||||
@@ -142,7 +142,7 @@ static int mwl_fwcmd_wait_complete(struc
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
- mdelay(3);
|
||||
+ usleep_range(3000, 5000);
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/fwdl.c
|
||||
+++ b/fwdl.c
|
||||
@@ -74,7 +74,7 @@ int mwl_fwdl_download_firmware(struct ie
|
||||
/* FW before jumping to boot rom, it will enable PCIe transaction retry,
|
||||
* wait for boot code to stop it.
|
||||
*/
|
||||
- mdelay(FW_CHECK_MSECS);
|
||||
+ usleep_range(FW_CHECK_MSECS * 1000, FW_CHECK_MSECS * 2000);
|
||||
|
||||
writel(MACREG_A2HRIC_BIT_MASK,
|
||||
priv->iobase1 + MACREG_REG_A2H_INTERRUPT_CLEAR_SEL);
|
||||
@@ -95,7 +95,7 @@ int mwl_fwdl_download_firmware(struct ie
|
||||
|
||||
/* make sure SCRATCH2 C40 is clear, in case we are too quick */
|
||||
while (readl(priv->iobase1 + 0xc40) == 0)
|
||||
- ;
|
||||
+ cond_resched();
|
||||
|
||||
while (size_fw_downloaded < fw->size) {
|
||||
len = readl(priv->iobase1 + 0xc40);
|
||||
@@ -125,6 +125,7 @@ int mwl_fwdl_download_firmware(struct ie
|
||||
int_code = readl(priv->iobase1 + 0xc1c);
|
||||
if (int_code != 0)
|
||||
break;
|
||||
+ cond_resched();
|
||||
curr_iteration--;
|
||||
} while (curr_iteration);
|
||||
|
||||
@@ -133,6 +134,7 @@ int mwl_fwdl_download_firmware(struct ie
|
||||
if ((int_code & MACREG_H2ARIC_BIT_DOOR_BELL) !=
|
||||
MACREG_H2ARIC_BIT_DOOR_BELL)
|
||||
break;
|
||||
+ cond_resched();
|
||||
curr_iteration--;
|
||||
} while (curr_iteration);
|
||||
|
||||
@@ -167,12 +169,14 @@ int mwl_fwdl_download_firmware(struct ie
|
||||
do {
|
||||
curr_iteration--;
|
||||
if (priv->mfg_mode && priv->chip_type == MWL8897) {
|
||||
- mdelay(FW_CHECK_MSECS);
|
||||
+ usleep_range(FW_CHECK_MSECS * 1000,
|
||||
+ FW_CHECK_MSECS * 2000);
|
||||
int_code = readl(priv->iobase1 + 0xc44);
|
||||
} else {
|
||||
writel(HOSTCMD_SOFTAP_MODE,
|
||||
priv->iobase1 + MACREG_REG_GEN_PTR);
|
||||
- mdelay(FW_CHECK_MSECS);
|
||||
+ usleep_range(FW_CHECK_MSECS * 1000,
|
||||
+ FW_CHECK_MSECS * 2000);
|
||||
int_code = readl(priv->iobase1 + MACREG_REG_INT_CODE);
|
||||
}
|
||||
if (!(curr_iteration % 0xff) && (int_code != 0))
|
|
@ -1,22 +0,0 @@
|
|||
--- a/fwcmd.c
|
||||
+++ b/fwcmd.c
|
||||
@@ -2393,8 +2393,6 @@ int mwl_fwcmd_check_ba(struct ieee80211_
|
||||
|
||||
if (pcmd->cmd_hdr.result != 0) {
|
||||
mutex_unlock(&priv->fwcmd_mutex);
|
||||
- wiphy_err(hw->wiphy, "check ba result error %d\n",
|
||||
- le16_to_cpu(pcmd->cmd_hdr.result));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
--- a/mac80211.c
|
||||
+++ b/mac80211.c
|
||||
@@ -644,8 +644,6 @@ static int mwl_mac80211_ampdu_action(str
|
||||
spin_lock_bh(&priv->stream_lock);
|
||||
if (rc) {
|
||||
mwl_fwcmd_remove_stream(hw, stream);
|
||||
- wiphy_err(hw->wiphy,
|
||||
- "ampdu start error code: %d\n", rc);
|
||||
rc = -EPERM;
|
||||
break;
|
||||
}
|
Loading…
Reference in New Issue