On 09/07/2012 05:40 PM, Johannes Berg wrote:
We don't have to do any calculation in kernel though as far as I can
tell? Maybe we do need the channel, but I think in terms of
*specifying*, in particular in the nl80211 and cfg80211 APIs, we should
stick to the standard if we're going to change it now.
struct ieee80211_channel_config {
enum ieee80211_chan_width chan_width;
u16 center_freq1;
u16 center_freq2;
u16 prim_chan_freq;
};
If we stick to standard, all u16 become u8, as their values range is
from 1-200. But these numbers have to be converted to freqKHz in
reg_chan_use_permitted() to find fits in reg rule or not?
Is that ok?
If so I have to use below formulas to get freqKHz.
Channel center frequency [MHz]
= Channel starting frequency + 5 x dot11CurrentChannelCenterFrequencyIndex
Primary 20 MHz channel center frequency [MHz]
= Channel starting frequency + 5 dot11CurrentPrimaryChannel
Thanks,
Mahesh
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html