mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Not needed to custom patch mwlwifi anymore
This commit is contained in:
parent
7948895f03
commit
0bbf273394
3 changed files with 0 additions and 930 deletions
|
@ -1,104 +0,0 @@
|
||||||
#
|
|
||||||
# Copyright (C) 2014-2016 OpenWrt.org
|
|
||||||
#
|
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
|
||||||
# See /LICENSE for more information.
|
|
||||||
#
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
|
||||||
|
|
||||||
PKG_NAME:=mwlwifi
|
|
||||||
PKG_RELEASE=1
|
|
||||||
|
|
||||||
PKG_LICENSE:=ISC
|
|
||||||
PKG_LICENSE_FILES:=
|
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
|
|
||||||
PKG_SOURCE_PROTO:=git
|
|
||||||
PKG_SOURCE_DATE:=2023-04-29
|
|
||||||
PKG_SOURCE_VERSION:=6a436714d2ea0d0adf39fc4d7d45e6a17fcc9371
|
|
||||||
PKG_MIRROR_HASH:=dcc320a8f859b732ff65c7ded0b5199a625bfba05a775a6bed15ed3c10cb2748
|
|
||||||
|
|
||||||
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
|
|
||||||
PKG_BUILD_PARALLEL:=1
|
|
||||||
PKG_FLAGS:=nonshared
|
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
|
||||||
|
|
||||||
define KernelPackage/mwlwifi
|
|
||||||
SUBMENU:=Wireless Drivers
|
|
||||||
TITLE:=Marvell 88W8864/88W8897/88W8964/88W8997 wireless driver
|
|
||||||
DEPENDS:=+kmod-mac80211 +@DRIVER_11AC_SUPPORT @PCI_SUPPORT @TARGET_mvebu
|
|
||||||
FILES:=$(PKG_BUILD_DIR)/mwlwifi.ko
|
|
||||||
AUTOLOAD:=$(call AutoLoad,50,mwlwifi)
|
|
||||||
endef
|
|
||||||
|
|
||||||
NOSTDINC_FLAGS := \
|
|
||||||
$(KERNEL_NOSTDINC_FLAGS) \
|
|
||||||
-I$(PKG_BUILD_DIR) \
|
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi \
|
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211-backport \
|
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211/uapi \
|
|
||||||
-I$(STAGING_DIR)/usr/include/mac80211 \
|
|
||||||
-include backport/backport.h \
|
|
||||||
-Wno-unused-result
|
|
||||||
|
|
||||||
define Build/Compile
|
|
||||||
+$(KERNEL_MAKE) $(PKG_JOBS) \
|
|
||||||
M="$(PKG_BUILD_DIR)" \
|
|
||||||
NOSTDINC_FLAGS="$(NOSTDINC_FLAGS)" \
|
|
||||||
modules
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-default
|
|
||||||
SECTION:=firmware
|
|
||||||
CATEGORY:=Firmware
|
|
||||||
TITLE:=Marvell $(1) firmware
|
|
||||||
DEPENDS:=+kmod-mwlwifi @TARGET_mvebu
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware/install
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware
|
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/mwlwifi
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/bin/firmware/$(2) $(1)/lib/firmware/mwlwifi/
|
|
||||||
$(CP) $(PKG_BUILD_DIR)/bin/firmware/Marvell_license.txt $(1)/lib/firmware/mwlwifi/$(2).Marvell_license.txt
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8864
|
|
||||||
$(call Package/mwlwifi-firmware-default,88W8864)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8864/install
|
|
||||||
$(call Package/mwlwifi-firmware/install,$(1),88W8864.bin)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8897
|
|
||||||
$(call Package/mwlwifi-firmware-default,88W8897)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8897/install
|
|
||||||
$(call Package/mwlwifi-firmware/install,$(1),88W8897.bin)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8964
|
|
||||||
$(call Package/mwlwifi-firmware-default,88W8964)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8964/install
|
|
||||||
$(call Package/mwlwifi-firmware/install,$(1),88W8964.bin)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8997
|
|
||||||
$(call Package/mwlwifi-firmware-default,88W8997)
|
|
||||||
endef
|
|
||||||
|
|
||||||
define Package/mwlwifi-firmware-88w8997/install
|
|
||||||
$(call Package/mwlwifi-firmware/install,$(1),88W8997.bin)
|
|
||||||
endef
|
|
||||||
|
|
||||||
$(eval $(call KernelPackage,mwlwifi))
|
|
||||||
$(eval $(call BuildPackage,mwlwifi-firmware-88w8864))
|
|
||||||
$(eval $(call BuildPackage,mwlwifi-firmware-88w8897))
|
|
||||||
$(eval $(call BuildPackage,mwlwifi-firmware-88w8964))
|
|
||||||
$(eval $(call BuildPackage,mwlwifi-firmware-88w8997))
|
|
|
@ -1,393 +0,0 @@
|
||||||
--- a/core.c
|
|
||||||
+++ b/core.c
|
|
||||||
@@ -706,7 +706,7 @@ static void mwl_chnl_switch_event(struct
|
|
||||||
vif = container_of((void *)mwl_vif, struct ieee80211_vif,
|
|
||||||
drv_priv);
|
|
||||||
|
|
||||||
- if (vif->csa_active)
|
|
||||||
+ if (vif->bss_conf.csa_active)
|
|
||||||
ieee80211_csa_finish(vif);
|
|
||||||
}
|
|
||||||
spin_unlock_bh(&priv->vif_lock);
|
|
||||||
--- a/debugfs.c
|
|
||||||
+++ b/debugfs.c
|
|
||||||
@@ -455,9 +455,9 @@ static ssize_t mwl_debugfs_vif_read(stru
|
|
||||||
switch (vif->type) {
|
|
||||||
case NL80211_IFTYPE_AP:
|
|
||||||
len += scnprintf(p + len, size - len, "type: ap\n");
|
|
||||||
- memcpy(ssid, vif->bss_conf.ssid,
|
|
||||||
- vif->bss_conf.ssid_len);
|
|
||||||
- ssid[vif->bss_conf.ssid_len] = 0;
|
|
||||||
+ memcpy(ssid, vif->cfg.ssid,
|
|
||||||
+ vif->cfg.ssid_len);
|
|
||||||
+ ssid[vif->cfg.ssid_len] = 0;
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"ssid: %s\n", ssid);
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
@@ -479,8 +479,8 @@ static ssize_t mwl_debugfs_vif_read(stru
|
|
||||||
"type: unknown\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (vif->chanctx_conf) {
|
|
||||||
- chan_def = &vif->chanctx_conf->def;
|
|
||||||
+ if (vif->bss_conf.chanctx_conf) {
|
|
||||||
+ chan_def = &vif->bss_conf.chanctx_conf->def;
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"channel: %d: width: %d\n",
|
|
||||||
chan_def->chan->hw_value,
|
|
||||||
@@ -564,28 +564,28 @@ static ssize_t mwl_debugfs_sta_read(stru
|
|
||||||
"amsdu cap: 0x%02x\n",
|
|
||||||
sta_info->amsdu_ctrl.cap);
|
|
||||||
}
|
|
||||||
- if (sta->ht_cap.ht_supported) {
|
|
||||||
+ if (sta->deflink.ht_cap.ht_supported) {
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"ht_cap: 0x%04x, ampdu: %02x, %02x\n",
|
|
||||||
- sta->ht_cap.cap,
|
|
||||||
- sta->ht_cap.ampdu_factor,
|
|
||||||
- sta->ht_cap.ampdu_density);
|
|
||||||
+ sta->deflink.ht_cap.cap,
|
|
||||||
+ sta->deflink.ht_cap.ampdu_factor,
|
|
||||||
+ sta->deflink.ht_cap.ampdu_density);
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"rx_mask: 0x%02x, %02x, %02x, %02x\n",
|
|
||||||
- sta->ht_cap.mcs.rx_mask[0],
|
|
||||||
- sta->ht_cap.mcs.rx_mask[1],
|
|
||||||
- sta->ht_cap.mcs.rx_mask[2],
|
|
||||||
- sta->ht_cap.mcs.rx_mask[3]);
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[0],
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[1],
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[2],
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[3]);
|
|
||||||
}
|
|
||||||
- if (sta->vht_cap.vht_supported) {
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported) {
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"vht_cap: 0x%08x, mcs: %02x, %02x\n",
|
|
||||||
- sta->vht_cap.cap,
|
|
||||||
- sta->vht_cap.vht_mcs.rx_mcs_map,
|
|
||||||
- sta->vht_cap.vht_mcs.tx_mcs_map);
|
|
||||||
+ sta->deflink.vht_cap.cap,
|
|
||||||
+ sta->deflink.vht_cap.vht_mcs.rx_mcs_map,
|
|
||||||
+ sta->deflink.vht_cap.vht_mcs.tx_mcs_map);
|
|
||||||
}
|
|
||||||
len += scnprintf(p + len, size - len, "rx_bw: %d, rx_nss: %d\n",
|
|
||||||
- sta->bandwidth, sta->rx_nss);
|
|
||||||
+ sta->deflink.bandwidth, sta->deflink.rx_nss);
|
|
||||||
len += scnprintf(p + len, size - len,
|
|
||||||
"tdls: %d, tdls_init: %d\n",
|
|
||||||
sta->tdls, sta->tdls_initiator);
|
|
||||||
--- a/hif/fwcmd.c
|
|
||||||
+++ b/hif/fwcmd.c
|
|
||||||
@@ -634,8 +634,9 @@ einval:
|
|
||||||
|
|
||||||
static int mwl_fwcmd_set_ap_beacon(struct mwl_priv *priv,
|
|
||||||
struct mwl_vif *mwl_vif,
|
|
||||||
- struct ieee80211_bss_conf *bss_conf)
|
|
||||||
+ struct ieee80211_vif *vif)
|
|
||||||
{
|
|
||||||
+ struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
|
|
||||||
struct hostcmd_cmd_ap_beacon *pcmd;
|
|
||||||
struct ds_params *phy_ds_param_set;
|
|
||||||
|
|
||||||
@@ -664,7 +665,7 @@ static int mwl_fwcmd_set_ap_beacon(struc
|
|
||||||
pcmd->cmd_hdr.macid = mwl_vif->macid;
|
|
||||||
|
|
||||||
ether_addr_copy(pcmd->start_cmd.sta_mac_addr, mwl_vif->bssid);
|
|
||||||
- memcpy(pcmd->start_cmd.ssid, bss_conf->ssid, bss_conf->ssid_len);
|
|
||||||
+ memcpy(pcmd->start_cmd.ssid, vif->cfg.ssid, vif->cfg.ssid_len);
|
|
||||||
if (priv->chip_type == MWL8997)
|
|
||||||
ether_addr_copy(pcmd->start_cmd.bssid, mwl_vif->bssid);
|
|
||||||
pcmd->start_cmd.bss_type = 1;
|
|
||||||
@@ -2091,7 +2092,7 @@ int mwl_fwcmd_set_beacon(struct ieee8021
|
|
||||||
if (mwl_fwcmd_set_wsc_ie(hw, b_inf->ie_wsc_len, b_inf->ie_wsc_ptr))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
- if (mwl_fwcmd_set_ap_beacon(priv, mwl_vif, &vif->bss_conf))
|
|
||||||
+ if (mwl_fwcmd_set_ap_beacon(priv, mwl_vif, vif))
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
if (b_inf->cap_info & WLAN_CAPABILITY_SPECTRUM_MGMT)
|
|
||||||
@@ -2153,38 +2154,38 @@ int mwl_fwcmd_set_new_stn_add(struct iee
|
|
||||||
ether_addr_copy(pcmd->mac_addr, sta->addr);
|
|
||||||
|
|
||||||
if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
|
|
||||||
- rates = sta->supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
+ rates = sta->deflink.supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
else
|
|
||||||
- rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
|
|
||||||
+ rates = sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 5;
|
|
||||||
pcmd->peer_info.legacy_rate_bitmap = cpu_to_le32(rates);
|
|
||||||
|
|
||||||
- if (sta->ht_cap.ht_supported) {
|
|
||||||
+ if (sta->deflink.ht_cap.ht_supported) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
|
||||||
- if (i < sta->rx_nss) {
|
|
||||||
+ if (i < sta->deflink.rx_nss) {
|
|
||||||
pcmd->peer_info.ht_rates[i] =
|
|
||||||
- sta->ht_cap.mcs.rx_mask[i];
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[i];
|
|
||||||
} else {
|
|
||||||
pcmd->peer_info.ht_rates[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->ht_cap.cap);
|
|
||||||
+ pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->deflink.ht_cap.cap);
|
|
||||||
pcmd->peer_info.mac_ht_param_info =
|
|
||||||
- (sta->ht_cap.ampdu_factor & 3) |
|
|
||||||
- ((sta->ht_cap.ampdu_density & 7) << 2);
|
|
||||||
+ (sta->deflink.ht_cap.ampdu_factor & 3) |
|
|
||||||
+ ((sta->deflink.ht_cap.ampdu_density & 7) << 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (sta->vht_cap.vht_supported) {
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported) {
|
|
||||||
u32 rx_mcs_map_mask = 0;
|
|
||||||
|
|
||||||
- rx_mcs_map_mask = ((0x0000FFFF) >> (sta->rx_nss * 2))
|
|
||||||
- << (sta->rx_nss * 2);
|
|
||||||
+ rx_mcs_map_mask = ((0x0000FFFF) >> (sta->deflink.rx_nss * 2))
|
|
||||||
+ << (sta->deflink.rx_nss * 2);
|
|
||||||
pcmd->peer_info.vht_max_rx_mcs =
|
|
||||||
cpu_to_le32((*((u32 *)
|
|
||||||
- &sta->vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
|
|
||||||
- pcmd->peer_info.vht_cap = cpu_to_le32(sta->vht_cap.cap);
|
|
||||||
- pcmd->peer_info.vht_rx_channel_width = sta->bandwidth;
|
|
||||||
+ &sta->deflink.vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
|
|
||||||
+ pcmd->peer_info.vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
|
|
||||||
+ pcmd->peer_info.vht_rx_channel_width = sta->deflink.bandwidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
pcmd->is_qos_sta = sta->wme;
|
|
||||||
@@ -2240,38 +2241,38 @@ int mwl_fwcmd_set_new_stn_add_sc4(struct
|
|
||||||
ether_addr_copy(pcmd->mac_addr, sta->addr);
|
|
||||||
|
|
||||||
if (hw->conf.chandef.chan->band == NL80211_BAND_2GHZ)
|
|
||||||
- rates = sta->supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
+ rates = sta->deflink.supp_rates[NL80211_BAND_2GHZ];
|
|
||||||
else
|
|
||||||
- rates = sta->supp_rates[NL80211_BAND_5GHZ] << 5;
|
|
||||||
+ rates = sta->deflink.supp_rates[NL80211_BAND_5GHZ] << 5;
|
|
||||||
pcmd->peer_info.legacy_rate_bitmap = cpu_to_le32(rates);
|
|
||||||
|
|
||||||
- if (sta->ht_cap.ht_supported) {
|
|
||||||
+ if (sta->deflink.ht_cap.ht_supported) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
|
||||||
- if (i < sta->rx_nss) {
|
|
||||||
+ if (i < sta->deflink.rx_nss) {
|
|
||||||
pcmd->peer_info.ht_rates[i] =
|
|
||||||
- sta->ht_cap.mcs.rx_mask[i];
|
|
||||||
+ sta->deflink.ht_cap.mcs.rx_mask[i];
|
|
||||||
} else {
|
|
||||||
pcmd->peer_info.ht_rates[i] = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->ht_cap.cap);
|
|
||||||
+ pcmd->peer_info.ht_cap_info = cpu_to_le16(sta->deflink.ht_cap.cap);
|
|
||||||
pcmd->peer_info.mac_ht_param_info =
|
|
||||||
- (sta->ht_cap.ampdu_factor & 3) |
|
|
||||||
- ((sta->ht_cap.ampdu_density & 7) << 2);
|
|
||||||
+ (sta->deflink.ht_cap.ampdu_factor & 3) |
|
|
||||||
+ ((sta->deflink.ht_cap.ampdu_density & 7) << 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
- if (sta->vht_cap.vht_supported) {
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported) {
|
|
||||||
u32 rx_mcs_map_mask = 0;
|
|
||||||
|
|
||||||
- rx_mcs_map_mask = ((0x0000FFFF) >> (sta->rx_nss * 2))
|
|
||||||
- << (sta->rx_nss * 2);
|
|
||||||
+ rx_mcs_map_mask = ((0x0000FFFF) >> (sta->deflink.rx_nss * 2))
|
|
||||||
+ << (sta->deflink.rx_nss * 2);
|
|
||||||
pcmd->peer_info.vht_max_rx_mcs =
|
|
||||||
cpu_to_le32((*((u32 *)
|
|
||||||
- &sta->vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
|
|
||||||
- pcmd->peer_info.vht_cap = cpu_to_le32(sta->vht_cap.cap);
|
|
||||||
- pcmd->peer_info.vht_rx_channel_width = sta->bandwidth;
|
|
||||||
+ &sta->deflink.vht_cap.vht_mcs.rx_mcs_map)) | rx_mcs_map_mask);
|
|
||||||
+ pcmd->peer_info.vht_cap = cpu_to_le32(sta->deflink.vht_cap.cap);
|
|
||||||
+ pcmd->peer_info.vht_rx_channel_width = sta->deflink.bandwidth;
|
|
||||||
}
|
|
||||||
|
|
||||||
pcmd->is_qos_sta = sta->wme;
|
|
||||||
@@ -2788,9 +2789,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
|
|
||||||
pcmd->ba_info.create_params.flags = cpu_to_le32(ba_flags);
|
|
||||||
pcmd->ba_info.create_params.queue_id = stream->idx;
|
|
||||||
pcmd->ba_info.create_params.param_info =
|
|
||||||
- (stream->sta->ht_cap.ampdu_factor &
|
|
||||||
+ (stream->sta->deflink.ht_cap.ampdu_factor &
|
|
||||||
IEEE80211_HT_AMPDU_PARM_FACTOR) |
|
|
||||||
- ((stream->sta->ht_cap.ampdu_density << 2) &
|
|
||||||
+ ((stream->sta->deflink.ht_cap.ampdu_density << 2) &
|
|
||||||
IEEE80211_HT_AMPDU_PARM_DENSITY);
|
|
||||||
if (direction == BA_FLAG_DIRECTION_UP) {
|
|
||||||
pcmd->ba_info.create_params.reset_seq_no = 0;
|
|
||||||
@@ -2800,9 +2801,9 @@ int mwl_fwcmd_create_ba(struct ieee80211
|
|
||||||
pcmd->ba_info.create_params.current_seq = cpu_to_le16(0);
|
|
||||||
}
|
|
||||||
if (priv->chip_type == MWL8964 &&
|
|
||||||
- stream->sta->vht_cap.vht_supported) {
|
|
||||||
+ stream->sta->deflink.vht_cap.vht_supported) {
|
|
||||||
pcmd->ba_info.create_params.vht_rx_factor =
|
|
||||||
- cpu_to_le32((stream->sta->vht_cap.cap &
|
|
||||||
+ cpu_to_le32((stream->sta->deflink.vht_cap.cap &
|
|
||||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK) >>
|
|
||||||
IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_SHIFT);
|
|
||||||
}
|
|
||||||
--- a/mac80211.c
|
|
||||||
+++ b/mac80211.c
|
|
||||||
@@ -371,15 +371,15 @@ static void mwl_mac80211_bss_info_change
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if ((changed & BSS_CHANGED_ASSOC) && vif->bss_conf.assoc)
|
|
||||||
+ if ((changed & BSS_CHANGED_ASSOC) && vif->cfg.assoc)
|
|
||||||
mwl_fwcmd_set_aid(hw, vif, (u8 *)vif->bss_conf.bssid,
|
|
||||||
- vif->bss_conf.aid);
|
|
||||||
+ vif->cfg.aid);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void mwl_mac80211_bss_info_changed_ap(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
struct ieee80211_bss_conf *info,
|
|
||||||
- u32 changed)
|
|
||||||
+ u64 changed)
|
|
||||||
{
|
|
||||||
struct mwl_priv *priv = hw->priv;
|
|
||||||
struct mwl_vif *mwl_vif;
|
|
||||||
@@ -429,8 +429,8 @@ static void mwl_mac80211_bss_info_change
|
|
||||||
if (changed & (BSS_CHANGED_BEACON_INT | BSS_CHANGED_BEACON)) {
|
|
||||||
struct sk_buff *skb;
|
|
||||||
|
|
||||||
- if ((info->ssid[0] != '\0') &&
|
|
||||||
- (info->ssid_len != 0) &&
|
|
||||||
+ if ((vif->cfg.ssid[0] != '\0') &&
|
|
||||||
+ (vif->cfg.ssid_len != 0) &&
|
|
||||||
(!info->hidden_ssid)) {
|
|
||||||
if (mwl_vif->broadcast_ssid != true) {
|
|
||||||
mwl_fwcmd_broadcast_ssid_enable(hw, vif, true);
|
|
||||||
@@ -444,7 +444,7 @@ static void mwl_mac80211_bss_info_change
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!mwl_vif->set_beacon) {
|
|
||||||
- skb = ieee80211_beacon_get(hw, vif);
|
|
||||||
+ skb = ieee80211_beacon_get(hw, vif, 0);
|
|
||||||
|
|
||||||
if (skb) {
|
|
||||||
mwl_fwcmd_set_beacon(hw, vif, skb->data, skb->len);
|
|
||||||
@@ -461,7 +461,7 @@ static void mwl_mac80211_bss_info_change
|
|
||||||
static void mwl_mac80211_bss_info_changed(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
struct ieee80211_bss_conf *info,
|
|
||||||
- u32 changed)
|
|
||||||
+ u64 changed)
|
|
||||||
{
|
|
||||||
switch (vif->type) {
|
|
||||||
case NL80211_IFTYPE_AP:
|
|
||||||
@@ -584,10 +584,10 @@ static int mwl_mac80211_sta_add(struct i
|
|
||||||
if (vif->type == NL80211_IFTYPE_MESH_POINT)
|
|
||||||
sta_info->is_mesh_node = true;
|
|
||||||
|
|
||||||
- if (sta->ht_cap.ht_supported) {
|
|
||||||
+ if (sta->deflink.ht_cap.ht_supported) {
|
|
||||||
sta_info->is_ampdu_allowed = true;
|
|
||||||
sta_info->is_amsdu_allowed = false;
|
|
||||||
- if (sta->ht_cap.cap & IEEE80211_HT_CAP_MAX_AMSDU)
|
|
||||||
+ if (sta->deflink.ht_cap.cap & IEEE80211_HT_CAP_MAX_AMSDU)
|
|
||||||
sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_8K;
|
|
||||||
else
|
|
||||||
sta_info->amsdu_ctrl.cap = MWL_AMSDU_SIZE_4K;
|
|
||||||
@@ -669,7 +669,7 @@ static int mwl_mac80211_sta_remove(struc
|
|
||||||
|
|
||||||
static int mwl_mac80211_conf_tx(struct ieee80211_hw *hw,
|
|
||||||
struct ieee80211_vif *vif,
|
|
||||||
- u16 queue,
|
|
||||||
+ unsigned int link_id, u16 queue,
|
|
||||||
const struct ieee80211_tx_queue_params *params)
|
|
||||||
{
|
|
||||||
struct mwl_priv *priv = hw->priv;
|
|
||||||
@@ -928,4 +928,5 @@ const struct ieee80211_ops mwl_mac80211_
|
|
||||||
.pre_channel_switch = mwl_mac80211_chnl_switch,
|
|
||||||
.sw_scan_start = mwl_mac80211_sw_scan_start,
|
|
||||||
.sw_scan_complete = mwl_mac80211_sw_scan_complete,
|
|
||||||
+ .wake_tx_queue = ieee80211_handle_wake_tx_queue,
|
|
||||||
};
|
|
||||||
--- a/utils.c
|
|
||||||
+++ b/utils.c
|
|
||||||
@@ -173,9 +173,9 @@ u32 utils_get_init_tx_rate(struct mwl_pr
|
|
||||||
u32 tx_rate;
|
|
||||||
u16 format, nss, bw, rate_mcs;
|
|
||||||
|
|
||||||
- if (sta->vht_cap.vht_supported)
|
|
||||||
+ if (sta->deflink.vht_cap.vht_supported)
|
|
||||||
format = TX_RATE_FORMAT_11AC;
|
|
||||||
- else if (sta->ht_cap.ht_supported)
|
|
||||||
+ else if (sta->deflink.ht_cap.ht_supported)
|
|
||||||
format = TX_RATE_FORMAT_11N;
|
|
||||||
else
|
|
||||||
format = TX_RATE_FORMAT_LEGACY;
|
|
||||||
@@ -192,11 +192,11 @@ u32 utils_get_init_tx_rate(struct mwl_pr
|
|
||||||
nss = 3;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
- nss = sta->rx_nss;
|
|
||||||
+ nss = sta->deflink.rx_nss;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (nss > sta->rx_nss)
|
|
||||||
- nss = sta->rx_nss;
|
|
||||||
+ if (nss > sta->deflink.rx_nss)
|
|
||||||
+ nss = sta->deflink.rx_nss;
|
|
||||||
|
|
||||||
switch (conf->chandef.width) {
|
|
||||||
case NL80211_CHAN_WIDTH_20_NOHT:
|
|
||||||
@@ -213,11 +213,11 @@ u32 utils_get_init_tx_rate(struct mwl_pr
|
|
||||||
bw = TX_RATE_BANDWIDTH_160;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
- bw = sta->bandwidth;
|
|
||||||
+ bw = sta->deflink.bandwidth;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- if (bw > sta->bandwidth)
|
|
||||||
- bw = sta->bandwidth;
|
|
||||||
+ if (bw > sta->deflink.bandwidth)
|
|
||||||
+ bw = sta->deflink.bandwidth;
|
|
||||||
|
|
||||||
switch (format) {
|
|
||||||
case TX_RATE_FORMAT_LEGACY:
|
|
||||||
--- a/hif/pcie/tx.c
|
|
||||||
+++ b/hif/pcie/tx.c
|
|
||||||
@@ -153,7 +153,7 @@ static int pcie_txbd_ring_create(struct
|
|
||||||
wiphy_info(priv->hw->wiphy,
|
|
||||||
"TX ring: - base: %p, pbase: 0x%x, len: %d\n",
|
|
||||||
pcie_priv->txbd_ring_vbase,
|
|
||||||
- pcie_priv->txbd_ring_pbase,
|
|
||||||
+ (u32)pcie_priv->txbd_ring_pbase,
|
|
||||||
pcie_priv->txbd_ring_size);
|
|
||||||
|
|
||||||
for (num = 0; num < PCIE_MAX_TXRX_BD; num++) {
|
|
||||||
@@ -1091,7 +1091,7 @@ void pcie_tx_xmit(struct ieee80211_hw *h
|
|
||||||
index = SYSADPT_TX_WMM_QUEUES - index - 1;
|
|
||||||
txpriority = index;
|
|
||||||
|
|
||||||
- if (sta && sta->ht_cap.ht_supported && !eapol_frame &&
|
|
||||||
+ if (sta && sta->deflink.ht_cap.ht_supported && !eapol_frame &&
|
|
||||||
ieee80211_is_data_qos(wh->frame_control)) {
|
|
||||||
tid = qos & 0xf;
|
|
||||||
pcie_tx_count_packet(sta, tid);
|
|
||||||
--- a/hif/pcie/tx_ndp.c
|
|
||||||
+++ b/hif/pcie/tx_ndp.c
|
|
||||||
@@ -602,7 +602,7 @@ void pcie_tx_xmit_ndp(struct ieee80211_h
|
|
||||||
pcie_tx_encapsulate_frame(priv, skb, k_conf, NULL);
|
|
||||||
} else {
|
|
||||||
tid = qos & 0x7;
|
|
||||||
- if (sta && sta->ht_cap.ht_supported && !eapol_frame &&
|
|
||||||
+ if (sta && sta->deflink.ht_cap.ht_supported && !eapol_frame &&
|
|
||||||
qos != 0xFFFF) {
|
|
||||||
pcie_tx_count_packet(sta, tid);
|
|
||||||
spin_lock_bh(&priv->stream_lock);
|
|
|
@ -1,433 +0,0 @@
|
||||||
From 03431e9b720a6a9ff833c26eaadc4e4e53620d75 Mon Sep 17 00:00:00 2001
|
|
||||||
From: jbsky <webmaster@jbsky.fr>
|
|
||||||
Date: Fri, 14 Apr 2023 23:19:57 +0200
|
|
||||||
Subject: [PATCH] kernel 6.1.2 working
|
|
||||||
|
|
||||||
---
|
|
||||||
core.c | 3 +-
|
|
||||||
core.h | 2 ++
|
|
||||||
debugfs.c | 36 +++++++++++-----------
|
|
||||||
hif/fwcmd.c | 76 ++++++++++++++++++++++++-----------------------
|
|
||||||
hif/pcie/dev.h | 21 +++++++------
|
|
||||||
hif/pcie/pcie.c | 10 ++++---
|
|
||||||
hif/pcie/rx.c | 20 ++++++-------
|
|
||||||
hif/pcie/rx_ndp.c | 20 ++++++-------
|
|
||||||
hif/pcie/tx.c | 32 ++++++++++++--------
|
|
||||||
hif/pcie/tx_ndp.c | 18 +++++------
|
|
||||||
mac80211.c | 34 ++++++++++-----------
|
|
||||||
utils.c | 16 +++++-----
|
|
||||||
utils.h | 26 ++++------------
|
|
||||||
13 files changed, 157 insertions(+), 157 deletions(-)
|
|
||||||
diff --git a/core.h b/core.h
|
|
||||||
index 4fe48df..7355262 100644
|
|
||||||
--- a/core.h
|
|
||||||
+++ b/core.h
|
|
||||||
@@ -65,6 +65,8 @@
|
|
||||||
#define TX_RATE_INFO_STD_GI 0
|
|
||||||
#define TX_RATE_INFO_SHORT_GI 1
|
|
||||||
|
|
||||||
+#define TX_RATE_INFO_PREAMBLE 1
|
|
||||||
+
|
|
||||||
/* tx rate information */
|
|
||||||
/* 0: legacy format 1: 11n format 2: 11ac format */
|
|
||||||
#define MWL_TX_RATE_FORMAT_MASK 0x00000003
|
|
||||||
diff --git a/hif/pcie/dev.h b/hif/pcie/dev.h
|
|
||||||
index 24cf551..4c25a9e 100644
|
|
||||||
--- a/hif/pcie/dev.h
|
|
||||||
+++ b/hif/pcie/dev.h
|
|
||||||
@@ -827,7 +827,7 @@ static inline void pcie_tx_encapsulate_frame(struct mwl_priv *priv,
|
|
||||||
static inline void pcie_tx_prepare_info(struct mwl_priv *priv, u32 rate,
|
|
||||||
struct ieee80211_tx_info *info)
|
|
||||||
{
|
|
||||||
- u32 format, bandwidth, short_gi, rate_id;
|
|
||||||
+ u32 format, bandwidth, short_gi, rate_id, preamble, powerid, advcoding, bf;
|
|
||||||
|
|
||||||
ieee80211_tx_info_clear_status(info);
|
|
||||||
|
|
||||||
@@ -839,14 +839,14 @@ static inline void pcie_tx_prepare_info(struct mwl_priv *priv, u32 rate,
|
|
||||||
|
|
||||||
if (rate) {
|
|
||||||
/* Prepare rate information */
|
|
||||||
- format = rate & MWL_TX_RATE_FORMAT_MASK;
|
|
||||||
- bandwidth =
|
|
||||||
- (rate & MWL_TX_RATE_BANDWIDTH_MASK) >>
|
|
||||||
- MWL_TX_RATE_BANDWIDTH_SHIFT;
|
|
||||||
- short_gi = (rate & MWL_TX_RATE_SHORTGI_MASK) >>
|
|
||||||
- MWL_TX_RATE_SHORTGI_SHIFT;
|
|
||||||
- rate_id = (rate & MWL_TX_RATE_RATEIDMCS_MASK) >>
|
|
||||||
- MWL_TX_RATE_RATEIDMCS_SHIFT;
|
|
||||||
+ format = rate & MWL_TX_RATE_FORMAT_MASK;
|
|
||||||
+ bandwidth = (rate & MWL_TX_RATE_BANDWIDTH_MASK) >> MWL_TX_RATE_BANDWIDTH_SHIFT;
|
|
||||||
+ short_gi = (rate & MWL_TX_RATE_SHORTGI_MASK) >> MWL_TX_RATE_SHORTGI_SHIFT;
|
|
||||||
+ rate_id = (rate & MWL_TX_RATE_RATEIDMCS_MASK) >> MWL_TX_RATE_RATEIDMCS_SHIFT;
|
|
||||||
+ preamble = (rate & MWL_TX_RATE_PREAMBLE_MASK) >> MWL_TX_RATE_PREAMBLE_SHIFT;
|
|
||||||
+ powerid = (rate & MWL_TX_RATE_POWERID_MASK) >> MWL_TX_RATE_POWERID_SHIFT;
|
|
||||||
+ advcoding = (rate & MWL_TX_RATE_ADVCODING_MASK) >> MWL_TX_RATE_ADVCODING_SHIFT;
|
|
||||||
+ bf = (rate & MWL_TX_RATE_BF_MASK) >> MWL_TX_RATE_BF_SHIFT;
|
|
||||||
|
|
||||||
info->status.rates[0].idx = rate_id;
|
|
||||||
if (format == TX_RATE_FORMAT_LEGACY) {
|
|
||||||
@@ -873,6 +873,9 @@ static inline void pcie_tx_prepare_info(struct mwl_priv *priv, u32 rate,
|
|
||||||
if (short_gi == TX_RATE_INFO_SHORT_GI)
|
|
||||||
info->status.rates[0].flags |=
|
|
||||||
IEEE80211_TX_RC_SHORT_GI;
|
|
||||||
+ if (preamble == TX_RATE_INFO_PREAMBLE)
|
|
||||||
+ info->status.rates[0].flags |=
|
|
||||||
+ IEEE80211_TX_RC_USE_SHORT_PREAMBLE;
|
|
||||||
info->status.rates[0].count = 1;
|
|
||||||
info->status.rates[1].idx = -1;
|
|
||||||
}
|
|
||||||
diff --git a/hif/pcie/pcie.c b/hif/pcie/pcie.c
|
|
||||||
index d494c0e..6ee2c49 100644
|
|
||||||
--- a/hif/pcie/pcie.c
|
|
||||||
+++ b/hif/pcie/pcie.c
|
|
||||||
@@ -1278,15 +1278,17 @@ static void pcie_bf_mimo_ctrl_decode(struct mwl_priv *priv,
|
|
||||||
const char filename[] = "/tmp/BF_MIMO_Ctrl_Field_Output.txt";
|
|
||||||
char str_buf[256];
|
|
||||||
char *buf = &str_buf[0];
|
|
||||||
- mm_segment_t oldfs;
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,0,0)
|
|
||||||
+ mm_segment_t oldfs;
|
|
||||||
oldfs = get_fs();
|
|
||||||
set_fs( get_ds() );
|
|
||||||
#elif LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
|
||||||
+ mm_segment_t oldfs;
|
|
||||||
oldfs = get_fs();
|
|
||||||
set_fs(KERNEL_DS);
|
|
||||||
-#else
|
|
||||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
|
||||||
+ mm_segment_t oldfs;
|
|
||||||
oldfs = force_uaccess_begin();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
@@ -1310,7 +1312,7 @@ static void pcie_bf_mimo_ctrl_decode(struct mwl_priv *priv,
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,10,0)
|
|
||||||
set_fs(oldfs);
|
|
||||||
-#else
|
|
||||||
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,0,0)
|
|
||||||
force_uaccess_end(oldfs);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
@@ -1538,7 +1540,7 @@ static int pcie_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|
||||||
return rc;
|
|
||||||
}
|
|
||||||
|
|
||||||
- rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
|
|
||||||
+ rc = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
|
|
||||||
if (rc) {
|
|
||||||
pr_err("%s: 32-bit PCI DMA not supported\n",
|
|
||||||
PCIE_DRV_NAME);
|
|
||||||
diff --git a/hif/pcie/rx.c b/hif/pcie/rx.c
|
|
||||||
index 5cef0ac..c32d367 100644
|
|
||||||
--- a/hif/pcie/rx.c
|
|
||||||
+++ b/hif/pcie/rx.c
|
|
||||||
@@ -107,11 +107,11 @@ static int pcie_rx_ring_init(struct mwl_priv *priv)
|
|
||||||
desc->prx_ring[i].rssi = 0x00;
|
|
||||||
desc->prx_ring[i].pkt_len =
|
|
||||||
cpu_to_le16(SYSADPT_MAX_AGGR_SIZE);
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev,
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev,
|
|
||||||
rx_hndl->psk_buff->data,
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"failed to map pci memory!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
@@ -153,11 +153,11 @@ static void pcie_rx_ring_cleanup(struct mwl_priv *priv)
|
|
||||||
if (!rx_hndl->psk_buff)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu
|
|
||||||
(rx_hndl->pdesc->pphys_buff_data),
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
|
|
||||||
dev_kfree_skb_any(rx_hndl->psk_buff);
|
|
||||||
|
|
||||||
@@ -337,11 +337,11 @@ static inline int pcie_rx_refill(struct mwl_priv *priv,
|
|
||||||
rx_hndl->pdesc->rssi = 0x00;
|
|
||||||
rx_hndl->pdesc->pkt_len = cpu_to_le16(desc->rx_buf_size);
|
|
||||||
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev,
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev,
|
|
||||||
rx_hndl->psk_buff->data,
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
dev_kfree_skb_any(rx_hndl->psk_buff);
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"failed to map pci memory!\n");
|
|
||||||
@@ -416,10 +416,10 @@ void pcie_rx_recv(unsigned long data)
|
|
||||||
prx_skb = curr_hndl->psk_buff;
|
|
||||||
if (!prx_skb)
|
|
||||||
goto out;
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(curr_hndl->pdesc->pphys_buff_data),
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
pkt_len = le16_to_cpu(curr_hndl->pdesc->pkt_len);
|
|
||||||
|
|
||||||
if (skb_tailroom(prx_skb) < pkt_len) {
|
|
||||||
diff --git a/hif/pcie/rx_ndp.c b/hif/pcie/rx_ndp.c
|
|
||||||
index 0d8c3af..56f875d 100644
|
|
||||||
--- a/hif/pcie/rx_ndp.c
|
|
||||||
+++ b/hif/pcie/rx_ndp.c
|
|
||||||
@@ -86,11 +86,11 @@ static int pcie_rx_ring_init_ndp(struct mwl_priv *priv)
|
|
||||||
}
|
|
||||||
skb_reserve(psk_buff, MIN_BYTES_RX_HEADROOM);
|
|
||||||
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev,
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev,
|
|
||||||
psk_buff->data,
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"failed to map pci memory!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
@@ -120,11 +120,11 @@ static void pcie_rx_ring_cleanup_ndp(struct mwl_priv *priv)
|
|
||||||
if (desc->prx_ring) {
|
|
||||||
for (i = 0; i < MAX_NUM_RX_DESC; i++) {
|
|
||||||
if (desc->rx_vbuflist[i]) {
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(
|
|
||||||
desc->prx_ring[i].data),
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
desc->rx_vbuflist[i] = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -400,11 +400,11 @@ static inline int pcie_rx_refill_ndp(struct mwl_priv *priv, u32 buf_idx)
|
|
||||||
return -ENOMEM;
|
|
||||||
skb_reserve(psk_buff, MIN_BYTES_RX_HEADROOM);
|
|
||||||
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev,
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev,
|
|
||||||
psk_buff->data,
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"refill: failed to map pci memory!\n");
|
|
||||||
return -ENOMEM;
|
|
||||||
@@ -509,10 +509,10 @@ void pcie_rx_recv_ndp(unsigned long data)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(prx_desc->data),
|
|
||||||
desc->rx_buf_size,
|
|
||||||
- PCI_DMA_FROMDEVICE);
|
|
||||||
+ DMA_FROM_DEVICE);
|
|
||||||
|
|
||||||
bad_mic = false;
|
|
||||||
ctrl = le32_to_cpu(prx_ring_done->ctrl);
|
|
||||||
diff --git a/hif/pcie/tx.c b/hif/pcie/tx.c
|
|
||||||
index 4fc9e79..2d5bc88 100644
|
|
||||||
--- a/hif/pcie/tx.c
|
|
||||||
+++ b/hif/pcie/tx.c
|
|
||||||
@@ -47,6 +47,12 @@
|
|
||||||
(iv32)++; \
|
|
||||||
}
|
|
||||||
|
|
||||||
+#define TID_TO_WME_AC(_tid) \
|
|
||||||
+ ((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE : \
|
|
||||||
+ (((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK : \
|
|
||||||
+ (((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI : \
|
|
||||||
+ IEEE80211_AC_VO)
|
|
||||||
+
|
|
||||||
/* Transmission information to transmit a socket buffer. */
|
|
||||||
struct pcie_tx_ctrl {
|
|
||||||
void *sta;
|
|
||||||
@@ -243,11 +249,11 @@ static void pcie_tx_ring_cleanup(struct mwl_priv *priv)
|
|
||||||
desc->tx_hndl[i].psk_buff->data,
|
|
||||||
le32_to_cpu(
|
|
||||||
desc->ptx_ring[i].pkt_ptr));
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(
|
|
||||||
desc->ptx_ring[i].pkt_ptr),
|
|
||||||
desc->tx_hndl[i].psk_buff->len,
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
dev_kfree_skb_any(desc->tx_hndl[i].psk_buff);
|
|
||||||
desc->ptx_ring[i].status =
|
|
||||||
cpu_to_le32(EAGLE_TXD_STATUS_IDLE);
|
|
||||||
@@ -305,10 +311,10 @@ static void pcie_txbd_ring_delete(struct mwl_priv *priv)
|
|
||||||
skb = pcie_priv->tx_buf_list[num];
|
|
||||||
tx_desc = (struct pcie_tx_desc *)skb->data;
|
|
||||||
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(tx_desc->pkt_ptr),
|
|
||||||
skb->len,
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
dev_kfree_skb_any(skb);
|
|
||||||
}
|
|
||||||
pcie_priv->tx_buf_list[num] = NULL;
|
|
||||||
@@ -453,9 +459,9 @@ static inline void pcie_tx_skb(struct mwl_priv *priv, int desc_num,
|
|
||||||
tx_desc->type = tx_ctrl->type;
|
|
||||||
tx_desc->xmit_control = tx_ctrl->xmit_control;
|
|
||||||
tx_desc->sap_pkt_info = 0;
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev, tx_skb->data,
|
|
||||||
- tx_skb->len, PCI_DMA_TODEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev, tx_skb->data,
|
|
||||||
+ tx_skb->len, DMA_TO_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
dev_kfree_skb_any(tx_skb);
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"failed to map pci memory!\n");
|
|
||||||
@@ -679,10 +685,10 @@ static void pcie_pfu_tx_done(struct mwl_priv *priv)
|
|
||||||
pfu_dma = (struct pcie_pfu_dma_data *)done_skb->data;
|
|
||||||
tx_desc = &pfu_dma->tx_desc;
|
|
||||||
dma_data = &pfu_dma->dma_data;
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(data_buf->paddr),
|
|
||||||
le16_to_cpu(data_buf->len),
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
tx_desc->pkt_ptr = 0;
|
|
||||||
tx_desc->pkt_len = 0;
|
|
||||||
tx_desc->status = cpu_to_le32(EAGLE_TXD_STATUS_IDLE);
|
|
||||||
@@ -763,10 +769,10 @@ static void pcie_non_pfu_tx_done(struct mwl_priv *priv)
|
|
||||||
(tx_desc->status & cpu_to_le32(EAGLE_TXD_STATUS_OK)) &&
|
|
||||||
(!(tx_desc->status &
|
|
||||||
cpu_to_le32(EAGLE_TXD_STATUS_FW_OWNED)))) {
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
le32_to_cpu(tx_desc->pkt_ptr),
|
|
||||||
le16_to_cpu(tx_desc->pkt_len),
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
done_skb = tx_hndl->psk_buff;
|
|
||||||
rate = le32_to_cpu(tx_desc->rate_info);
|
|
||||||
tx_desc->pkt_ptr = 0;
|
|
||||||
@@ -1038,7 +1044,7 @@ void pcie_tx_xmit(struct ieee80211_hw *hw,
|
|
||||||
WLAN_ACTION_ADDBA_REQ)) {
|
|
||||||
capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab);
|
|
||||||
tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
|
|
||||||
- index = utils_tid_to_ac(tid);
|
|
||||||
+ index = TID_TO_WME_AC(tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(ieee80211_is_assoc_req(wh->frame_control)))
|
|
||||||
@@ -1247,7 +1247,7 @@
|
|
||||||
struct pcie_tx_ctrl *tx_ctrl;
|
|
||||||
unsigned long flags;
|
|
||||||
|
|
||||||
- ac = utils_tid_to_ac(tid);
|
|
||||||
+ ac = TID_TO_WME_AC(tid);
|
|
||||||
desc_num = SYSADPT_TX_WMM_QUEUES - ac - 1;
|
|
||||||
spin_lock_irqsave(&pcie_priv->txq[desc_num].lock, flags);
|
|
||||||
skb_queue_walk_safe(&pcie_priv->txq[desc_num], skb, tmp) {
|
|
||||||
diff --git a/hif/pcie/tx_ndp.c b/hif/pcie/tx_ndp.c
|
|
||||||
index 6758cde..14b9ed2 100644
|
|
||||||
--- a/hif/pcie/tx_ndp.c
|
|
||||||
+++ b/hif/pcie/tx_ndp.c
|
|
||||||
@@ -131,10 +131,10 @@ static void pcie_tx_ring_cleanup_ndp(struct mwl_priv *priv)
|
|
||||||
for (i = 0; i < MAX_TX_RING_SEND_SIZE; i++) {
|
|
||||||
tx_skb = desc->tx_vbuflist[i];
|
|
||||||
if (tx_skb) {
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
desc->pphys_tx_buflist[i],
|
|
||||||
tx_skb->len,
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
dev_kfree_skb_any(tx_skb);
|
|
||||||
desc->pphys_tx_buflist[i] = 0;
|
|
||||||
desc->tx_vbuflist[i] = NULL;
|
|
||||||
@@ -266,9 +266,9 @@ static inline int pcie_tx_skb_ndp(struct mwl_priv *priv,
|
|
||||||
(TXRING_CTRL_TAG_MGMT << TXRING_CTRL_TAG_SHIFT));
|
|
||||||
}
|
|
||||||
|
|
||||||
- dma = pci_map_single(pcie_priv->pdev, tx_skb->data,
|
|
||||||
- tx_skb->len, PCI_DMA_TODEVICE);
|
|
||||||
- if (pci_dma_mapping_error(pcie_priv->pdev, dma)) {
|
|
||||||
+ dma = dma_map_single(&pcie_priv->pdev->dev, tx_skb->data,
|
|
||||||
+ tx_skb->len, DMA_TO_DEVICE);
|
|
||||||
+ if (dma_mapping_error(&pcie_priv->pdev->dev, dma)) {
|
|
||||||
dev_kfree_skb_any(tx_skb);
|
|
||||||
wiphy_err(priv->hw->wiphy,
|
|
||||||
"failed to map pci memory!\n");
|
|
||||||
@@ -450,10 +450,10 @@ void pcie_tx_done_ndp(struct ieee80211_hw *hw)
|
|
||||||
"buffer is NULL for tx done ring\n");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
- pci_unmap_single(pcie_priv->pdev,
|
|
||||||
+ dma_unmap_single(&pcie_priv->pdev->dev,
|
|
||||||
desc->pphys_tx_buflist[index],
|
|
||||||
skb->len,
|
|
||||||
- PCI_DMA_TODEVICE);
|
|
||||||
+ DMA_TO_DEVICE);
|
|
||||||
desc->pphys_tx_buflist[index] = 0;
|
|
||||||
desc->tx_vbuflist[index] = NULL;
|
|
||||||
|
|
||||||
@@ -555,7 +555,7 @@ void pcie_tx_xmit_ndp(struct ieee80211_hw *hw,
|
|
||||||
WLAN_ACTION_ADDBA_REQ)) {
|
|
||||||
capab = le16_to_cpu(mgmt->u.action.u.addba_req.capab);
|
|
||||||
tid = (capab & IEEE80211_ADDBA_PARAM_TID_MASK) >> 2;
|
|
||||||
- index = utils_tid_to_ac(tid);
|
|
||||||
+ index = TID_TO_WME_AC(tid);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(ieee80211_is_assoc_req(wh->frame_control)))
|
|
||||||
diff --git a/utils.h b/utils.h
|
|
||||||
index 4a292e9..519d451 100644
|
|
||||||
--- a/utils.h
|
|
||||||
+++ b/utils.h
|
|
||||||
@@ -33,27 +33,11 @@
|
|
||||||
#define DHCPRELEASE 7
|
|
||||||
#define DHCPINFORM 8
|
|
||||||
|
|
||||||
-static inline int utils_tid_to_ac(u8 tid)
|
|
||||||
-{
|
|
||||||
- switch (tid) {
|
|
||||||
- case 0:
|
|
||||||
- case 3:
|
|
||||||
- return IEEE80211_AC_BE;
|
|
||||||
- case 1:
|
|
||||||
- case 2:
|
|
||||||
- return IEEE80211_AC_BK;
|
|
||||||
- case 4:
|
|
||||||
- case 5:
|
|
||||||
- return IEEE80211_AC_VI;
|
|
||||||
- case 6:
|
|
||||||
- case 7:
|
|
||||||
- return IEEE80211_AC_VO;
|
|
||||||
- default:
|
|
||||||
- break;
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- return -1;
|
|
||||||
-}
|
|
||||||
+#define TID_TO_WME_AC(_tid) \
|
|
||||||
+ ((((_tid) == 0) || ((_tid) == 3)) ? IEEE80211_AC_BE : \
|
|
||||||
+ (((_tid) == 1) || ((_tid) == 2)) ? IEEE80211_AC_BK : \
|
|
||||||
+ (((_tid) == 4) || ((_tid) == 5)) ? IEEE80211_AC_VI : \
|
|
||||||
+ IEEE80211_AC_VO)
|
|
||||||
|
|
||||||
static inline void utils_add_basic_rates(int band, struct sk_buff *skb)
|
|
||||||
{
|
|
Loading…
Add table
Add a link
Reference in a new issue