Search Linux Wireless

Re: [PATCH v2] mac80211: mesh: Add support for HW RC implementation

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

 



> +void sta_get_expected_throughput(struct sta_info *sta, u32 *thr)
> +{
> +	struct ieee80211_sub_if_data *sdata = sta->sdata;
> +	struct ieee80211_local *local = sdata->local;
> +	struct rate_control_ref *ref = NULL;
> +
> +	if (test_sta_flag(sta, WLAN_STA_RATE_CONTROL))
> +		ref = local->rate_ctrl;
> +
> +	/* check if the driver has a SW RC implementation */
> +	if (ref && ref->ops->get_expected_throughput)
> +		*thr = ref->ops->get_expected_throughput(sta-
> >rate_ctrl_priv);
> +	else
> +		*thr = drv_get_expected_throughput(local, &sta-
> >sta);
> +}

I don't really see a reason for the function to take a u32 *thr, rather
than return u32? Would be clearer, IMHO, to just return the value.

Then in the user, it seems that you shouldn't use "rate" as the
variable that gets this result?

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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