Commit 77d68147 authored by Igor Mitsyanko's avatar Igor Mitsyanko Committed by Kalle Valo

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: default avatarIgor Mitsyanko <igor.mitsyanko.os@quantenna.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 20db0733
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment