Commit a0929621 authored by Kalle Valo's avatar Kalle Valo
Browse files
ath.git patches for v5.15. Major changes:

wcn36xx

* allow firmware name to be overridden by DT
parents 50cbbfd4 fd6729ec
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2504,8 +2504,10 @@ static int ath6kl_wmi_sync_point(struct wmi *wmi, u8 if_idx)
		goto free_data_skb;

	for (index = 0; index < num_pri_streams; index++) {
		if (WARN_ON(!data_sync_bufs[index].skb))
		if (WARN_ON(!data_sync_bufs[index].skb)) {
			ret = -ENOMEM;
			goto free_data_skb;
		}

		ep_id = ath6kl_ac2_endpoint_id(wmi->parent_dev,
					       data_sync_bufs[index].
+2 −1
Original line number Diff line number Diff line
@@ -3351,7 +3351,8 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
			"Found block at %x: code=%d ref=%d length=%d major=%d minor=%d\n",
			cptr, code, reference, length, major, minor);
		if ((!AR_SREV_9485(ah) && length >= 1024) ||
		    (AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485)) {
		    (AR_SREV_9485(ah) && length > EEPROM_DATA_LEN_9485) ||
		    (length > cptr)) {
			ath_dbg(common, EEPROM, "Skipping bad header\n");
			cptr -= COMP_HDR_LEN;
			continue;
+7 −5
Original line number Diff line number Diff line
@@ -1621,7 +1621,6 @@ static void ath9k_hw_apply_gpio_override(struct ath_hw *ah)
		ath9k_hw_gpio_request_out(ah, i, NULL,
					  AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
		ath9k_hw_set_gpio(ah, i, !!(ah->gpio_val & BIT(i)));
		ath9k_hw_gpio_free(ah, i);
	}
}

@@ -2728,14 +2727,17 @@ static void ath9k_hw_gpio_cfg_output_mux(struct ath_hw *ah, u32 gpio, u32 type)
static void ath9k_hw_gpio_cfg_soc(struct ath_hw *ah, u32 gpio, bool out,
				  const char *label)
{
	int err;

	if (ah->caps.gpio_requested & BIT(gpio))
		return;

	/* may be requested by BSP, free anyway */
	gpio_free(gpio);

	if (gpio_request_one(gpio, out ? GPIOF_OUT_INIT_LOW : GPIOF_IN, label))
	err = gpio_request_one(gpio, out ? GPIOF_OUT_INIT_LOW : GPIOF_IN, label);
	if (err) {
		ath_err(ath9k_hw_common(ah), "request GPIO%d failed:%d\n",
			gpio, err);
		return;
	}

	ah->caps.gpio_requested |= BIT(gpio);
}
+11 −1
Original line number Diff line number Diff line
@@ -408,13 +408,14 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
		wcn36xx_dbg(WCN36XX_DBG_MAC, "wcn36xx_config channel switch=%d\n",
			    ch);

		if (wcn->sw_scan_opchannel == ch) {
		if (wcn->sw_scan_opchannel == ch && wcn->sw_scan_channel) {
			/* If channel is the initial operating channel, we may
			 * want to receive/transmit regular data packets, then
			 * simply stop the scan session and exit PS mode.
			 */
			wcn36xx_smd_finish_scan(wcn, HAL_SYS_MODE_SCAN,
						wcn->sw_scan_vif);
			wcn->sw_scan_channel = 0;
		} else if (wcn->sw_scan) {
			/* A scan is ongoing, do not change the operating
			 * channel, but start a scan session on the channel.
@@ -422,6 +423,7 @@ static int wcn36xx_config(struct ieee80211_hw *hw, u32 changed)
			wcn36xx_smd_init_scan(wcn, HAL_SYS_MODE_SCAN,
					      wcn->sw_scan_vif);
			wcn36xx_smd_start_scan(wcn, ch);
			wcn->sw_scan_channel = ch;
		} else {
			wcn36xx_change_opchannel(wcn, ch);
		}
@@ -702,6 +704,7 @@ static void wcn36xx_sw_scan_start(struct ieee80211_hw *hw,

	wcn->sw_scan = true;
	wcn->sw_scan_vif = vif;
	wcn->sw_scan_channel = 0;
	if (vif_priv->sta_assoc)
		wcn->sw_scan_opchannel = WCN36XX_HW_CHANNEL(wcn);
	else
@@ -1500,6 +1503,13 @@ static int wcn36xx_probe(struct platform_device *pdev)
		goto out_wq;
	}

	wcn->nv_file = WLAN_NV_FILE;
	ret = of_property_read_string(wcn->dev->parent->of_node, "firmware-name", &wcn->nv_file);
	if (ret < 0 && ret != -EINVAL) {
		wcn36xx_err("failed to read \"firmware-name\" property: %d\n", ret);
		goto out_wq;
	}

	wcn->smd_channel = qcom_wcnss_open_channel(wcnss, "WLAN_CTRL", wcn36xx_smd_rsp_process, hw);
	if (IS_ERR(wcn->smd_channel)) {
		wcn36xx_err("failed to open WLAN_CTRL channel\n");
+2 −2
Original line number Diff line number Diff line
@@ -504,10 +504,10 @@ int wcn36xx_smd_load_nv(struct wcn36xx *wcn)
	u16 fm_offset = 0;

	if (!wcn->nv) {
		ret = request_firmware(&wcn->nv, WLAN_NV_FILE, wcn->dev);
		ret = request_firmware(&wcn->nv, wcn->nv_file, wcn->dev);
		if (ret) {
			wcn36xx_err("Failed to load nv file %s: %d\n",
				      WLAN_NV_FILE, ret);
				    wcn->nv_file, ret);
			goto out;
		}
	}
Loading