[PATCH] ath10k: implement drv_get_tsf for ibss merging

Kalle Valo kvalo at qca.qualcomm.com
Thu Feb 13 14:13:35 EST 2014


Chun-Yeow Yeoh <yeohchunyeow at gmail.com> writes:

> Implement the get TSF by simply returning 0 so that IBSS
> merging is happening. Otherwise, IBSS nodes that have similar
> SSID naming won't merge. This is simply fooling the mac80211
> that the TSF in the received beacon is higher than the local TSF.
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow at gmail.com>

Yeah, this extremely ugly but don't really know any better way to handle
this now.

> +static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
> +{
> +	struct ath10k *ar = hw->priv;
> +	u64 tsf;
> +
> +	mutex_lock(&ar->conf_mutex);
> +	/* FIXME: Return 0 for time being. Need to figure out whether FW has
> +	 * the API to fetch 64-bit TSF
> +	 */
> +	tsf = 0;
> +	mutex_unlock(&ar->conf_mutex);
> +
> +	return tsf;
> +}

But why do you need to take conf_mutex? Isn't this enough:

+static u64 ath10k_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+{
+       /*
+        * FIXME: Return 0 for time being. Need to figure out whether FW
+        * has the API to fetch 64-bit TSF
+        */
+
+       return 0;
+}

-- 
Kalle Valo



More information about the ath10k mailing list