提交 ef4394b9 编写于 作者: E Eliad Peller 提交者: Johannes Berg

iwlwifi: mvm: use designated initialization for some arrays

rs_ht_to_legacy and ant_toggle_lookup are arrays that
represent some state-machine. initialize them explicitly
with designated initialization to make them more clear
and avoid errors.
Signed-off-by: NEliad Peller <eliad@wizery.com>
Reviewed-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
上级 bd3351ba
......@@ -56,24 +56,30 @@
#define IWL_RATE_SCALE_FLUSH_INTVL (3*HZ)
static u8 rs_ht_to_legacy[] = {
IWL_RATE_6M_INDEX, IWL_RATE_6M_INDEX,
IWL_RATE_6M_INDEX, IWL_RATE_6M_INDEX,
IWL_RATE_6M_INDEX,
IWL_RATE_6M_INDEX, IWL_RATE_9M_INDEX,
IWL_RATE_12M_INDEX, IWL_RATE_18M_INDEX,
IWL_RATE_24M_INDEX, IWL_RATE_36M_INDEX,
IWL_RATE_48M_INDEX, IWL_RATE_54M_INDEX
[IWL_RATE_1M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_2M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_5M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_11M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_6M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_9M_INDEX] = IWL_RATE_6M_INDEX,
[IWL_RATE_12M_INDEX] = IWL_RATE_9M_INDEX,
[IWL_RATE_18M_INDEX] = IWL_RATE_12M_INDEX,
[IWL_RATE_24M_INDEX] = IWL_RATE_18M_INDEX,
[IWL_RATE_36M_INDEX] = IWL_RATE_24M_INDEX,
[IWL_RATE_48M_INDEX] = IWL_RATE_36M_INDEX,
[IWL_RATE_54M_INDEX] = IWL_RATE_48M_INDEX,
[IWL_RATE_60M_INDEX] = IWL_RATE_54M_INDEX,
};
static const u8 ant_toggle_lookup[] = {
/*ANT_NONE -> */ ANT_NONE,
/*ANT_A -> */ ANT_B,
/*ANT_B -> */ ANT_C,
/*ANT_AB -> */ ANT_BC,
/*ANT_C -> */ ANT_A,
/*ANT_AC -> */ ANT_AB,
/*ANT_BC -> */ ANT_AC,
/*ANT_ABC -> */ ANT_ABC,
[ANT_NONE] = ANT_NONE,
[ANT_A] = ANT_B,
[ANT_B] = ANT_C,
[ANT_AB] = ANT_BC,
[ANT_C] = ANT_A,
[ANT_AC] = ANT_AB,
[ANT_BC] = ANT_AC,
[ANT_ABC] = ANT_ABC,
};
#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册