diff --git a/Kconfig b/Kconfig deleted file mode 100644 index a9bcb9cd..00000000 --- a/Kconfig +++ /dev/null @@ -1,23 +0,0 @@ -config MWLWIFI - tristate "Marvell Avastar 88W8864/88W8897 PCIe driver (mac80211 compatible)" - depends on PCI && MAC80211 - select FW_LOADER - ---help--- - Select to build the driver supporting the: - - Marvell Wireless Wi-Fi 88W8864 modules - Marvell Wireless Wi-Fi 88W8897 modules - - This driver uses the kernel's mac80211 subsystem. - - If you want to compile the driver as a module (= code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read . The - module will be called mwlwifi. - - NOTE: Selecting this driver may cause conflict with MWIFIEX driver - that also operates on the same part number 88W8897. Users should - select either MWIFIEX or MWLWIFI, not both. MWIFIEX is fullmac, - supporting more comprehensive client functions for laptops/embedded - devices. MWLWIFI is mac80211-based for full AP/Wireless Bridge. - diff --git a/Makefile.external b/Makefile.external deleted file mode 100644 index 11cbf8e5..00000000 --- a/Makefile.external +++ /dev/null @@ -1,39 +0,0 @@ -obj-m += mwlwifi.o - -mwlwifi-objs += main.o -mwlwifi-objs += mac80211.o -mwlwifi-objs += fwdl.o -mwlwifi-objs += fwcmd.o -mwlwifi-objs += tx.o -mwlwifi-objs += rx.o -mwlwifi-objs += isr.o -mwlwifi-$(CONFIG_THERMAL) += thermal.o -mwlwifi-$(CONFIG_DEBUG_FS) += debugfs.o -ifeq (1, $(BUILD_MFG)) -mwlwifi-objs += mfg.o -endif - -AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc - -EXTRA_CFLAGS+= -I${KDIR} -EXTRA_CFLAGS+= -O2 -funroll-loops -D__CHECK_ENDIAN__ - -ifeq (1, $(BUILD_MFG)) -EXTRA_CFLAGS+= -DSUPPORT_MFG -endif - -ifeq (1, $(BUILD_BG4CT_A0)) -EXTRA_CFLAGS+= -DBG4CT_A0_WORKAROUND -endif - -EXTRA_CFLAGS+= -I${PWD} - -all: - $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules - -clean: - rm -f *.o *.a *.s *.ko *.ko.cmd *.o.cmd *.mod.* .mwlwifi.* - rm -rf modules.order Module.symvers .tmp_versions - find . -name ".*.o.cmd" -exec rm -f {} \; diff --git a/Makefile.kernel b/Makefile.kernel deleted file mode 100644 index 37af74f7..00000000 --- a/Makefile.kernel +++ /dev/null @@ -1,13 +0,0 @@ -obj-$(CONFIG_MWLWIFI) += mwlwifi.o - -mwlwifi-objs += main.o -mwlwifi-objs += mac80211.o -mwlwifi-objs += fwdl.o -mwlwifi-objs += fwcmd.o -mwlwifi-objs += tx.o -mwlwifi-objs += rx.o -mwlwifi-objs += isr.o -mwlwifi-$(CONFIG_THERMAL) += thermal.o -mwlwifi-$(CONFIG_DEBUG_FS) += debugfs.o - -ccflags-y += -D__CHECK_ENDIAN__ diff --git a/debugfs.c b/debugfs.c index aa906454..cb1763f2 100644 --- a/debugfs.c +++ b/debugfs.c @@ -438,11 +438,9 @@ static ssize_t mwl_debugfs_dfs_channel_read(struct file *file, channel->hw_value, channel->center_freq, channel->flags, channel->dfs_state); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) len += scnprintf(p + len, size - len, "cac timer: %d ms\n", channel->dfs_cac_ms); -#endif } } len += scnprintf(p + len, size - len, "\n"); @@ -493,10 +491,8 @@ static ssize_t mwl_debugfs_dfs_channel_write(struct file *file, channel = &sband->channels[i]; if (channel->flags & IEEE80211_CHAN_RADAR) { channel->dfs_state = dfs_state; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) if (cac_time != -1) channel->dfs_cac_ms = cac_time * 1000; -#endif } } ret = count; diff --git a/dev.h b/dev.h index 7982fcfc..9e70bfe7 100644 --- a/dev.h +++ b/dev.h @@ -509,10 +509,6 @@ static inline struct mwl_sta *mwl_dev_get_sta(const struct ieee80211_sta *sta) 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; diff --git a/mac80211.c b/mac80211.c index 9dc563b2..7039176b 100644 --- a/mac80211.c +++ b/mac80211.c @@ -598,19 +598,11 @@ static int mwl_mac80211_get_survey(struct ieee80211_hw *hw, 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; @@ -713,7 +705,6 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, return rc; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) static int mwl_mac80211_chnl_switch(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_channel_switch *ch_switch) @@ -725,7 +716,6 @@ static int mwl_mac80211_chnl_switch(struct ieee80211_hw *hw, return rc; } -#endif const struct ieee80211_ops mwl_mac80211_ops = { .tx = mwl_mac80211_tx, @@ -744,7 +734,5 @@ const struct ieee80211_ops mwl_mac80211_ops = { .get_stats = mwl_mac80211_get_stats, .get_survey = mwl_mac80211_get_survey, .ampdu_action = mwl_mac80211_ampdu_action, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0) .pre_channel_switch = mwl_mac80211_chnl_switch, -#endif }; diff --git a/main.c b/main.c index 6a58c6e6..3e6446e1 100644 --- a/main.c +++ b/main.c @@ -423,11 +423,7 @@ static void mwl_set_ht_caps(struct mwl_priv *priv, 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 *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; diff --git a/rx.c b/rx.c index 7831bb74..997c6ee6 100644 --- a/rx.c +++ b/rx.c @@ -232,10 +232,8 @@ static inline void mwl_rx_prepare_status(struct mwl_rx_desc *pdesc, 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);