Search Linux Wireless

Re: [PATCH v3 1/8] mac80211: clean up rate selection

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

 



> +static inline int
> +rate_lowest_index(struct ieee80211_local *local, struct ieee80211_hw_mode *mode,
> +		  struct sta_info *sta)
> +{
> +	int i;
> +
> +	for (i = 0; i < mode->num_rates; i++) {
> +		if (rate_supported(sta, mode, i))
> +			return i;
> +	}
> +
> +	/* warn when we cannot find a rate. */
> +	WARN_ON(i == 0);
> +
> +	return 0;
> +}

That doesn't look right. Shouldn't it be WARN_ON(1)? Not that it can
ever happen with proper drivers...

Other than that, looks ok to me.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux