From 265d3143319ccd598ea89ca71c745e5badadfd3d Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 14:15:19 +0800 Subject: Modified the code to be compiled directly. 1. Removed linux version checking. 2. Removed unused files. Signed-off-by: David Lin --- Kconfig | 23 ----------------------- Makefile.external | 39 --------------------------------------- Makefile.kernel | 13 ------------- debugfs.c | 4 ---- dev.h | 4 ---- mac80211.c | 12 ------------ main.c | 17 ----------------- rx.c | 2 -- 8 files changed, 114 deletions(-) delete mode 100644 Kconfig delete mode 100644 Makefile.external delete mode 100644 Makefile.kernel diff --git a/Kconfig b/Kconfig deleted file mode 100644 index a9bcb9c..0000000 --- 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 11cbf8e..0000000 --- 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 37af74f..0000000 --- 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 aa90645..cb1763f 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 7982fcf..9e70bfe 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 9dc563b..7039176 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 6a58c6e..3e6446e 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 7831bb7..997c6ee 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); -- cgit v1.2.3 From 6bacc5aa695a1f890a8842f58762a5e5e249ccea Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 14:44:52 +0800 Subject: Removed code related to MESH. Signed-off-by: David Lin --- debugfs.c | 5 ---- dev.h | 10 -------- fwcmd.c | 50 ++----------------------------------- mac80211.c | 25 ------------------- main.c | 6 ----- rx.c | 84 -------------------------------------------------------------- 6 files changed, 2 insertions(+), 178 deletions(-) diff --git a/debugfs.c b/debugfs.c index cb1763f..1be3532 100644 --- a/debugfs.c +++ b/debugfs.c @@ -165,11 +165,6 @@ static ssize_t mwl_debugfs_vif_read(struct file *file, char __user *ubuf, len += scnprintf(p + len, size - len, "mac address: %pM\n", mwl_vif->bssid); break; - case NL80211_IFTYPE_MESH_POINT: - len += scnprintf(p + len, size - len, "type: mesh\n"); - len += scnprintf(p + len, size - len, - "mac address: %pM\n", mwl_vif->bssid); - break; case NL80211_IFTYPE_STATION: len += scnprintf(p + len, size - len, "type: sta\n"); len += scnprintf(p + len, size - len, diff --git a/dev.h b/dev.h index 9e70bfe..73a6089 100644 --- a/dev.h +++ b/dev.h @@ -408,11 +408,6 @@ struct beacon_info { u8 *ie_ht_ptr; u8 *ie_vht_ptr; u8 *ie_country_ptr; -#ifdef CONFIG_MAC80211_MESH - u8 *ie_meshid_ptr; - u8 *ie_meshcfg_ptr; - u8 *ie_meshchsw_ptr; -#endif u8 ie_wmm_len; u8 ie_wsc_len; u8 ie_rsn_len; @@ -420,11 +415,6 @@ struct beacon_info { u8 ie_ht_len; u8 ie_vht_len; u8 ie_country_len; -#ifdef CONFIG_MAC80211_MESH - u8 ie_meshid_len; - u8 ie_meshcfg_len; - u8 ie_meshchsw_len; -#endif }; struct mwl_vif { diff --git a/fwcmd.c b/fwcmd.c index 6565ed7..aff509a 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -471,20 +471,6 @@ static void mwl_fwcmd_parse_beacon(struct mwl_priv *priv, beacon_info->ie_ht_ptr += elen; } break; -#ifdef CONFIG_MAC80211_MESH - case WLAN_EID_MESH_CONFIG: - beacon_info->ie_meshcfg_len = (elen + 2); - beacon_info->ie_meshcfg_ptr = (pos - 2); - break; - case WLAN_EID_MESH_ID: - beacon_info->ie_meshid_len = (elen + 2); - beacon_info->ie_meshid_ptr = (pos - 2); - break; - case WLAN_EID_CHAN_SWITCH_PARAM: - beacon_info->ie_meshchsw_len = (elen + 2); - beacon_info->ie_meshchsw_ptr = (pos - 2); - break; -#endif case WLAN_EID_VHT_CAPABILITY: case WLAN_EID_VHT_OPERATION: case WLAN_EID_OPMODE_NOTIF: @@ -562,18 +548,6 @@ static int mwl_fwcmd_set_ies(struct mwl_priv *priv, struct mwl_vif *mwl_vif) memcpy(pcmd->ie_list_vht, beacon->ie_vht_ptr, beacon->ie_vht_len); pcmd->ie_list_len_vht = cpu_to_le16(beacon->ie_vht_len); -#ifdef CONFIG_MAC80211_MESH - memcpy(pcmd->ie_list_proprietary, beacon->ie_meshid_ptr, - beacon->ie_meshid_len); - ie_list_len_proprietary = beacon->ie_meshid_len; - memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary, - beacon->ie_meshcfg_ptr, beacon->ie_meshcfg_len); - ie_list_len_proprietary += beacon->ie_meshcfg_len; - memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary, - beacon->ie_meshchsw_ptr, beacon->ie_meshchsw_len); - ie_list_len_proprietary += beacon->ie_meshchsw_len; -#endif - if (priv->chip_type == MWL8897) { memcpy(pcmd->ie_list_proprietary + ie_list_len_proprietary, beacon->ie_wmm_ptr, beacon->ie_wmm_len); @@ -1957,21 +1931,6 @@ int mwl_fwcmd_set_new_stn_add(struct ieee80211_hw *hw, pcmd->peer_info.vht_rx_channel_width = sta->bandwidth; } - /* Patch mesh interface for VHT based on chip type. Once if mac80211 - * supports VHT for mesh interface, following code should be removed. - */ - if (vif->type == NL80211_IFTYPE_MESH_POINT) { - pcmd->peer_info.vht_max_rx_mcs = cpu_to_le32(0x0000fffa); - pcmd->peer_info.vht_cap = cpu_to_le32(0x33801931); - pcmd->peer_info.vht_rx_channel_width = 2; - if (priv->chip_type == MWL8864) { - if (priv->antenna_rx == ANTENNA_RX_4_AUTO) { - pcmd->peer_info.vht_max_rx_mcs = - cpu_to_le32(0x0000ffea); - } - } - } - pcmd->is_qos_sta = sta->wme; pcmd->qos_info = ((sta->uapsd_queues << 4) | (sta->max_sp << 1)); @@ -2254,15 +2213,10 @@ int mwl_fwcmd_encryption_set_key(struct ieee80211_hw *hw, idx = key->keyidx; - if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) { + if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) action = ENCR_ACTION_TYPE_SET_KEY; - } else { + else action = ENCR_ACTION_TYPE_SET_GROUP_KEY; - if (vif->type == NL80211_IFTYPE_MESH_POINT && - !ether_addr_equal(mwl_vif->bssid, addr)) - pcmd->key_param.key_info |= - cpu_to_le32(ENCR_KEY_FLAG_RXGROUPKEY); - } switch (key->cipher) { case WLAN_CIPHER_SUITE_WEP40: diff --git a/mac80211.c b/mac80211.c index 7039176..dc4fd99 100644 --- a/mac80211.c +++ b/mac80211.c @@ -149,7 +149,6 @@ static int mwl_mac80211_add_interface(struct ieee80211_hw *hw, switch (vif->type) { case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_MESH_POINT: macids_supported = priv->ap_macids_supported; break; case NL80211_IFTYPE_STATION: @@ -183,10 +182,6 @@ static int mwl_mac80211_add_interface(struct ieee80211_hw *hw, ether_addr_copy(mwl_vif->bssid, vif->addr); mwl_fwcmd_set_new_stn_add_self(hw, vif); break; - case NL80211_IFTYPE_MESH_POINT: - ether_addr_copy(mwl_vif->bssid, vif->addr); - mwl_fwcmd_set_new_stn_add_self(hw, vif); - break; case NL80211_IFTYPE_STATION: ether_addr_copy(mwl_vif->sta_mac, vif->addr); mwl_fwcmd_bss_start(hw, vif, true); @@ -228,7 +223,6 @@ static void mwl_mac80211_remove_interface(struct ieee80211_hw *hw, switch (vif->type) { case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_MESH_POINT: mwl_fwcmd_set_new_stn_del(hw, vif, vif->addr); break; case NL80211_IFTYPE_STATION: @@ -370,7 +364,6 @@ static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw, { switch (vif->type) { case NL80211_IFTYPE_AP: - case NL80211_IFTYPE_MESH_POINT: mwl_mac80211_bss_info_changed_ap(hw, vif, info, changed); break; case NL80211_IFTYPE_STATION: @@ -473,24 +466,6 @@ static int mwl_mac80211_sta_add(struct ieee80211_hw *hw, memset(sta_info, 0, sizeof(*sta_info)); - if (vif->type == NL80211_IFTYPE_MESH_POINT) { - sta_info->is_mesh_node = true; - /* Patch mesh interface for HT based on chip type. When authsae - * or wpa_supplicant is used for mesh security, HT capbility - * won't be set. This would be removed if problem is fixed. - */ - sta->ht_cap.ht_supported = true; - sta->ht_cap.cap = 0x6f; - sta->ht_cap.mcs.rx_mask[0] = 0xff; - sta->ht_cap.mcs.rx_mask[1] = 0xff; - sta->ht_cap.ampdu_factor = 0x3; - sta->ht_cap.ampdu_density = 0x5; - if (priv->chip_type == MWL8864) { - if (priv->antenna_rx == ANTENNA_RX_4_AUTO) - sta->ht_cap.mcs.rx_mask[2] = 0xff; - } - } - if (sta->ht_cap.ht_supported) { sta_info->is_ampdu_allowed = true; sta_info->is_amsdu_allowed = false; diff --git a/main.c b/main.c index 3e6446e..30b3691 100644 --- a/main.c +++ b/main.c @@ -135,9 +135,6 @@ static const struct ieee80211_rate mwl_rates_50[] = { static const struct ieee80211_iface_limit ap_if_limits[] = { { .max = SYSADPT_NUM_OF_AP, .types = BIT(NL80211_IFTYPE_AP) }, -#ifdef CONFIG_MAC80211_MESH - { .max = 1, .types = BIT(NL80211_IFTYPE_MESH_POINT) }, -#endif { .max = 1, .types = BIT(NL80211_IFTYPE_STATION) }, }; @@ -682,9 +679,6 @@ static int mwl_wl_init(struct mwl_priv *priv) hw->wiphy->interface_modes = 0; hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP); -#ifdef CONFIG_MAC80211_MESH - hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_MESH_POINT); -#endif hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_STATION); hw->wiphy->iface_combinations = &ap_if_comb; hw->wiphy->n_iface_combinations = 1; diff --git a/rx.c b/rx.c index 997c6ee..b555ced 100644 --- a/rx.c +++ b/rx.c @@ -336,78 +336,6 @@ static inline void mwl_rx_remove_dma_header(struct sk_buff *skb, __le16 qos) skb_pull(skb, sizeof(*tr) - hdrlen); } -#ifdef CONFIG_MAC80211_MESH -static inline bool mwl_rx_process_mesh_amsdu(struct mwl_priv *priv, - struct sk_buff *skb, - struct ieee80211_rx_status *status) -{ - struct ieee80211_hdr *wh; - struct mwl_sta *sta_info; - struct ieee80211_sta *sta; - u8 *qc; - int wh_len; - int len; - u8 pad; - u8 *data; - u16 frame_len; - struct sk_buff *newskb; - - wh = (struct ieee80211_hdr *)skb->data; - - spin_lock_bh(&priv->sta_lock); - list_for_each_entry(sta_info, &priv->sta_list, list) { - sta = container_of((char *)sta_info, struct ieee80211_sta, - drv_priv[0]); - if (ether_addr_equal(sta->addr, wh->addr2)) { - if (!sta_info->is_mesh_node) { - spin_unlock_bh(&priv->sta_lock); - return false; - } - } - } - spin_unlock_bh(&priv->sta_lock); - - qc = ieee80211_get_qos_ctl(wh); - *qc &= ~IEEE80211_QOS_CTL_A_MSDU_PRESENT; - - wh_len = ieee80211_hdrlen(wh->frame_control); - len = wh_len; - data = skb->data; - - while (len < skb->len) { - frame_len = *(u8 *)(data + len + ETH_HLEN - 1) | - (*(u8 *)(data + len + ETH_HLEN - 2) << 8); - - if ((len + ETH_HLEN + frame_len) > skb->len) - break; - - newskb = dev_alloc_skb(wh_len + frame_len); - if (!newskb) - break; - - ether_addr_copy(wh->addr3, data + len); - ether_addr_copy(wh->addr4, data + len + ETH_ALEN); - memcpy(newskb->data, wh, wh_len); - memcpy(newskb->data + wh_len, data + len + ETH_HLEN, frame_len); - skb_put(newskb, wh_len + frame_len); - - pad = ((ETH_HLEN + frame_len) % 4) ? - (4 - (ETH_HLEN + frame_len) % 4) : 0; - len += (ETH_HLEN + frame_len + pad); - if (len < skb->len) - status->flag |= RX_FLAG_AMSDU_MORE; - else - status->flag &= ~RX_FLAG_AMSDU_MORE; - memcpy(IEEE80211_SKB_RXCB(newskb), status, sizeof(*status)); - ieee80211_rx(priv->hw, newskb); - } - - dev_kfree_skb_any(skb); - - return true; -} -#endif - static int mwl_rx_refill(struct mwl_priv *priv, struct mwl_rx_hndl *rx_hndl) { struct mwl_desc_data *desc; @@ -601,18 +529,6 @@ void mwl_rx_recv(unsigned long data) } } -#ifdef CONFIG_MAC80211_MESH - if (ieee80211_is_data_qos(wh->frame_control) && - ieee80211_has_a4(wh->frame_control)) { - u8 *qc = ieee80211_get_qos_ctl(wh); - - if (*qc & IEEE80211_QOS_CTL_A_MSDU_PRESENT) - if (mwl_rx_process_mesh_amsdu(priv, prx_skb, - &status)) - goto out; - } -#endif - memcpy(IEEE80211_SKB_RXCB(prx_skb), &status, sizeof(status)); ieee80211_rx(hw, prx_skb); out: -- cgit v1.2.3 From af93c39bdce22b3bd1a12e6fb2a1097f9a448ecf Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 15:19:02 +0800 Subject: Removed code related to MFG. Signed-off-by: David Lin --- debugfs.c | 2 -- dev.h | 2 -- fwcmd.c | 27 +-------------------------- fwdl.c | 23 ++++------------------- main.c | 47 +++++++++-------------------------------------- 5 files changed, 14 insertions(+), 87 deletions(-) diff --git a/debugfs.c b/debugfs.c index 1be3532..ecb7fd4 100644 --- a/debugfs.c +++ b/debugfs.c @@ -122,8 +122,6 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf, "macid used: %08x\n", priv->macids_used); len += scnprintf(p + len, size - len, "qe trigger number: %d\n", priv->qe_trigger_num); - len += scnprintf(p + len, size - len, - "mfg mode: %s\n", priv->mfg_mode ? "true" : "false"); len += scnprintf(p + len, size - len, "\n"); ret = simple_read_from_buffer(ubuf, count, ppos, p, len); diff --git a/dev.h b/dev.h index 73a6089..8a58a6a 100644 --- a/dev.h +++ b/dev.h @@ -382,8 +382,6 @@ struct mwl_priv { u32 quiet_period; int temperature; - bool mfg_mode; - #ifdef CONFIG_DEBUG_FS struct dentry *debugfs_phy; u32 reg_type; diff --git a/fwcmd.c b/fwcmd.c index aff509a..241a43b 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -48,16 +48,6 @@ static bool mwl_fwcmd_chk_adapter(struct mwl_priv *priv) static void mwl_fwcmd_send_cmd(struct mwl_priv *priv) { - if (priv->mfg_mode) { - struct cmd_header *cmd_hdr = - (struct cmd_header *)&priv->pcmd_buf[2]; - u16 len = le16_to_cpu(cmd_hdr->len); - - writel(priv->pphys_cmd_buf, priv->iobase1 + 0xcd0); - writel(0x00, priv->iobase1 + 0xcd4); - writel(0x00, priv->iobase1 + MACREG_REG_INT_CODE); - writel(len + 4, priv->iobase1 + 0xc40); - } writel(priv->pphys_cmd_buf, priv->iobase1 + MACREG_REG_GEN_PTR); writel(MACREG_H2ARIC_BIT_DOOR_BELL, priv->iobase1 + MACREG_REG_H2A_INTERRUPT_EVENTS); @@ -129,10 +119,7 @@ static int mwl_fwcmd_wait_complete(struct mwl_priv *priv, unsigned short cmd) unsigned short int_code = 0; do { - if (priv->mfg_mode) - int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[2])); - else - int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0])); + int_code = le16_to_cpu(*((__le16 *)&priv->pcmd_buf[0])); mdelay(1); } while ((int_code != cmd) && (--curr_iteration)); @@ -847,9 +834,6 @@ int mwl_fwcmd_get_hw_specs(struct ieee80211_hw *hw) int retry; int i; - if (priv->mfg_mode) - return 0; - pcmd = (struct hostcmd_cmd_get_hw_spec *)&priv->pcmd_buf[0]; mutex_lock(&priv->fwcmd_mutex); @@ -903,9 +887,6 @@ int mwl_fwcmd_set_hw_specs(struct ieee80211_hw *hw) struct hostcmd_cmd_set_hw_spec *pcmd; int i; - if (priv->mfg_mode) - return 0; - pcmd = (struct hostcmd_cmd_set_hw_spec *)&priv->pcmd_buf[0]; mutex_lock(&priv->fwcmd_mutex); @@ -983,9 +964,6 @@ int mwl_fwcmd_set_radio_preamble(struct ieee80211_hw *hw, bool short_preamble) struct mwl_priv *priv = hw->priv; int rc; - if (priv->mfg_mode) - return 0; - priv->radio_short_preamble = short_preamble; rc = mwl_fwcmd_802_11_radio_control(priv, true, true); @@ -1246,9 +1224,6 @@ int mwl_fwcmd_rf_antenna(struct ieee80211_hw *hw, int dir, int antenna) struct mwl_priv *priv = hw->priv; struct hostcmd_cmd_802_11_rf_antenna *pcmd; - if (priv->mfg_mode) - return 0; - pcmd = (struct hostcmd_cmd_802_11_rf_antenna *)&priv->pcmd_buf[0]; mutex_lock(&priv->fwcmd_mutex); diff --git a/fwdl.c b/fwdl.c index e305031..4aad821 100644 --- a/fwdl.c +++ b/fwdl.c @@ -22,9 +22,6 @@ #include "sysadpt.h" #include "dev.h" #include "fwcmd.h" -#ifdef SUPPORT_MFG -#include "mfg.h" -#endif #include "fwdl.h" #define FW_DOWNLOAD_BLOCK_SIZE 256 @@ -60,12 +57,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) u32 size_fw_downloaded = 0; u32 int_code = 0; u32 len = 0; -#ifdef SUPPORT_MFG - u32 fwreadysignature = (priv->mfg_mode && priv->chip_type == MWL8897) ? - MFG_FW_READY_SIGNATURE : HOSTCMD_SOFTAP_FWRDY_SIGNATURE; -#else u32 fwreadysignature = HOSTCMD_SOFTAP_FWRDY_SIGNATURE; -#endif fw = priv->fw_ucode; @@ -162,19 +154,12 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) *((u32 *)&priv->pcmd_buf[1]) = 0; mwl_fwdl_trig_pcicmd(priv); curr_iteration = FW_MAX_NUM_CHECKS; - if (priv->mfg_mode && priv->chip_type == MWL8897) - writel(fwreadysignature, priv->iobase1 + 0xcf0); do { curr_iteration--; - if (priv->mfg_mode && priv->chip_type == MWL8897) { - mdelay(FW_CHECK_MSECS); - int_code = readl(priv->iobase1 + 0xc44); - } else { - writel(HOSTCMD_SOFTAP_MODE, - priv->iobase1 + MACREG_REG_GEN_PTR); - mdelay(FW_CHECK_MSECS); - int_code = readl(priv->iobase1 + MACREG_REG_INT_CODE); - } + writel(HOSTCMD_SOFTAP_MODE, + priv->iobase1 + MACREG_REG_GEN_PTR); + mdelay(FW_CHECK_MSECS); + int_code = readl(priv->iobase1 + MACREG_REG_INT_CODE); if (!(curr_iteration % 0xff) && (int_code != 0)) wiphy_err(hw->wiphy, "%x;", int_code); } while ((curr_iteration) && diff --git a/main.c b/main.c index 30b3691..5d8b421 100644 --- a/main.c +++ b/main.c @@ -31,9 +31,6 @@ #ifdef CONFIG_DEBUG_FS #include "debugfs.h" #endif -#ifdef SUPPORT_MFG -#include "mfg.h" -#endif #define MWL_DESC "Marvell 802.11ac Wireless Network Driver" #define MWL_DEV_NAME "Marvell 802.11ac Adapter" @@ -208,32 +205,21 @@ static int mwl_init_firmware(struct mwl_priv *priv, const char *fw_name) { int rc = 0; -#ifdef SUPPORT_MFG - if (priv->mfg_mode) - rc = mwl_mfg_request_firmware(priv); - else -#endif - rc = request_firmware((const struct firmware **)&priv->fw_ucode, - fw_name, priv->dev); + rc = request_firmware((const struct firmware **)&priv->fw_ucode, + fw_name, priv->dev); if (rc) { - if (priv->mfg_mode) - wiphy_err(priv->hw->wiphy, "cannot find firmware\n"); - else - wiphy_err(priv->hw->wiphy, - "%s: cannot find firmware image <%s>\n", + wiphy_err(priv->hw->wiphy, + "%s: cannot find firmware image <%s>\n", MWL_DRV_NAME, fw_name); goto err_load_fw; } rc = mwl_fwdl_download_firmware(priv->hw); if (rc) { - if (priv->mfg_mode) - wiphy_err(priv->hw->wiphy, "download firmware fail\n"); - else - wiphy_err(priv->hw->wiphy, - "%s: cannot download firmware image <%s>\n", - MWL_DRV_NAME, fw_name); + wiphy_err(priv->hw->wiphy, + "%s: cannot download firmware image <%s>\n", + MWL_DRV_NAME, fw_name); goto err_download_fw; } @@ -241,12 +227,7 @@ static int mwl_init_firmware(struct mwl_priv *priv, const char *fw_name) err_download_fw: -#ifdef SUPPORT_MFG - if (priv->mfg_mode) - mwl_mfg_release_firmware(priv); - else -#endif - release_firmware(priv->fw_ucode); + release_firmware(priv->fw_ucode); err_load_fw: @@ -813,11 +794,6 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) fw_name = mwl_chip_tbl[priv->chip_type].fw_image; -#ifdef SUPPORT_MFG - if (mfg_mode) - mwl_mfg_handler_init(priv); -#endif - rc = mwl_init_firmware(priv, fw_name); if (rc) { @@ -827,12 +803,7 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) } /* firmware is loaded to H/W, it can be released now */ -#ifdef SUPPORT_MFG - if (priv->mfg_mode) - mwl_mfg_release_firmware(priv); - else -#endif - release_firmware(priv->fw_ucode); + release_firmware(priv->fw_ucode); mwl_process_of_dts(priv); -- cgit v1.2.3 From 8759b558071b111a7404182cf95e9f8b0ba8cca6 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 16:19:09 +0800 Subject: Modified ampdu/amsdu related code. Let mwlwifi driver can work with lastest mac80211's APIs. Signed-off-by: David Lin --- mac80211.c | 12 ++++++++---- rx.c | 37 ------------------------------------- tx.c | 11 ----------- 3 files changed, 8 insertions(+), 52 deletions(-) diff --git a/mac80211.c b/mac80211.c index dc4fd99..ccf39c7 100644 --- a/mac80211.c +++ b/mac80211.c @@ -575,13 +575,15 @@ static int mwl_mac80211_get_survey(struct ieee80211_hw *hw, 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) { int rc = 0; struct mwl_priv *priv = hw->priv; struct mwl_ampdu_stream *stream; + enum ieee80211_ampdu_mlme_action action = params->action; + struct ieee80211_sta *sta = params->sta; + u16 tid = params->tid; + u8 buf_size = params->buf_size; u8 *addr = sta->addr, idx; struct mwl_sta *sta_info; @@ -621,7 +623,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, break; } stream->state = AMPDU_STREAM_IN_PROGRESS; - *ssn = 0; + params->ssn = 0; ieee80211_start_tx_ba_cb_irqsafe(vif, addr, tid); break; case IEEE80211_AMPDU_TX_STOP_CONT: @@ -634,6 +636,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, spin_unlock_bh(&priv->stream_lock); mwl_fwcmd_destroy_ba(hw, idx); spin_lock_bh(&priv->stream_lock); + sta_info->is_amsdu_allowed = false; } mwl_fwcmd_remove_stream(hw, stream); @@ -656,6 +659,7 @@ static int mwl_mac80211_ampdu_action(struct ieee80211_hw *hw, if (!rc) { stream->state = AMPDU_STREAM_ACTIVE; sta_info->check_ba_failed[tid] = 0; + sta_info->is_amsdu_allowed = params->amsdu; } else { idx = stream->idx; spin_unlock_bh(&priv->stream_lock); diff --git a/rx.c b/rx.c index b555ced..64b601d 100644 --- a/rx.c +++ b/rx.c @@ -280,24 +280,6 @@ static inline void mwl_rx_prepare_status(struct mwl_rx_desc *pdesc, } } -static inline void mwl_rx_enable_sta_amsdu(struct mwl_priv *priv, - u8 *sta_addr) -{ - struct mwl_sta *sta_info; - struct ieee80211_sta *sta; - - spin_lock_bh(&priv->sta_lock); - list_for_each_entry(sta_info, &priv->sta_list, list) { - sta = container_of((char *)sta_info, struct ieee80211_sta, - drv_priv[0]); - if (ether_addr_equal(sta->addr, sta_addr)) { - sta_info->is_amsdu_allowed = true; - break; - } - } - spin_unlock_bh(&priv->sta_lock); -} - static inline struct mwl_vif *mwl_rx_find_vif_bss(struct mwl_priv *priv, u8 *bssid) { @@ -510,25 +492,6 @@ void mwl_rx_recv(unsigned long data) skb_put(prx_skb, pkt_len); mwl_rx_remove_dma_header(prx_skb, curr_hndl->pdesc->qos_ctrl); - wh = (struct ieee80211_hdr *)prx_skb->data; - - if (ieee80211_is_mgmt(wh->frame_control)) { - struct ieee80211_mgmt *mgmt; - __le16 capab; - - mgmt = (struct ieee80211_mgmt *)prx_skb->data; - - if (unlikely(ieee80211_is_action(wh->frame_control) && - mgmt->u.action.category == - WLAN_CATEGORY_BACK && - mgmt->u.action.u.addba_resp.action_code == - WLAN_ACTION_ADDBA_RESP)) { - capab = mgmt->u.action.u.addba_resp.capab; - if (le16_to_cpu(capab) & 1) - mwl_rx_enable_sta_amsdu(priv, mgmt->sa); - } - } - memcpy(IEEE80211_SKB_RXCB(prx_skb), &status, sizeof(status)); ieee80211_rx(hw, prx_skb); out: diff --git a/tx.c b/tx.c index 70100ac..ee3d58a 100644 --- a/tx.c +++ b/tx.c @@ -823,17 +823,6 @@ void mwl_tx_xmit(struct ieee80211_hw *hw, capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab); tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2; index = mwl_tx_tid_queue_mapping(tid); - capab |= 1; - mgmt->u.action.u.addba_req.capab = cpu_to_le16(capab); - } - - if (unlikely(ieee80211_is_action(wh->frame_control) && - mgmt->u.action.category == WLAN_CATEGORY_BACK && - mgmt->u.action.u.addba_resp.action_code == - WLAN_ACTION_ADDBA_RESP)) { - capab = le16_to_cpu(mgmt->u.action.u.addba_resp.capab); - capab |= 1; - mgmt->u.action.u.addba_resp.capab = cpu_to_le16(capab); } } -- cgit v1.2.3 From 03046745b6695b1be935ee698e94e01a0be100f4 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 16:58:50 +0800 Subject: Fixed excessive delays. Signed-off-by: David Lin --- fwcmd.c | 4 ++-- fwdl.c | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/fwcmd.c b/fwcmd.c index 241a43b..c320a24 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -120,7 +120,7 @@ static int mwl_fwcmd_wait_complete(struct mwl_priv *priv, unsigned short cmd) do { 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) { @@ -130,7 +130,7 @@ static int mwl_fwcmd_wait_complete(struct mwl_priv *priv, unsigned short cmd) return -EIO; } - mdelay(3); + usleep_range(3000, 5000); return 0; } diff --git a/fwdl.c b/fwdl.c index 4aad821..f4d5fa1 100644 --- a/fwdl.c +++ b/fwdl.c @@ -66,7 +66,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) /* 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); @@ -87,7 +87,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) /* 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); @@ -117,6 +117,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) int_code = readl(priv->iobase1 + 0xc1c); if (int_code != 0) break; + cond_resched(); curr_iteration--; } while (curr_iteration); @@ -125,6 +126,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) if ((int_code & MACREG_H2ARIC_BIT_DOOR_BELL) != MACREG_H2ARIC_BIT_DOOR_BELL) break; + cond_resched(); curr_iteration--; } while (curr_iteration); @@ -158,7 +160,7 @@ int mwl_fwdl_download_firmware(struct ieee80211_hw *hw) curr_iteration--; 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)) wiphy_err(hw->wiphy, "%x;", int_code); -- cgit v1.2.3 From 4bb95ba1aeccce506a95499b49b9b844ecfae8a1 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 1 Jun 2016 17:00:39 +0800 Subject: Change driver version to 10.3.0.17-20160601. Signed-off-by: David Lin --- dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.h b/dev.h index 8a58a6a..1c61375 100644 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160531-1" +#define MWL_DRV_VERSION "10.3.0.17-20160601" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ -- cgit v1.2.3 From 3bec7c33742a16c4086e664f6dc7cd85fb364914 Mon Sep 17 00:00:00 2001 From: yuhhaurlin Date: Wed, 1 Jun 2016 17:22:17 +0800 Subject: Create README.md --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..d22abab --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# mwlwifi +mac80211 driver for the Marvell 88W8864 802.11ac chip + +How to build mwlwifi with OpenWrt: + +10.3.0.17-20160601 had been modified to be built with latest backports package "compat-wireless-2016-01-10" without patches. + +1. Modify package/kernel/mwlwifi/Makefile: + +PKG_VERSION:=10.3.0.17-20160601 +& +PKG_SOURCE_VERSION:=4bb95ba1aeccce506a95499b49b9b844ecfae8a1 + +2. Rename package/kernel/mwlwifi/patches to package/kernel/mwlwifi/patches.tmp + +3. make package/kernel/mwlwifi/clean + +4. make V=s (-jx) + -- cgit v1.2.3 From ca554376126c8665221babf7b7fb2d27872cd1db Mon Sep 17 00:00:00 2001 From: David Lin Date: Thu, 2 Jun 2016 09:23:03 +0800 Subject: Restored files Kconfig and Makefile.kernel. Signed-off-by: David Lin --- Kconfig | 23 +++++++++++++++++++++++ Makefile.kernel | 13 +++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 Kconfig create mode 100644 Makefile.kernel diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..a9bcb9c --- /dev/null +++ b/Kconfig @@ -0,0 +1,23 @@ +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.kernel b/Makefile.kernel new file mode 100644 index 0000000..37af74f --- /dev/null +++ b/Makefile.kernel @@ -0,0 +1,13 @@ +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__ -- cgit v1.2.3 From 3cbf5674587d6cdb9771e5d5e6114a098aae8708 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 3 Jun 2016 14:56:44 +0800 Subject: Added the code to support TDLS. Signed-off-by: David Lin --- mac80211.c | 2 ++ main.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mac80211.c b/mac80211.c index ccf39c7..cdf9f50 100644 --- a/mac80211.c +++ b/mac80211.c @@ -473,6 +473,8 @@ static int mwl_mac80211_sta_add(struct ieee80211_hw *hw, sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K; else sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_4K; + if ((sta->tdls) && (!sta->wme)) + sta->wme = true; } sta_info->iv16 = 1; sta_info->iv32 = 0; diff --git a/main.c b/main.c index 5d8b421..3543a43 100644 --- a/main.c +++ b/main.c @@ -551,6 +551,8 @@ static int mwl_wl_init(struct mwl_priv *priv) hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH; + hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; + hw->vif_data_size = sizeof(struct mwl_vif); hw->sta_data_size = sizeof(struct mwl_sta); -- cgit v1.2.3 From e6e1bb8ff2ec13481d3f97d834151b48c2486455 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 3 Jun 2016 15:17:30 +0800 Subject: Changed length of max vht mpdu from 7991 to 3895. Signed-off-by: David Lin --- main.c | 2 +- test/AP+STA.zip | Bin 4534 -> 0 bytes test/AP+STA/README.txt | 36 +++++++++++++++++++++++++++ test/AP+STA/hostapd.conf.1.open | 14 +++++++++++ test/AP+STA/hostapd.conf.1.wpa2pskaes | 18 ++++++++++++++ test/AP+STA/hostapd.conf.36.open | 17 +++++++++++++ test/AP+STA/hostapd.conf.36.open.40mhz | 17 +++++++++++++ test/AP+STA/hostapd.conf.36.open.80mhz | 19 ++++++++++++++ test/AP+STA/hostapd.conf.36.wpa2pskaes | 21 ++++++++++++++++ test/AP+STA/hostapd.conf.36.wpa2pskaes.40mhz | 22 ++++++++++++++++ test/AP+STA/hostapd.conf.36.wpa2pskaes.80mhz | 24 ++++++++++++++++++ test/AP+STA/wpa_supplicant.conf.open | 8 ++++++ test/AP+STA/wpa_supplicant.conf.psk | 9 +++++++ test/hostapd.conf.36.multi_bssid | 2 +- test/hostapd.conf.36.open | 2 +- test/hostapd.conf.36.open.80mhz | 2 +- test/hostapd.conf.36.wpa2pskaes | 2 +- test/hostapd.conf.36.wpa2pskaes.80mhz | 2 +- test/hostapd.conf.dfs | 2 +- 19 files changed, 212 insertions(+), 7 deletions(-) delete mode 100755 test/AP+STA.zip create mode 100644 test/AP+STA/README.txt create mode 100644 test/AP+STA/hostapd.conf.1.open create mode 100644 test/AP+STA/hostapd.conf.1.wpa2pskaes create mode 100644 test/AP+STA/hostapd.conf.36.open create mode 100644 test/AP+STA/hostapd.conf.36.open.40mhz create mode 100644 test/AP+STA/hostapd.conf.36.open.80mhz create mode 100644 test/AP+STA/hostapd.conf.36.wpa2pskaes create mode 100644 test/AP+STA/hostapd.conf.36.wpa2pskaes.40mhz create mode 100644 test/AP+STA/hostapd.conf.36.wpa2pskaes.80mhz create mode 100644 test/AP+STA/wpa_supplicant.conf.open create mode 100644 test/AP+STA/wpa_supplicant.conf.psk mode change 100755 => 100644 test/hostapd.conf.dfs diff --git a/main.c b/main.c index 3543a43..b117a4a 100644 --- a/main.c +++ b/main.c @@ -419,7 +419,7 @@ static void mwl_set_vht_caps(struct mwl_priv *priv, { band->vht_cap.vht_supported = 1; - band->vht_cap.cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991; + band->vht_cap.cap |= IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895; band->vht_cap.cap |= IEEE80211_VHT_CAP_RXLDPC; band->vht_cap.cap |= IEEE80211_VHT_CAP_SHORT_GI_80; band->vht_cap.cap |= IEEE80211_VHT_CAP_RXSTBC_1; diff --git a/test/AP+STA.zip b/test/AP+STA.zip deleted file mode 100755 index 8223745..0000000 Binary files a/test/AP+STA.zip and /dev/null differ diff --git a/test/AP+STA/README.txt b/test/AP+STA/README.txt new file mode 100644 index 0000000..6981b94 --- /dev/null +++ b/test/AP+STA/README.txt @@ -0,0 +1,36 @@ +<> + +1. Bring up driver: + + a. iw reg set US + --> set regulatory domain. + b. insmod mwlwifi.ko + --> After module is inserted, physical interfaces phy0 and phy1 and network + device wlan0 and wlan1 will be created. You can issue "iw dev" to check them. + +2. Use interface wlan0/wlan1 as client mode to connect to remote AP: + + wpa_supplicant -B -D nl80211 -i wlan0 -c wpa_supplicant.conf + wpa_supplicant -B -D nl80211 -i wlan1 -c wpa_supplicant.conf + +3. Create local AP: + + a. Create anther interface on phy0/phy1: + + iw phy0 interface add wlan0-1 type managed + iw phy1 interface add wlan1-1 type managed + + b. Use iw dev to check channel setting for client mode and modify related channel + setting of hostapd.conf to be complied with currecnt channel setting. + + c. Check MAC address of client interface and add "bssid=02:XX:XX:XX:XX:XX" to hostapd.conf. + + d. Create local AP: + + hostapd -B ./hostapd.conf + --> Channel setting of hostapd.conf should be complied with current channel setting. + Please make sure interface of hostapd.conf is complied with the interface you just created. + +4. Bridge local AP and STA: + + You need to use relayd to bridge them. Same as LAN and STA. diff --git a/test/AP+STA/hostapd.conf.1.open b/test/AP+STA/hostapd.conf.1.open new file mode 100644 index 0000000..7add81b --- /dev/null +++ b/test/AP+STA/hostapd.conf.1.open @@ -0,0 +1,14 @@ +interface=wlan0 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=g +channel=1 +auth_algs=1 +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] +ieee80211d=1 +country_code=US + diff --git a/test/AP+STA/hostapd.conf.1.wpa2pskaes b/test/AP+STA/hostapd.conf.1.wpa2pskaes new file mode 100644 index 0000000..8acb88a --- /dev/null +++ b/test/AP+STA/hostapd.conf.1.wpa2pskaes @@ -0,0 +1,18 @@ +interface=wlan0 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=g +channel=1 +auth_algs=1 +wpa=2 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=CCMP +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] +ieee80211d=1 +country_code=US + diff --git a/test/AP+STA/hostapd.conf.36.open b/test/AP+STA/hostapd.conf.36.open new file mode 100644 index 0000000..6e5e776 --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.open @@ -0,0 +1,17 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +ieee80211d=1 +country_code=US +ieee80211h=1 + diff --git a/test/AP+STA/hostapd.conf.36.open.40mhz b/test/AP+STA/hostapd.conf.36.open.40mhz new file mode 100644 index 0000000..a931774 --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.open.40mhz @@ -0,0 +1,17 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +ieee80211d=1 +country_code=US +ieee80211h=1 + diff --git a/test/AP+STA/hostapd.conf.36.open.80mhz b/test/AP+STA/hostapd.conf.36.open.80mhz new file mode 100644 index 0000000..ee7ab7f --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.open.80mhz @@ -0,0 +1,19 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_oper_chwidth=1 +vht_oper_centr_freq_seg0_idx=42 +ieee80211d=1 +country_code=US +ieee80211h=1 + diff --git a/test/AP+STA/hostapd.conf.36.wpa2pskaes b/test/AP+STA/hostapd.conf.36.wpa2pskaes new file mode 100644 index 0000000..b388f03 --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.wpa2pskaes @@ -0,0 +1,21 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wpa=2 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=CCMP +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +ieee80211d=1 +country_code=US +ieee80211h=1 + diff --git a/test/AP+STA/hostapd.conf.36.wpa2pskaes.40mhz b/test/AP+STA/hostapd.conf.36.wpa2pskaes.40mhz new file mode 100644 index 0000000..124eb0c --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.wpa2pskaes.40mhz @@ -0,0 +1,22 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wpa=2 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=CCMP +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +ieee80211d=1 +country_code=US +ieee80211h=1 + + diff --git a/test/AP+STA/hostapd.conf.36.wpa2pskaes.80mhz b/test/AP+STA/hostapd.conf.36.wpa2pskaes.80mhz new file mode 100644 index 0000000..5891e72 --- /dev/null +++ b/test/AP+STA/hostapd.conf.36.wpa2pskaes.80mhz @@ -0,0 +1,24 @@ +interface=wlan1 +driver=nl80211 +ctrl_interface=/var/run/hostapd +ssid=mwlwifi_ap_test +ignore_broadcast_ssid=0 +hw_mode=a +channel=36 +auth_algs=1 +wpa=2 +wpa_passphrase=12345678 +wpa_key_mgmt=WPA-PSK +wpa_pairwise=CCMP +wmm_enabled=1 +ieee80211n=1 +ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] +ieee80211ac=1 +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_oper_chwidth=1 +vht_oper_centr_freq_seg0_idx=42 +ieee80211d=1 +country_code=US +ieee80211h=1 + + diff --git a/test/AP+STA/wpa_supplicant.conf.open b/test/AP+STA/wpa_supplicant.conf.open new file mode 100644 index 0000000..d7677b9 --- /dev/null +++ b/test/AP+STA/wpa_supplicant.conf.open @@ -0,0 +1,8 @@ +ctrl_interface=/var/run/wpa_supplicant + +network={ + +ssid="mwlwifi_ap_test" +key_mgmt=NONE + +} diff --git a/test/AP+STA/wpa_supplicant.conf.psk b/test/AP+STA/wpa_supplicant.conf.psk new file mode 100644 index 0000000..ce154a6 --- /dev/null +++ b/test/AP+STA/wpa_supplicant.conf.psk @@ -0,0 +1,9 @@ +ctrl_interface=/var/run/wpa_supplicant + +network={ + +ssid="mwlwifi_ap_test" +key_mgmt=WPA-PSK +psk="12345678" + +} diff --git a/test/hostapd.conf.36.multi_bssid b/test/hostapd.conf.36.multi_bssid index 0e5492d..5ecebe9 100644 --- a/test/hostapd.conf.36.multi_bssid +++ b/test/hostapd.conf.36.multi_bssid @@ -10,7 +10,7 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] bss=wlan1_0 ssid=mwlwifi_ap_tset2 wpa=2 diff --git a/test/hostapd.conf.36.open b/test/hostapd.conf.36.open index 842a1cb..85fb4a0 100644 --- a/test/hostapd.conf.36.open +++ b/test/hostapd.conf.36.open @@ -10,5 +10,5 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] diff --git a/test/hostapd.conf.36.open.80mhz b/test/hostapd.conf.36.open.80mhz index 5d094f2..0a47a0f 100644 --- a/test/hostapd.conf.36.open.80mhz +++ b/test/hostapd.conf.36.open.80mhz @@ -10,7 +10,7 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=42 diff --git a/test/hostapd.conf.36.wpa2pskaes b/test/hostapd.conf.36.wpa2pskaes index cf60121..51b2837 100644 --- a/test/hostapd.conf.36.wpa2pskaes +++ b/test/hostapd.conf.36.wpa2pskaes @@ -14,5 +14,5 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] diff --git a/test/hostapd.conf.36.wpa2pskaes.80mhz b/test/hostapd.conf.36.wpa2pskaes.80mhz index 492fc17..0419b7d 100644 --- a/test/hostapd.conf.36.wpa2pskaes.80mhz +++ b/test/hostapd.conf.36.wpa2pskaes.80mhz @@ -14,7 +14,7 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=42 diff --git a/test/hostapd.conf.dfs b/test/hostapd.conf.dfs old mode 100755 new mode 100644 index dc81e47..c770b8d --- a/test/hostapd.conf.dfs +++ b/test/hostapd.conf.dfs @@ -10,7 +10,7 @@ wmm_enabled=1 ieee80211n=1 ht_capab=[LDPC][HT40+][SHORT-GI-20][SHORT-GI-40] ieee80211ac=1 -vht_capab=[MAX-MPDU-7991][RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] +vht_capab=[RXLDPC][SHORT-GI-80][RX-STBC-1][SU-BEAMFORMER][SU-BEAMFORMEE][MAX-A-MPDU-LEN-EXP7][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN] vht_oper_chwidth=1 vht_oper_centr_freq_seg0_idx=106 ieee80211d=1 -- cgit v1.2.3 From eeb3c19c6c921d190006c32192d6d8299bbb8cac Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 3 Jun 2016 15:19:22 +0800 Subject: Change driver version to 10.3.0.17-20160603. Signed-off-by: David Lin --- dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 dev.h diff --git a/dev.h b/dev.h old mode 100644 new mode 100755 index 1c61375..70103b1 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160601" +#define MWL_DRV_VERSION "10.3.0.17-20160603" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ -- cgit v1.2.3 From 5fb830e6f9064a278db1bb7efa0cfbce37cfda6c Mon Sep 17 00:00:00 2001 From: yuhhaurlin Date: Fri, 3 Jun 2016 16:33:31 +0800 Subject: Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d22abab..04293a1 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mwlwifi mac80211 driver for the Marvell 88W8864 802.11ac chip -How to build mwlwifi with OpenWrt: +<> 10.3.0.17-20160601 had been modified to be built with latest backports package "compat-wireless-2016-01-10" without patches. @@ -17,3 +17,6 @@ PKG_SOURCE_VERSION:=4bb95ba1aeccce506a95499b49b9b844ecfae8a1 4. make V=s (-jx) +<> + +For driver 10.3.0.17-20160603, [MAX-MPDU-7991] should be removed from vht_capab command of hostapd. -- cgit v1.2.3 From 1500b6395214dffd09f931154ea18529be14a5db Mon Sep 17 00:00:00 2001 From: yuhhaurlin Date: Fri, 3 Jun 2016 16:34:46 +0800 Subject: Update README.md --- README.md | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 04293a1..32e249e 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,20 @@ # mwlwifi mac80211 driver for the Marvell 88W8864 802.11ac chip -<> +1. How to build mwlwifi with OpenWrt: 10.3.0.17-20160601 had been modified to be built with latest backports package "compat-wireless-2016-01-10" without patches. -1. Modify package/kernel/mwlwifi/Makefile: +a. Modify package/kernel/mwlwifi/Makefile: PKG_VERSION:=10.3.0.17-20160601 & PKG_SOURCE_VERSION:=4bb95ba1aeccce506a95499b49b9b844ecfae8a1 -2. Rename package/kernel/mwlwifi/patches to package/kernel/mwlwifi/patches.tmp +b. Rename package/kernel/mwlwifi/patches to package/kernel/mwlwifi/patches.tmp -3. make package/kernel/mwlwifi/clean +c. make package/kernel/mwlwifi/clean -4. make V=s (-jx) +d. make V=s (-jx) -<> - -For driver 10.3.0.17-20160603, [MAX-MPDU-7991] should be removed from vht_capab command of hostapd. +2. For driver 10.3.0.17-20160603, [MAX-MPDU-7991] should be removed from vht_capab command of hostapd. -- cgit v1.2.3 From 39cf37cf5f8940dd1796c0a10b06e88748553263 Mon Sep 17 00:00:00 2001 From: yuhhaurlin Date: Fri, 3 Jun 2016 16:36:41 +0800 Subject: Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 32e249e..5f8896f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # mwlwifi mac80211 driver for the Marvell 88W8864 802.11ac chip -1. How to build mwlwifi with OpenWrt: +* How to build mwlwifi with OpenWrt: 10.3.0.17-20160601 had been modified to be built with latest backports package "compat-wireless-2016-01-10" without patches. @@ -17,4 +17,4 @@ c. make package/kernel/mwlwifi/clean d. make V=s (-jx) -2. For driver 10.3.0.17-20160603, [MAX-MPDU-7991] should be removed from vht_capab command of hostapd. +* For driver 10.3.0.17-20160603, [MAX-MPDU-7991] should be removed from vht_capab command of hostapd. -- cgit v1.2.3 From 863519122677e6e6406eee5fbde14183f35ad938 Mon Sep 17 00:00:00 2001 From: David Lin Date: Sat, 4 Jun 2016 07:21:20 +0800 Subject: Updated WSC IE to probe response. Signed-off-by: David Lin --- fwcmd.c | 8 ++++++++ hostcmd.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/fwcmd.c b/fwcmd.c index c320a24..a48521e 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -2572,6 +2572,14 @@ int mwl_fwcmd_set_wsc_ie(struct ieee80211_hw *hw, u8 len, u8 *data) return -EIO; } + pcmd->ie_type = WSC_IE_SET_PROBE_RESPONSE; + + if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_WSC_IE)) { + mutex_unlock(&priv->fwcmd_mutex); + wiphy_err(hw->wiphy, "failed execution\n"); + return -EIO; + } + mutex_unlock(&priv->fwcmd_mutex); return 0; diff --git a/hostcmd.h b/hostcmd.h index 63199f6..c209114 100644 --- a/hostcmd.h +++ b/hostcmd.h @@ -129,6 +129,8 @@ /* Misc */ #define WSC_IE_MAX_LENGTH 251 +#define WSC_IE_SET_BEACON 0 +#define WSC_IE_SET_PROBE_RESPONSE 1 enum { WL_DISABLE = 0, -- cgit v1.2.3 From 9a6ba88960063e1026d938da277b7cb0422f2d0c Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 6 Jun 2016 14:21:29 +0800 Subject: Changed IEEE80211_BAND_XXXX to NL80211_BAND_XXXX Signed-off-by: David Lin --- fwcmd.c | 26 +++++++++---------- mac80211.c | 6 ++--- main.c | 84 +++++++++++++++++++++++++++++++------------------------------- rx.c | 4 +-- 4 files changed, 60 insertions(+), 60 deletions(-) diff --git a/fwcmd.c b/fwcmd.c index a48521e..27e7b69 100644 --- a/fwcmd.c +++ b/fwcmd.c @@ -697,9 +697,9 @@ static int mwl_fwcmd_set_country_code(struct mwl_priv *priv, 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; @@ -1033,9 +1033,9 @@ int mwl_fwcmd_max_tx_power(struct ieee80211_hw *hw, 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) { @@ -1119,9 +1119,9 @@ int mwl_fwcmd_tx_power(struct ieee80211_hw *hw, 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) { @@ -1309,9 +1309,9 @@ int mwl_fwcmd_set_rf_channel(struct ieee80211_hw *hw, 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); @@ -1881,10 +1881,10 @@ int mwl_fwcmd_set_new_stn_add(struct ieee80211_hw *hw, } 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) { @@ -2040,9 +2040,9 @@ int mwl_fwcmd_set_switch_channel(struct mwl_priv *priv, 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; diff --git a/mac80211.c b/mac80211.c index cdf9f50..a600eda 100644 --- a/mac80211.c +++ b/mac80211.c @@ -254,12 +254,12 @@ static int mwl_mac80211_config(struct ieee80211_hw *hw, 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); @@ -327,7 +327,7 @@ static void mwl_mac80211_bss_info_changed_ap(struct ieee80211_hw *hw, 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; diff --git a/main.c b/main.c index b117a4a..0ec857d 100644 --- a/main.c +++ b/main.c @@ -60,20 +60,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[] = { @@ -93,30 +93,30 @@ static const struct ieee80211_rate mwl_rates_24[] = { }; 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[] = { @@ -456,7 +456,7 @@ static void mwl_set_caps(struct mwl_priv *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; @@ -465,7 +465,7 @@ static void mwl_set_caps(struct mwl_priv *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 */ @@ -478,7 +478,7 @@ static void mwl_set_caps(struct mwl_priv *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; @@ -487,7 +487,7 @@ static void mwl_set_caps(struct mwl_priv *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; } } diff --git a/rx.c b/rx.c index 64b601d..1b8b385 100644 --- a/rx.c +++ b/rx.c @@ -243,7 +243,7 @@ static inline void mwl_rx_prepare_status(struct mwl_rx_desc *pdesc, 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(struct mwl_rx_desc *pdesc, 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) -- cgit v1.2.3 From 193594f055103b96f357458ada6b768185ef9e47 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 6 Jun 2016 17:29:10 +0800 Subject: Fixed endian problme for WSC IE type. Signed-off-by: David Lin --- fwcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 fwcmd.c diff --git a/fwcmd.c b/fwcmd.c old mode 100644 new mode 100755 index 27e7b69..524ddfa --- a/fwcmd.c +++ b/fwcmd.c @@ -2572,7 +2572,7 @@ int mwl_fwcmd_set_wsc_ie(struct ieee80211_hw *hw, u8 len, u8 *data) return -EIO; } - pcmd->ie_type = WSC_IE_SET_PROBE_RESPONSE; + pcmd->ie_type = cpu_to_le16(WSC_IE_SET_PROBE_RESPONSE); if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_SET_WSC_IE)) { mutex_unlock(&priv->fwcmd_mutex); -- cgit v1.2.3 From af294d17374f2acff09b0b8fc64668288b6e1dd4 Mon Sep 17 00:00:00 2001 From: David Lin Date: Mon, 6 Jun 2016 17:57:36 +0800 Subject: Modified the code to pass chackpatch.pl. Signed-off-by: David Lin --- debugfs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/debugfs.c b/debugfs.c index ecb7fd4..71ee4e0 100644 --- a/debugfs.c +++ b/debugfs.c @@ -255,7 +255,8 @@ static ssize_t mwl_debugfs_sta_read(struct file *file, char __user *ubuf, } len += scnprintf(p + len, size - len, "rx_bw: %d, rx_nss: %d\n", sta->bandwidth, sta->rx_nss); - len += scnprintf(p + len, size - len, "tdls: %d, tdls_init: %d\n", + len += scnprintf(p + len, size - len, + "tdls: %d, tdls_init: %d\n", sta->tdls, sta->tdls_initiator); len += scnprintf(p + len, size - len, "wme: %d, mfp: %d\n", sta->wme, sta->mfp); @@ -382,9 +383,7 @@ static ssize_t mwl_debugfs_tx_desc_write(struct file *file, goto err; } - ret = sscanf(buf, "%d", &tx_desc_num); - - if (ret != 1) { + if (kstrtoint(buf, 0, &tx_desc_num)) { ret = -EINVAL; goto err; } -- cgit v1.2.3 From ade5aac7bf9ce8e51a3f3a93f9c6c9efd5f8c247 Mon Sep 17 00:00:00 2001 From: David Lin Date: Tue, 7 Jun 2016 11:18:18 +0800 Subject: Removed code related to BG4CT_A0_WORKAROUND. Signed-off-by: David Lin --- isr.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/isr.c b/isr.c index d75feeb..881cea8 100644 --- a/isr.c +++ b/isr.c @@ -21,24 +21,15 @@ #include "isr.h" #define INVALID_WATCHDOG 0xAA -#ifdef BG4CT_A0_WORKAROUND -#define MAX_ISR_ITERATION 2 -#endif irqreturn_t mwl_isr(int irq, void *dev_id) { struct ieee80211_hw *hw = dev_id; struct mwl_priv *priv = hw->priv; void __iomem *int_status_mask; -#ifdef BG4CT_A0_WORKAROUND - unsigned int currIteration = 0; -#endif u32 int_status; u32 status; -#ifdef BG4CT_A0_WORKAROUND - do { -#endif int_status_mask = priv->iobase1 + MACREG_REG_A2H_INTERRUPT_STATUS_MASK; int_status = readl(priv->iobase1 + MACREG_REG_A2H_INTERRUPT_CAUSE); @@ -98,11 +89,7 @@ irqreturn_t mwl_isr(int irq, void *dev_id) if (int_status & MACREG_A2HRIC_BA_WATCHDOG) ieee80211_queue_work(hw, &priv->watchdog_ba_handle); - } -#ifdef BG4CT_A0_WORKAROUND - } while (currIteration++ < MAX_ISR_ITERATION); -#endif return IRQ_HANDLED; } -- cgit v1.2.3 From b9541ea520a9e828213150a575517e44c6eeb7ef Mon Sep 17 00:00:00 2001 From: David Lin Date: Tue, 7 Jun 2016 14:07:18 +0800 Subject: Upgraded firmware of 88W8897 to 8.2.0.12. Signed-off-by: David Lin --- bin/firmware/88W8897.bin | Bin 142024 -> 489932 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/firmware/88W8897.bin b/bin/firmware/88W8897.bin index 021a9ee..a3b10c5 100755 Binary files a/bin/firmware/88W8897.bin and b/bin/firmware/88W8897.bin differ -- cgit v1.2.3 From 2a4f8bab4fe4a801affede8178e8fbc578d14f45 Mon Sep 17 00:00:00 2001 From: David Lin Date: Tue, 7 Jun 2016 14:09:38 +0800 Subject: Change driver version to 10.3.0.17-20160607. Signed-off-by: David Lin --- dev.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 dev.h diff --git a/dev.h b/dev.h old mode 100755 new mode 100644 index 70103b1..2a9ba5b --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160603" +#define MWL_DRV_VERSION "10.3.0.17-20160607" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ @@ -363,7 +363,7 @@ struct mwl_priv { /* ampdu stream information */ /* for ampdu stream */ struct { - spinlock_t stream_lock; + spinlock_t stream_lock; /* for BA stream */ struct mwl_ampdu_stream ampdu[SYSADPT_TX_AMPDU_QUEUES]; } ____cacheline_aligned_in_smp; struct work_struct watchdog_ba_handle; @@ -461,7 +461,7 @@ struct mwl_sta { bool is_amsdu_allowed; /* for amsdu aggregation */ struct { - spinlock_t amsdu_lock; + spinlock_t amsdu_lock; /* for amsdu */ struct mwl_amsdu_ctrl amsdu_ctrl; } ____cacheline_aligned_in_smp; u16 iv16; -- cgit v1.2.3 From 9f5dfbe69759f85da757ffd6508f5bee6cfa5ec7 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 8 Jun 2016 15:02:12 +0800 Subject: Advertised capability of AMSDU. Signed-off-by: David Lin --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 0ec857d..71701a2 100644 --- a/main.c +++ b/main.c @@ -402,6 +402,7 @@ static void mwl_set_ht_caps(struct mwl_priv *priv, band->ht_cap.cap |= IEEE80211_HT_CAP_SGI_40; ieee80211_hw_set(hw, AMPDU_AGGREGATION); + ieee80211_hw_set(hw, SUPPORTS_AMSDU_IN_AMPDU); band->ht_cap.ampdu_factor = IEEE80211_HT_MAX_AMPDU_64K; band->ht_cap.ampdu_density = IEEE80211_HT_MPDU_DENSITY_4; -- cgit v1.2.3 From 5e42bf288e05bfa4c579b98c41b01b1332633e3c Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 8 Jun 2016 15:04:01 +0800 Subject: Change driver version to 10.3.0.17-20160608. Signed-off-by: David Lin --- dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.h b/dev.h index 2a9ba5b..9b35266 100644 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160607" +#define MWL_DRV_VERSION "10.3.0.17-20160608" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ -- cgit v1.2.3 From b174c12ad1fb5ac75d4680190f2f9fa448facacc Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 17 Jun 2016 15:59:57 +0800 Subject: Set tid of received EAPOL packets to 7. Signed-off-by: David Lin --- rx.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/rx.c b/rx.c index 1b8b385..0c9a291 100644 --- a/rx.c +++ b/rx.c @@ -492,6 +492,20 @@ void mwl_rx_recv(unsigned long data) skb_put(prx_skb, pkt_len); mwl_rx_remove_dma_header(prx_skb, curr_hndl->pdesc->qos_ctrl); + wh = (struct ieee80211_hdr *)prx_skb->data; + + if (ieee80211_is_data_qos(wh->frame_control)) { + const u8 eapol[] = {0x88, 0x8e}; + u8 *qc = ieee80211_get_qos_ctl(wh); + u8 *data; + + data = prx_skb->data + + ieee80211_hdrlen(wh->frame_control) + 6; + + if (!memcmp(data, eapol, sizeof(eapol))) + *qc |= 7; + } + memcpy(IEEE80211_SKB_RXCB(prx_skb), &status, sizeof(status)); ieee80211_rx(hw, prx_skb); out: -- cgit v1.2.3 From 24574060b4eca31c9e0931df7b1e2b578accfab1 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 17 Jun 2016 16:25:10 +0800 Subject: Used multicast rate to send out EAPOL packets. Signed-off-by: David Lin --- tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx.c b/tx.c index ee3d58a..a7bffe7 100644 --- a/tx.c +++ b/tx.c @@ -798,7 +798,7 @@ void mwl_tx_xmit(struct ieee80211_hw *hw, qos |= MWL_QOS_ACK_POLICY_NORMAL; } - if (is_multicast_ether_addr(wh->addr1)) + if (is_multicast_ether_addr(wh->addr1) || eapol_frame) xmitcontrol |= EAGLE_TXD_XMITCTRL_USE_MC_RATE; } -- cgit v1.2.3 From b7aff3c2839b048407d716d1cb9326122ee401f8 Mon Sep 17 00:00:00 2001 From: David Lin Date: Fri, 17 Jun 2016 16:34:17 +0800 Subject: Change driver version to 10.3.0.17-20160617. Signed-off-by: David Lin --- dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.h b/dev.h index 9b35266..2c2f3ab 100644 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160608" +#define MWL_DRV_VERSION "10.3.0.17-20160617" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ -- cgit v1.2.3 From b7dfe8abebf111745de6de666a2c57a2e174dd6a Mon Sep 17 00:00:00 2001 From: David Lin Date: Thu, 4 Aug 2016 13:48:12 +0800 Subject: Upgrade 88W8864 firmware to 7.2.9.26. Added support for the Linksys WRT1200ACv2 and WRT1900ACSv2 Signed-off-by: David Lin --- bin/firmware/88W8864.bin | Bin 117828 -> 118776 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/bin/firmware/88W8864.bin b/bin/firmware/88W8864.bin index 21bd0c0..e6d12b9 100755 Binary files a/bin/firmware/88W8864.bin and b/bin/firmware/88W8864.bin differ -- cgit v1.2.3 From 5857f88d0a5ed792eccf7af593b41620cf3c8035 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 10 Aug 2016 09:13:06 +0800 Subject: Added support for the 7.2.9.26 firmware API. Signed-off-by: David Lin --- debugfs.c | 50 +++++++++++++++++++++++++++++++++ dev.h | 16 ++++++++++- fwcmd.c | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- fwcmd.h | 9 ++++++ hostcmd.h | 30 ++++++++++++++++++++ main.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++-- 6 files changed, 265 insertions(+), 6 deletions(-) mode change 100755 => 100644 fwcmd.c diff --git a/debugfs.c b/debugfs.c index 71ee4e0..1ded461 100644 --- a/debugfs.c +++ b/debugfs.c @@ -98,6 +98,11 @@ static ssize_t mwl_debugfs_info_read(struct file *file, char __user *ubuf, "driver version: %s\n", MWL_DRV_VERSION); len += scnprintf(p + len, size - len, "firmware version: 0x%08x\n", priv->hw_data.fw_release_num); + len += scnprintf(p + len, size - len, + "power table loaded from dts: %s\n", + priv->forbidden_setting ? "no" : "yes"); + len += scnprintf(p + len, size - len, "firmware region code: 0x%x\n", + priv->fw_region_code); len += scnprintf(p + len, size - len, "mac address: %pM\n", priv->hw_data.mac_addr); len += scnprintf(p + len, size - len, @@ -328,6 +333,49 @@ static ssize_t mwl_debugfs_ampdu_read(struct file *file, char __user *ubuf, return ret; } +static ssize_t mwl_debugfs_device_pwrtbl_read(struct file *file, + char __user *ubuf, + size_t count, loff_t *ppos) +{ + struct mwl_priv *priv = (struct mwl_priv *)file->private_data; + unsigned long page = get_zeroed_page(GFP_KERNEL); + char *p = (char *)page; + int len = 0, size = PAGE_SIZE; + int i, j; + ssize_t ret; + + if (!p) + return -ENOMEM; + + len += scnprintf(p + len, size - len, "\n"); + len += scnprintf(p + len, size - len, + "power table loaded from dts: %s\n", + priv->forbidden_setting ? "no" : "yes"); + len += scnprintf(p + len, size - len, "firmware region code: 0x%x\n", + priv->fw_region_code); + len += scnprintf(p + len, size - len, "number of channel: %d\n", + priv->number_of_channels); + for (i = 0; i < priv->number_of_channels; i++) { + len += scnprintf(p + len, size - len, "%3d ", + priv->device_pwr_tbl[i].channel); + for (j = 0; j < SYSADPT_TX_POWER_LEVEL_TOTAL; j++) + len += scnprintf(p + len, size - len, "%3d ", + priv->device_pwr_tbl[i].tx_pwr[j]); + len += scnprintf(p + len, size - len, "%3d ", + priv->device_pwr_tbl[i].dfs_capable); + len += scnprintf(p + len, size - len, "%3d ", + priv->device_pwr_tbl[i].ax_ant); + len += scnprintf(p + len, size - len, "%3d\n", + priv->device_pwr_tbl[i].cdd); + } + len += scnprintf(p + len, size - len, "\n"); + + ret = simple_read_from_buffer(ubuf, count, ppos, p, len); + free_page(page); + + return ret; +} + static ssize_t mwl_debugfs_tx_desc_read(struct file *file, char __user *ubuf, size_t count, loff_t *ppos) @@ -746,6 +794,7 @@ MWLWIFI_DEBUGFS_FILE_READ_OPS(info); MWLWIFI_DEBUGFS_FILE_READ_OPS(vif); MWLWIFI_DEBUGFS_FILE_READ_OPS(sta); MWLWIFI_DEBUGFS_FILE_READ_OPS(ampdu); +MWLWIFI_DEBUGFS_FILE_READ_OPS(device_pwrtbl); MWLWIFI_DEBUGFS_FILE_OPS(tx_desc); MWLWIFI_DEBUGFS_FILE_OPS(dfs_channel); MWLWIFI_DEBUGFS_FILE_OPS(dfs_radar); @@ -767,6 +816,7 @@ void mwl_debugfs_init(struct ieee80211_hw *hw) MWLWIFI_DEBUGFS_ADD_FILE(vif); MWLWIFI_DEBUGFS_ADD_FILE(sta); MWLWIFI_DEBUGFS_ADD_FILE(ampdu); + MWLWIFI_DEBUGFS_ADD_FILE(device_pwrtbl); MWLWIFI_DEBUGFS_ADD_FILE(tx_desc); MWLWIFI_DEBUGFS_ADD_FILE(dfs_channel); MWLWIFI_DEBUGFS_ADD_FILE(dfs_radar); diff --git a/dev.h b/dev.h index 2c2f3ab..4c32297 100644 --- a/dev.h +++ b/dev.h @@ -147,6 +147,14 @@ struct mwl_chip_info { int antenna_rx; }; +struct mwl_device_pwr_tbl { + u8 channel; + u8 tx_pwr[SYSADPT_TX_POWER_LEVEL_TOTAL]; + u8 dfs_capable; + u8 ax_ant; + u8 cdd; +}; + struct mwl_tx_pwr_tbl { u8 channel; u8 setcap; @@ -278,6 +286,13 @@ struct mwl_ampdu_stream { struct mwl_priv { struct ieee80211_hw *hw; struct firmware *fw_ucode; + bool fw_device_pwrtbl; + bool forbidden_setting; + bool regulatory_set; + u32 fw_region_code; + char fw_alpha2[2]; + u8 number_of_channels; + struct mwl_device_pwr_tbl device_pwr_tbl[SYSADPT_MAX_NUM_CHANNELS]; int chip_type; struct device_node *dt_node; @@ -293,7 +308,6 @@ struct mwl_priv { u8 powinited; u16 max_tx_pow[SYSADPT_TX_POWER_LEVEL_TOTAL]; /* max tx power (dBm) */ u16 target_powers[SYSADPT_TX_POWER_LEVEL_TOTAL]; /* target powers */ - u8 cal_tbl[200]; struct pci_dev *pdev; struct device *dev; diff --git a/fwcmd.c b/fwcmd.c old mode 100755 new mode 100644 index 524ddfa..9c3ccf9 --- a/fwcmd.c +++ b/fwcmd.c @@ -101,6 +101,8 @@ static char *mwl_fwcmd_get_cmd_string(unsigned short cmd) { HOSTCMD_CMD_FW_FLUSH_TIMER, "FwFlushTimer" }, { HOSTCMD_CMD_SET_CDD, "SetCDD" }, { HOSTCMD_CMD_GET_TEMP, "GetTemp" }, + { HOSTCMD_CMD_GET_FW_REGION_CODE, "GetFwRegionCode" }, + { HOSTCMD_CMD_GET_DEVICE_PWR_TBL, "GetDevicePwrTbl" }, { HOSTCMD_CMD_QUIET_MODE, "QuietMode" }, }; @@ -1012,7 +1014,10 @@ int mwl_fwcmd_max_tx_power(struct ieee80211_hw *hw, u16 band = 0, width = 0, sub_ch = 0; u16 maxtxpow[SYSADPT_TX_POWER_LEVEL_TOTAL]; int i, tmp; - int rc; + int rc = 0; + + if (priv->forbidden_setting) + return rc; switch (fraction) { case 0: @@ -1098,7 +1103,10 @@ int mwl_fwcmd_tx_power(struct ieee80211_hw *hw, u16 txpow[SYSADPT_TX_POWER_LEVEL_TOTAL]; int index, found = 0; int i, tmp; - int rc; + int rc = 0; + + if (priv->forbidden_setting) + return rc; switch (fraction) { case 0: @@ -1353,6 +1361,11 @@ int mwl_fwcmd_set_rf_channel(struct ieee80211_hw *hw, return -EIO; } + if (pcmd->cmd_hdr.result != 0) { + mutex_unlock(&priv->fwcmd_mutex); + return -EINVAL; + } + mutex_unlock(&priv->fwcmd_mutex); return 0; @@ -2686,6 +2699,83 @@ int mwl_fwcmd_get_temp(struct ieee80211_hw *hw, u32 *temp) return 0; } +int mwl_fwcmd_get_fw_region_code(struct ieee80211_hw *hw, + u32 *fw_region_code) +{ + struct mwl_priv *priv = hw->priv; + struct hostcmd_cmd_get_fw_region_code *pcmd; + int status; + + pcmd = (struct hostcmd_cmd_get_fw_region_code *)&priv->pcmd_buf[0]; + + mutex_lock(&priv->fwcmd_mutex); + + memset(pcmd, 0x00, sizeof(*pcmd)); + pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_GET_FW_REGION_CODE); + pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd)); + + if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_GET_FW_REGION_CODE)) { + mutex_unlock(&priv->fwcmd_mutex); + wiphy_err(hw->wiphy, "failed execution\n"); + return -EIO; + } + + if (pcmd->cmd_hdr.result != 0) { + mutex_unlock(&priv->fwcmd_mutex); + return -EINVAL; + } + + status = le32_to_cpu(pcmd->status); + + if (!status) + *fw_region_code = le32_to_cpu(pcmd->fw_region_code); + + mutex_unlock(&priv->fwcmd_mutex); + + return 0; +} + +int mwl_fwcmd_get_device_pwr_tbl(struct ieee80211_hw *hw, + struct mwl_device_pwr_tbl *device_ch_pwrtbl, + u8 *region_code, + u8 *number_of_channels, + u32 channel_index) +{ + struct mwl_priv *priv = hw->priv; + struct hostcmd_cmd_get_device_pwr_tbl *pcmd; + int status; + + pcmd = (struct hostcmd_cmd_get_device_pwr_tbl *)&priv->pcmd_buf[0]; + + mutex_lock(&priv->fwcmd_mutex); + + memset(pcmd, 0x00, sizeof(*pcmd)); + pcmd->cmd_hdr.cmd = cpu_to_le16(HOSTCMD_CMD_GET_DEVICE_PWR_TBL); + pcmd->cmd_hdr.len = cpu_to_le16(sizeof(*pcmd)); + pcmd->status = cpu_to_le16(HOSTCMD_CMD_GET_DEVICE_PWR_TBL); + pcmd->current_channel_index = cpu_to_le32(channel_index); + + if (mwl_fwcmd_exec_cmd(priv, HOSTCMD_CMD_GET_DEVICE_PWR_TBL)) { + mutex_unlock(&priv->fwcmd_mutex); + wiphy_err(hw->wiphy, "failed execution\n"); + return -EIO; + } + + device_ch_pwrtbl->channel = pcmd->channel_pwr_tbl.channel; + memcpy(device_ch_pwrtbl->tx_pwr, pcmd->channel_pwr_tbl.tx_pwr, + SYSADPT_TX_POWER_LEVEL_TOTAL); + device_ch_pwrtbl->dfs_capable = pcmd->channel_pwr_tbl.dfs_capable; + device_ch_pwrtbl->ax_ant = pcmd->channel_pwr_tbl.ax_ant; + device_ch_pwrtbl->cdd = pcmd->channel_pwr_tbl.cdd; + *region_code = pcmd->region_code; + *number_of_channels = pcmd->number_of_channels; + status = le16_to_cpu(pcmd->status); + + mutex_unlock(&priv->fwcmd_mutex); + + return status; +} + int mwl_fwcmd_quiet_mode(struct ieee80211_hw *hw, bool enable, u32 period, u32 duration, u32 next_offset) { diff --git a/fwcmd.h b/fwcmd.h index fdb9fe8..74a21d3 100644 --- a/fwcmd.h +++ b/fwcmd.h @@ -206,6 +206,15 @@ int mwl_fwcmd_set_cdd(struct ieee80211_hw *hw); int mwl_fwcmd_get_temp(struct ieee80211_hw *hw, u32 *temp); +int mwl_fwcmd_get_fw_region_code(struct ieee80211_hw *hw, + u32 *fw_region_code); + +int mwl_fwcmd_get_device_pwr_tbl(struct ieee80211_hw *hw, + struct mwl_device_pwr_tbl *device_ch_pwrtbl, + u8 *region_code, + u8 *number_of_channels, + u32 channel_index); + int mwl_fwcmd_quiet_mode(struct ieee80211_hw *hw, bool enable, u32 period, u32 duration, u32 next_offset); diff --git a/hostcmd.h b/hostcmd.h index c209114..b163a94 100644 --- a/hostcmd.h +++ b/hostcmd.h @@ -60,6 +60,8 @@ #define HOSTCMD_CMD_FW_FLUSH_TIMER 0x1148 #define HOSTCMD_CMD_SET_CDD 0x1150 #define HOSTCMD_CMD_GET_TEMP 0x1159 +#define HOSTCMD_CMD_GET_FW_REGION_CODE 0x116A +#define HOSTCMD_CMD_GET_DEVICE_PWR_TBL 0x116B #define HOSTCMD_CMD_QUIET_MODE 0x1201 /* Define general result code for each command */ @@ -870,6 +872,34 @@ struct hostcmd_cmd_get_temp { __le32 raw_data; } __packed; +/* HOSTCMD_CMD_GET_FW_REGION_CODE */ +struct hostcmd_cmd_get_fw_region_code { + struct hostcmd_header cmd_hdr; + __le32 status; /* 0 = Found, 1 = Error */ + __le32 fw_region_code; +} __packed; + +/* HOSTCMD_CMD_GET_DEVICE_PWR_TBL */ +#define HAL_TRPC_ID_MAX 16 + +struct channel_power_tbl { + u8 channel; + u8 tx_pwr[HAL_TRPC_ID_MAX]; + u8 dfs_capable; + u8 ax_ant; + u8 cdd; +} __packed; + +struct hostcmd_cmd_get_device_pwr_tbl { + struct hostcmd_header cmd_hdr; + __le16 status; /* 0 = Found, 1 = Error */ + u8 region_code; + u8 number_of_channels; + __le32 current_channel_index; + /* Only for 1 channel, so, 1 channel at a time */ + struct channel_power_tbl channel_pwr_tbl; +} __packed; + /* HOSTCMD_CMD_QUIET_MODE */ struct hostcmd_cmd_quiet_mode { struct hostcmd_header cmd_hdr; diff --git a/main.c b/main.c index 71701a2..4ece819 100644 --- a/main.c +++ b/main.c @@ -146,6 +146,23 @@ static const struct ieee80211_iface_combination ap_if_comb = { BIT(NL80211_CHAN_WIDTH_80), }; +struct region_code_mapping { + const char *alpha2; + u32 region_code; +}; + +static const struct region_code_mapping regmap[] = { + {"US", 0x10}, /* US FCC */ + {"CA", 0x20}, /* Canada */ + {"EU", 0x30}, /* ETSI */ + {"ES", 0x31}, /* Spain */ + {"FR", 0x32}, /* France */ + {"JP", 0x40}, /* Japan */ + {"TW", 0x80}, /* Taiwan */ + {"AU", 0x81}, /* Australia */ + {"CN", 0x90}, /* China (Asia) */ +}; + static int mwl_alloc_pci_resource(struct mwl_priv *priv) { struct pci_dev *pdev = priv->pdev; @@ -253,6 +270,17 @@ static void mwl_reg_notifier(struct wiphy *wiphy, hw = (struct ieee80211_hw *)wiphy_priv(wiphy); priv = hw->priv; + if (priv->forbidden_setting) { + if (!priv->regulatory_set) { + regulatory_hint(wiphy, priv->fw_alpha2); + priv->regulatory_set = true; + } else { + if (memcmp(priv->fw_alpha2, request->alpha2, 2)) + regulatory_hint(wiphy, priv->fw_alpha2); + } + return; + } + priv->dfs_region = request->dfs_region; #ifdef CONFIG_OF @@ -492,6 +520,37 @@ static void mwl_set_caps(struct mwl_priv *priv) } } +static void mwl_regd_init(struct mwl_priv *priv) +{ + u8 region_code; + int i; + + /* hook regulatory domain change notification */ + priv->hw->wiphy->reg_notifier = mwl_reg_notifier; + + if (mwl_fwcmd_get_device_pwr_tbl(priv->hw, + &priv->device_pwr_tbl[0], + ®ion_code, + &priv->number_of_channels, + 0)) + return; + + priv->forbidden_setting = true; + + for (i = 0; i < priv->number_of_channels; i++) + mwl_fwcmd_get_device_pwr_tbl(priv->hw, + &priv->device_pwr_tbl[i], + ®ion_code, + &priv->number_of_channels, + i); + + for (i = 0; i < ARRAY_SIZE(regmap); i++) + if (regmap[i].region_code == priv->fw_region_code) { + memcpy(priv->fw_alpha2, regmap[i].alpha2, 2); + break; + } +} + static void timer_routine(unsigned long data) { struct mwl_priv *priv = (struct mwl_priv *)data; @@ -655,6 +714,13 @@ static int mwl_wl_init(struct mwl_priv *priv) wiphy_info(hw->wiphy, "firmware version: 0x%x\n", priv->hw_data.fw_release_num); + if (!mwl_fwcmd_get_fw_region_code(hw, &priv->fw_region_code)) { + priv->fw_device_pwrtbl = true; + mwl_regd_init(priv); + wiphy_info(hw->wiphy, + "firmware region code: %x\n", priv->fw_region_code); + } + mwl_fwcmd_radio_disable(hw); mwl_fwcmd_rf_antenna(hw, WL_ANTENNATYPE_TX, priv->antenna_tx); @@ -774,9 +840,6 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) goto err_pci_disable_device; } - /* hook regulatory domain change notification */ - hw->wiphy->reg_notifier = mwl_reg_notifier; - pci_set_drvdata(pdev, hw); priv = hw->priv; @@ -784,6 +847,9 @@ static int mwl_probe(struct pci_dev *pdev, const struct pci_device_id *id) priv->pdev = pdev; priv->dev = &pdev->dev; priv->chip_type = id->driver_data; + priv->fw_device_pwrtbl = false; + priv->forbidden_setting = false; + priv->regulatory_set = false; priv->disable_2g = false; priv->disable_5g = false; priv->antenna_tx = mwl_chip_tbl[priv->chip_type].antenna_tx; -- cgit v1.2.3 From d48847cc83954930fdcd98818bbf33e75707b8e1 Mon Sep 17 00:00:00 2001 From: David Lin Date: Wed, 10 Aug 2016 09:19:41 +0800 Subject: Change driver version to 10.3.0.18-20160804. Signed-off-by: David Lin --- dev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev.h b/dev.h index 4c32297..4a55d4b 100644 --- a/dev.h +++ b/dev.h @@ -27,7 +27,7 @@ #include #define MWL_DRV_NAME KBUILD_MODNAME -#define MWL_DRV_VERSION "10.3.0.17-20160617" +#define MWL_DRV_VERSION "10.3.0.18-20160804" /* Map to 0x80000000 (Bus control) on BAR0 */ #define MACREG_REG_H2A_INTERRUPT_EVENTS 0x00000C18 /* (From host to ARM) */ -- cgit v1.2.3