Search Linux Wireless

Re: [PATCH V2 1/9] qtnfmac: use per-band HT/VHT info from wireless device

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

 



igor.mitsyanko.os@xxxxxxxxxxxxx writes:

> From: Igor Mitsyanko <igor.mitsyanko.os@xxxxxxxxxxxxx>
>
> HT/VHT capabilities must be reported per each band supported by a radio,
> not for all bands on a radio. Furthermore, driver better not assume
> any capabilities and just use whetever is reported by device itself.
>
> To support this, convert "get channels" command into "get band info"
> command. Difference is that it may also carry HT/VHT capabilities along
> with channels information.
>
> While at it, also add "num_bitrates" field to "get band info" command,
> for future use.
>
> Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@xxxxxxxxxxxxx>

[...]

> @@ -1241,13 +1273,32 @@ qtnf_cmd_resp_fill_channels_info(struct ieee80211_supported_band *band,
>  				 chan->hw_value, chan->flags, chan->max_power,
>  				 chan->max_reg_power);
>  			break;
> +		case WLAN_EID_HT_CAPABILITY:
> +			if (unlikely(tlv_dlen !=
> +				     sizeof(struct ieee80211_ht_cap))) {
> +				pr_err("bad HTCAP TLV len %zu\n", tlv_dlen);
> +				goto error_ret;
> +			}
> +
> +			qtnf_cmd_resp_band_fill_htcap(tlv->val, &band->ht_cap);
> +			break;
> +		case WLAN_EID_VHT_CAPABILITY:
> +			if (unlikely(tlv_dlen !=
> +				     sizeof(struct ieee80211_vht_cap))) {
> +				pr_err("bad VHTCAP TLV len %zu\n", tlv_dlen);
> +				goto error_ret;
> +			}
> +
> +			qtnf_cmd_resp_band_fill_vhtcap(tlv->val,
> +						       &band->vht_cap);
> +			break;

I'm having a hard time to believe that this in hotpath so the use of
unlikely() is not really making any sense to me. No need to resend
because of this, just looks strange and makes the code harder to read.

-- 
Kalle Valo



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

  Powered by Linux