On Wed, Jun 05, 2013 at 06:53:32AM -0700, Arend van Spriel wrote: [...] > > + freq = cfg->channel; > > + if (chan) > > + freq = chan->center_freq; > > + chan_nr = ieee80211_frequency_to_channel(freq); > > Could you get rid of 'freq' variable and use > ieee80211_frequency_to_channel() on cfg->channel or chan->center_freq. > I tried that, but the line indented below the if would be longer than 80 chars and breaking it is quite ugly. > Another thing is that cfg->channel can be zero resulting in chan_nr > being zero. I had a quick look whether the device firmware can handle > this. I suspect not, but I will need to ask to be sure. > ok. But when cfg->channel is zero, where is the current freq stored? Regards, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara