Search Linux Wireless

Re: [PATCH v3 6/6] ath11k: support GTK rekey offload

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

 



Carl Huang <quic_cjhuang@xxxxxxxxxxx> writes:

> Host sets GTK related info to firmware before WoW is enabled, and
> gets rekey replay_count and then disables GTK rekey when WoW quits.
>
> Tested-on: QCA6390 hw2.0 PCI WLAN.HST.1.0.1-01740-QCAHSTSWPLZ_V2_TO_X86-1
>
> Signed-off-by: Carl Huang <quic_cjhuang@xxxxxxxxxxx>

[...]

> +static void ath11k_mac_op_set_rekey_data(struct ieee80211_hw *hw,
> +					 struct ieee80211_vif *vif,
> +					 struct cfg80211_gtk_rekey_data *data)
> +{
> +	struct ath11k *ar = hw->priv;
> +	struct ath11k_vif *arvif = ath11k_vif_to_arvif(vif);
> +	struct ath11k_rekey_data *rekey_data = &arvif->rekey_data;
> +
> +	ath11k_dbg(ar->ab, ATH11K_DBG_MAC, "Set rekey data vdev_id %d\n",
> +		   arvif->vdev_id);
> +	mutex_lock(&ar->conf_mutex);
> +
> +	memcpy(rekey_data->kck, data->kck, NL80211_KCK_LEN);
> +	memcpy(rekey_data->kek, data->kek, NL80211_KEK_LEN);
> +
> +	/* supplicant works on big-endian, converts to cpu-endian */
> +	rekey_data->replay_ctr = be64_to_cpu(get_unaligned((u64 *)data->replay_ctr));

This has a warning:

drivers/net/wireless/ath/ath11k/mac.c:8219:34: warning: cast to restricted __be64

In the pending branch I changed this to:

	/* The supplicant works on big-endian, the firmware expects it on
	 * little endian.
	 */
	rekey_data->replay_ctr = get_unaligned_be64(data->replay_ctr);

-- 
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