Search Linux Wireless

Re: [PATCH] cfg80211: allow scanning on specified frequencies when using wext-compatibility

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

 



On Wed, 2009-09-09 at 13:09 +0200, Holger Schurig wrote:
> Handles the case when SIOCSIWSCAN specified iw_scan_req.num_channels and
> iw_scan_req.channels[].

> +
> +			/* If we have a wireless request structure and the
> +			 * wireless request specifies frequencies, then search
> +			 * for the matching hardware channel.
> +			 */
> +			if (wreq && wreq->num_channels) {
> +				int k;
> +				int wiphy_freq = wiphy->bands[band]->channels[j].center_freq;
> +				for (k = 0; k < wreq->num_channels; k++) {
> +					int wext_freq = wreq->channel_list[k].m / 100000;
> +					if (wext_freq == wiphy_freq)
> +						goto wext_freq_found;
> +				}
> +				goto wext_freq_not_found;

This is a bit weird -- this way you don't report errors if the user
specified frequencies that don't exist. Also, are you sure that it has
to be a frequency as opposed to a channel number?

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