Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Merge tag 'wireless-drivers-for-davem-2018-12-19' of git://git.kernel…
Browse files Browse the repository at this point in the history
….org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
wireless-drivers fixes for 4.20

Last set of fixes for 4.20. All (except the mt76 fix) of these are
important fixes to user reported problems and pretty small in size.

rtlwifi

* fix skb leak

mwifiex

* revert a commit from v4.19 due to problems with locking

mt76

* fix a potential NULL derenfence

* add entry to MAINTAINERS

iwlwifi

* fix a firmware crash which was a regression introduced in v4.20-rc4

ath10k

* fix a firmware crash with wcn3990 firmware
====================

Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
davem330 committed Dec 19, 2018
2 parents 49ce708 + 5388457 commit c6f4075
Show file tree
Hide file tree
Showing 12 changed files with 118 additions and 56 deletions.
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -9443,6 +9443,13 @@ F: drivers/media/platform/mtk-vpu/
F: Documentation/devicetree/bindings/media/mediatek-vcodec.txt
F: Documentation/devicetree/bindings/media/mediatek-vpu.txt

MEDIATEK MT76 WIRELESS LAN DRIVER
M: Felix Fietkau <[email protected]>
M: Lorenzo Bianconi <[email protected]>
L: [email protected]
S: Maintained
F: drivers/net/wireless/mediatek/mt76/

MEDIATEK MT7601U WIRELESS LAN DRIVER
M: Jakub Kicinski <[email protected]>
L: [email protected]
Expand Down
28 changes: 28 additions & 0 deletions drivers/net/wireless/ath/ath10k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2418,6 +2418,28 @@ static int ath10k_core_reset_rx_filter(struct ath10k *ar)
return 0;
}

static int ath10k_core_compat_services(struct ath10k *ar)
{
struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file;

/* all 10.x firmware versions support thermal throttling but don't
* advertise the support via service flags so we have to hardcode
* it here
*/
switch (fw_file->wmi_op_version) {
case ATH10K_FW_WMI_OP_VERSION_10_1:
case ATH10K_FW_WMI_OP_VERSION_10_2:
case ATH10K_FW_WMI_OP_VERSION_10_2_4:
case ATH10K_FW_WMI_OP_VERSION_10_4:
set_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map);
break;
default:
break;
}

return 0;
}

int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
const struct ath10k_fw_components *fw)
{
Expand Down Expand Up @@ -2617,6 +2639,12 @@ int ath10k_core_start(struct ath10k *ar, enum ath10k_firmware_mode mode,
goto err_hif_stop;
}

status = ath10k_core_compat_services(ar);
if (status) {
ath10k_err(ar, "compat services failed: %d\n", status);
goto err_hif_stop;
}

/* Some firmware revisions do not properly set up hardware rx filter
* registers.
*
Expand Down
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath10k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -2578,8 +2578,9 @@ int ath10k_debug_register(struct ath10k *ar)
debugfs_create_file("pktlog_filter", 0644, ar->debug.debugfs_phy, ar,
&fops_pktlog_filter);

debugfs_create_file("quiet_period", 0644, ar->debug.debugfs_phy, ar,
&fops_quiet_period);
if (test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
debugfs_create_file("quiet_period", 0644, ar->debug.debugfs_phy, ar,
&fops_quiet_period);

debugfs_create_file("tpc_stats", 0400, ar->debug.debugfs_phy, ar,
&fops_tpc_stats);
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/wireless/ath/ath10k/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ void ath10k_thermal_set_throttling(struct ath10k *ar)

lockdep_assert_held(&ar->conf_mutex);

if (!test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
return;

if (!ar->wmi.ops->gen_pdev_set_quiet_mode)
return;

Expand All @@ -165,6 +168,9 @@ int ath10k_thermal_register(struct ath10k *ar)
struct device *hwmon_dev;
int ret;

if (!test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
return 0;

cdev = thermal_cooling_device_register("ath10k_thermal", ar,
&ath10k_thermal_ops);

Expand Down Expand Up @@ -216,6 +222,9 @@ int ath10k_thermal_register(struct ath10k *ar)

void ath10k_thermal_unregister(struct ath10k *ar)
{
if (!test_bit(WMI_SERVICE_THERM_THROT, ar->wmi.svc_map))
return;

sysfs_remove_link(&ar->dev->kobj, "cooling_device");
thermal_cooling_device_unregister(ar->thermal.cdev);
}
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath10k/wmi-tlv.h
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,9 @@ wmi_tlv_svc_map_ext(const __le32 *in, unsigned long *out, size_t len)
SVCMAP(WMI_TLV_SERVICE_SPOOF_MAC_SUPPORT,
WMI_SERVICE_SPOOF_MAC_SUPPORT,
WMI_TLV_MAX_SERVICE);
SVCMAP(WMI_TLV_SERVICE_THERM_THROT,
WMI_SERVICE_THERM_THROT,
WMI_TLV_MAX_SERVICE);
}

#undef SVCMAP
Expand Down
1 change: 1 addition & 0 deletions drivers/net/wireless/ath/ath10k/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ enum wmi_service {
WMI_SERVICE_SPOOF_MAC_SUPPORT,
WMI_SERVICE_TX_DATA_ACK_RSSI,
WMI_SERVICE_VDEV_DIFFERENT_BEACON_INTERVAL_SUPPORT,
WMI_SERVICE_THERM_THROT,

/* keep last */
WMI_SERVICE_MAX,
Expand Down
9 changes: 9 additions & 0 deletions drivers/net/wireless/intel/iwlwifi/mvm/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -881,6 +881,15 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm)
int ret, i, j;
u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT);

/*
* This command is not supported on earlier firmware versions.
* Unfortunately, we don't have a TLV API flag to rely on, so
* rely on the major version which is in the first byte of
* ucode_ver.
*/
if (IWL_UCODE_SERIAL(mvm->fw->ucode_ver) < 41)
return 0;

ret = iwl_mvm_sar_get_wgds_table(mvm);
if (ret < 0) {
IWL_DEBUG_RADIO(mvm,
Expand Down
5 changes: 2 additions & 3 deletions drivers/net/wireless/marvell/mwifiex/11n.c
Original file line number Diff line number Diff line change
Expand Up @@ -696,11 +696,10 @@ void mwifiex_11n_delba(struct mwifiex_private *priv, int tid)
"Send delba to tid=%d, %pM\n",
tid, rx_reor_tbl_ptr->ta);
mwifiex_send_delba(priv, tid, rx_reor_tbl_ptr->ta, 0);
spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock,
flags);
return;
goto exit;
}
}
exit:
spin_unlock_irqrestore(&priv->rx_reorder_tbl_lock, flags);
}

Expand Down
Loading

0 comments on commit c6f4075

Please sign in to comment.