Commit ef4394b9 authored by Eliad Peller's avatar Eliad Peller Committed by 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: default avatarEliad Peller <eliad@wizery.com>
Reviewed-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment