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