Commit 5a2a828d authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'wireless-drivers-for-davem-2019-09-26' of...

Merge tag 'wireless-drivers-for-davem-2019-09-26' of https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers



Kalle Valo says:

====================
wireless-drivers fixes for 5.4

First set of fixes for 5.4 sent during the merge window. Most are
regressions fixes but the mt7615 problem has been since it was merged.

iwlwifi

* fix a build regression related CONFIG_THERMAL

* avoid using GEO_TX_POWER_LIMIT command on certain firmware versions

rtw88

* fixes for skb leaks

zd1211rw

* fix a compiler warning on 32 bit

mt76

* fix the firmware paths for mt7615 to match with linux-firmware

wil6210

* fix use of skb after free
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ca7a03c4 2b481835
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1012,11 +1012,11 @@ void wil_netif_rx_any(struct sk_buff *skb, struct net_device *ndev)
	skb_orphan(skb);

	if (security && (wil->txrx_ops.rx_crypto_check(wil, skb) != 0)) {
		wil_dbg_txrx(wil, "Rx drop %d bytes\n", skb->len);
		dev_kfree_skb(skb);
		ndev->stats.rx_dropped++;
		stats->rx_replay++;
		stats->rx_dropped++;
		wil_dbg_txrx(wil, "Rx drop %d bytes\n", skb->len);
		return;
	}

+5 −3
Original line number Diff line number Diff line
@@ -889,11 +889,13 @@ static bool iwl_mvm_sar_geo_support(struct iwl_mvm *mvm)
	 * 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.  This was implemented
	 * initially on version 38 and then backported to 36, 29 and
	 * 17.
	 * initially on version 38 and then backported to29 and 17.
	 * The intention was to have it in 36 as well, but not all
	 * 8000 family got this feature enabled.  The 8000 family is
	 * the only one using version 36, so skip this version
	 * entirely.
	 */
	return IWL_UCODE_SERIAL(mvm->fw->ucode_ver) >= 38 ||
	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 36 ||
	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 29 ||
	       IWL_UCODE_SERIAL(mvm->fw->ucode_ver) == 17;
}
+7 −2
Original line number Diff line number Diff line
@@ -555,16 +555,19 @@ static int compare_temps(const void *a, const void *b)
	return ((s16)le16_to_cpu(*(__le16 *)a) -
		(s16)le16_to_cpu(*(__le16 *)b));
}
#endif

int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)
{
	struct temp_report_ths_cmd cmd = {0};
	int ret, i, j, idx = 0;
	int ret;
#ifdef CONFIG_THERMAL
	int i, j, idx = 0;

	lockdep_assert_held(&mvm->mutex);

	if (!mvm->tz_device.tzone)
		return -EINVAL;
		goto send;

	/* The driver holds array of temperature trips that are unsorted
	 * and uncompressed, the FW should get it compressed and sorted
@@ -597,6 +600,7 @@ int iwl_mvm_send_temp_report_ths_cmd(struct iwl_mvm *mvm)
	}

send:
#endif
	ret = iwl_mvm_send_cmd_pdu(mvm, WIDE_ID(PHY_OPS_GROUP,
						TEMP_REPORTING_THRESHOLDS_CMD),
				   0, sizeof(cmd), &cmd);
@@ -607,6 +611,7 @@ send:
	return ret;
}

#ifdef CONFIG_THERMAL
static int iwl_mvm_tzone_get_temp(struct thermal_zone_device *device,
				  int *temperature)
{
+4 −7
Original line number Diff line number Diff line
@@ -333,7 +333,6 @@ static int mt7615_driver_own(struct mt7615_dev *dev)

static int mt7615_load_patch(struct mt7615_dev *dev)
{
	const char *firmware = MT7615_ROM_PATCH;
	const struct mt7615_patch_hdr *hdr;
	const struct firmware *fw = NULL;
	int len, ret, sem;
@@ -349,7 +348,7 @@ static int mt7615_load_patch(struct mt7615_dev *dev)
		return -EAGAIN;
	}

	ret = request_firmware(&fw, firmware, dev->mt76.dev);
	ret = request_firmware(&fw, MT7615_ROM_PATCH, dev->mt76.dev);
	if (ret)
		goto out;

@@ -447,13 +446,11 @@ mt7615_mcu_send_ram_firmware(struct mt7615_dev *dev,

static int mt7615_load_ram(struct mt7615_dev *dev)
{
	const struct firmware *fw;
	const struct mt7615_fw_trailer *hdr;
	const char *n9_firmware = MT7615_FIRMWARE_N9;
	const char *cr4_firmware = MT7615_FIRMWARE_CR4;
	const struct firmware *fw;
	int ret;

	ret = request_firmware(&fw, n9_firmware, dev->mt76.dev);
	ret = request_firmware(&fw, MT7615_FIRMWARE_N9, dev->mt76.dev);
	if (ret)
		return ret;

@@ -482,7 +479,7 @@ static int mt7615_load_ram(struct mt7615_dev *dev)

	release_firmware(fw);

	ret = request_firmware(&fw, cr4_firmware, dev->mt76.dev);
	ret = request_firmware(&fw, MT7615_FIRMWARE_CR4, dev->mt76.dev);
	if (ret)
		return ret;

+3 −3
Original line number Diff line number Diff line
@@ -26,9 +26,9 @@
#define MT7615_RX_RING_SIZE		1024
#define MT7615_RX_MCU_RING_SIZE		512

#define MT7615_FIRMWARE_CR4		"mt7615_cr4.bin"
#define MT7615_FIRMWARE_N9		"mt7615_n9.bin"
#define MT7615_ROM_PATCH		"mt7615_rom_patch.bin"
#define MT7615_FIRMWARE_CR4		"mediatek/mt7615_cr4.bin"
#define MT7615_FIRMWARE_N9		"mediatek/mt7615_n9.bin"
#define MT7615_ROM_PATCH		"mediatek/mt7615_rom_patch.bin"

#define MT7615_EEPROM_SIZE		1024
#define MT7615_TOKEN_SIZE		4096
Loading