2015-07-07 22:07:22 +00:00
|
|
|
--- a/main.c
|
|
|
|
+++ b/main.c
|
2016-05-21 15:47:20 +00:00
|
|
|
@@ -423,11 +423,7 @@ static void mwl_set_ht_caps(struct mwl_p
|
2015-07-07 22:07:22 +00:00
|
|
|
band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_20;
|
|
|
|
band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_40;
|
|
|
|
|
2015-10-29 12:11:58 +00:00
|
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
2015-07-07 22:07:22 +00:00
|
|
|
- hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
|
2015-10-29 12:11:58 +00:00
|
|
|
-#else
|
|
|
|
ieee80211_hw_set(hw, AMPDU_AGGREGATION);
|
|
|
|
-#endif
|
2015-07-07 22:07:22 +00:00
|
|
|
band->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K;
|
|
|
|
band->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_4;
|
|
|
|
|
2016-05-21 15:47:20 +00:00
|
|
|
@@ -563,29 +559,16 @@ static int mwl_wl_init(struct mwl_priv *
|
2015-07-07 22:07:22 +00:00
|
|
|
hw->queues = SYSADPT_TX_WMM_QUEUES;
|
|
|
|
|
|
|
|
/* Set rssi values to dBm */
|
2015-10-29 12:11:58 +00:00
|
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
2015-07-07 22:07:22 +00:00
|
|
|
- hw->flags |= IEEE80211_HW_SIGNAL_DBM | IEEE80211_HW_HAS_RATE_CONTROL;
|
2015-10-29 12:11:58 +00:00
|
|
|
-#else
|
|
|
|
ieee80211_hw_set(hw, SIGNAL_DBM);
|
|
|
|
ieee80211_hw_set(hw, HAS_RATE_CONTROL);
|
|
|
|
-#endif
|
2015-07-07 22:07:22 +00:00
|
|
|
|
2015-10-29 12:11:58 +00:00
|
|
|
/* Ask mac80211 not to trigger PS mode
|
2015-07-07 22:07:22 +00:00
|
|
|
* based on PM bit of incoming frames.
|
|
|
|
*/
|
2015-10-29 12:11:58 +00:00
|
|
|
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
|
2015-07-07 22:07:22 +00:00
|
|
|
- hw->flags |= IEEE80211_HW_AP_LINK_PS;
|
2015-10-29 12:11:58 +00:00
|
|
|
-#else
|
|
|
|
ieee80211_hw_set(hw, AP_LINK_PS);
|
|
|
|
-#endif
|
2015-07-07 22:07:22 +00:00
|
|
|
|
2015-11-26 14:08:37 +00:00
|
|
|
-#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;
|
2016-05-21 15:47:20 +00:00
|
|
|
hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
2015-11-26 14:08:37 +00:00
|
|
|
--- a/dev.h
|
|
|
|
+++ b/dev.h
|
2016-05-21 15:47:20 +00:00
|
|
|
@@ -506,10 +506,6 @@ static inline struct mwl_sta *mwl_dev_ge
|
2015-11-26 14:08:37 +00:00
|
|
|
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
|
2016-05-21 15:47:20 +00:00
|
|
|
@@ -598,19 +598,11 @@ static int mwl_mac80211_get_survey(struc
|
2015-11-26 14:08:37 +00:00
|
|
|
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);
|