qtnfmac: convert channel width from bitfiled to simple enum
This will allow to use qlink channel width values to specify BW setting corresponding to enum nl80211_chan_width. Current user is converted to apply BIT() macro manually to each individual qlink_channel_width enumeration value. Signed-off-by: Igor Mitsyanko <igor.mitsyanko.os@quantenna.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
20db073327
commit
77d6814774
|
@ -108,14 +108,14 @@ enum qlink_sta_flags {
|
|||
};
|
||||
|
||||
enum qlink_channel_width {
|
||||
QLINK_CHAN_WIDTH_5 = BIT(0),
|
||||
QLINK_CHAN_WIDTH_10 = BIT(1),
|
||||
QLINK_CHAN_WIDTH_20_NOHT = BIT(2),
|
||||
QLINK_CHAN_WIDTH_20 = BIT(3),
|
||||
QLINK_CHAN_WIDTH_40 = BIT(4),
|
||||
QLINK_CHAN_WIDTH_80 = BIT(5),
|
||||
QLINK_CHAN_WIDTH_80P80 = BIT(6),
|
||||
QLINK_CHAN_WIDTH_160 = BIT(7),
|
||||
QLINK_CHAN_WIDTH_5 = 0,
|
||||
QLINK_CHAN_WIDTH_10,
|
||||
QLINK_CHAN_WIDTH_20_NOHT,
|
||||
QLINK_CHAN_WIDTH_20,
|
||||
QLINK_CHAN_WIDTH_40,
|
||||
QLINK_CHAN_WIDTH_80,
|
||||
QLINK_CHAN_WIDTH_80P80,
|
||||
QLINK_CHAN_WIDTH_160,
|
||||
};
|
||||
|
||||
/* QLINK Command messages related definitions
|
||||
|
|
|
@ -49,28 +49,28 @@ u8 qlink_chan_width_mask_to_nl(u16 qlink_mask)
|
|||
{
|
||||
u8 result = 0;
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_5)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_5))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_5);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_10)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_10))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_10);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_20_NOHT)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_20_NOHT))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_20_NOHT);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_20)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_20))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_20);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_40)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_40))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_40);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_80)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_80))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_80);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_80P80)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_80P80))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_80P80);
|
||||
|
||||
if (qlink_mask & QLINK_CHAN_WIDTH_160)
|
||||
if (qlink_mask & BIT(QLINK_CHAN_WIDTH_160))
|
||||
result |= BIT(NL80211_CHAN_WIDTH_160);
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Reference in New Issue