Search Linux Wireless

Re: [PATCH v3 3/4] cfg80211: Accept multiple RSSI thresholds for CQM

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

 



> +	if (n_thresholds <= 1 && rdev->ops->set_cqm_rssi_config) {
> +		const s32 disable = 0;
> +
> +		if (n_thresholds == 0) {
> +			n_thresholds = 1;
> +			thresholds = &disable;
> +		}

This doesn't really make sense,

> +		return rdev_set_cqm_rssi_config(rdev, dev,
> +						thresholds[0],
> hysteresis);
> +	}

since you return immediately afterwards anyway, and don't even use the
n_thresholds?

Perhaps also removing the earlier "hysteresis = 0" part and
distinguishing here directly to call the function with different
arguments based on enable/disable would make sense.

> +		s32 *thresholds =
> nla_data(attrs[NL80211_ATTR_CQM_RSSI_THOLD]);

const?

johannes



[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