Search Linux Wireless

Re: [PATCH 3/5] wifi: rtw89: configure TX path via H2C command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ping-Ke Shih <pkshih@xxxxxxxxxxx> writes:

> In order to support TX diversity, add a function to control TX path.
>
> Signed-off-by: Ping-Ke Shih <pkshih@xxxxxxxxxxx>

[...]

> +int rtw89_fw_h2c_txpath_cmac_tbl(struct rtw89_dev *rtwdev,
> +				 struct rtw89_sta *rtwsta)
> +{
> +	const struct rtw89_chip_info *chip = rtwdev->chip;
> +	struct sk_buff *skb;
> +
> +	if (chip->h2c_cctl_func_id != H2C_FUNC_MAC_CCTLINFO_UD)
> +		return 0;
> +
> +	skb = rtw89_fw_h2c_alloc_skb_with_hdr(rtwdev, H2C_CMC_TBL_LEN);
> +	if (!skb) {
> +		rtw89_err(rtwdev, "failed to alloc skb for fw dl\n");
> +		return -ENOMEM;
> +	}
> +	skb_put(skb, H2C_CMC_TBL_LEN);
> +	SET_CTRL_INFO_MACID(skb->data, rtwsta->mac_id);
> +	SET_CTRL_INFO_OPERATION(skb->data, 1);
> +
> +	__rtw89_fw_h2c_set_tx_path(rtwdev, skb);
> +
> +	rtw89_h2c_pkt_set_hdr(rtwdev, skb, FWCMD_TYPE_H2C,
> +			      H2C_CAT_MAC, H2C_CL_MAC_FR_EXCHG,
> +			      H2C_FUNC_MAC_CCTLINFO_UD, 0, 1,
> +			      H2C_CMC_TBL_LEN);
> +
> +	if (rtw89_h2c_tx(rtwdev, skb, false)) {
> +		rtw89_err(rtwdev, "failed to send h2c\n");
> +		goto fail;
> +	}

Please add a separate ret variable:

ret = rtw89_h2c_tx(rtwdev, skb, false);
if (ret) {
	rtw89_err(rtwdev, "failed to send h2c: %d\n", ret);
	goto fail;
}

> +
> +	return 0;
> +fail:
> +	dev_kfree_skb_any(skb);
> +
> +	return -EBUSY;

return ret;

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux