On Feb 4, 2008 12:32 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > Tomas Winkler wrote: > > > I prefer not. This is not just plcp rate there is also MCS flags that > > have to passed. With all combinations the array will be huge. > > So you'd actually abuse the struct bitrate contents if you add the > bitrate? I prefer that wouldn't be done, it makes the code impossible to > follow. > > I guess we need to rework the rate control algorithm API completely. > No I won't we add rate flags which are part of spec anyway and then plcp rate it self will be in bitrate. num ieee80211_rate_flags { IEEE80211_RATE_SHORT_PREAMBLE = 1<<0, IEEE80211_RATE_MANDATORY_A = 1<<1, IEEE80211_RATE_MANDATORY_B = 1<<2, IEEE80211_RATE_MANDATORY_G = 1<<3, IEEE80211_RATE_ERP_G = 1<<4, IEEE80211_RATE_HT_GF = 1<<5, /* green field */ IEEE80211_RATE_HT_SGI = 1<<5, /* short guarding interval */ IEEE80211_RATE_HT_FAT = 1<<6, /* 40Mhz Channel */ IEEE80211_RATE_HT_SISO = 1<<7, IEEE80211_RATE_HT_MIMO = 1<<8, IEEE80211_RATE_ANT_A = 1<<8, /* Number of antenna - no radio goes over 3 so 4 will be enough */ IEEE80211_RATE_ANT_B = 1<<8, IEEE80211_RATE_ANT_C = 1<<8, IEEE80211_RATE_ANT_D = 1<<8, }; /** * struct ieee80211_rate - bitrate definition * * This structure describes a bitrate that an 802.11 PHY can * operate with. The two values @hw_value and @hw_value_short * are only for driver use when pointers to this structure are * passed around. * * @flags: rate-specific flags * @bitrate: bitrate in units of 100 Kbps * @hw_value: driver/hardware value for this rate * @hw_value_short: driver/hardware value for this rate when * short preamble is used */ struct ieee80211_rate { u32 flags; u16 bitrate; u16 hw_value, hw_value_short; }; > johannes > - 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