rs.c (6297fabd93f93182245383ba7de56bef829a796b) rs.c (82d2b9a62699f3d6a61323774c41cebe920e5dc5)
1/******************************************************************************
2 *
3 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
4 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
5 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of version 2 of the GNU General Public License as

--- 53 unchanged lines hidden (view full) ---

62 [IWL_RATE_MCS_7_INDEX] = IWL_RATE_54M_INDEX,
63 [IWL_RATE_MCS_8_INDEX] = IWL_RATE_54M_INDEX,
64 [IWL_RATE_MCS_9_INDEX] = IWL_RATE_54M_INDEX,
65};
66
67static const u8 ant_toggle_lookup[] = {
68 [ANT_NONE] = ANT_NONE,
69 [ANT_A] = ANT_B,
1/******************************************************************************
2 *
3 * Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
4 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
5 * Copyright(c) 2016 - 2017 Intel Deutschland GmbH
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of version 2 of the GNU General Public License as

--- 53 unchanged lines hidden (view full) ---

62 [IWL_RATE_MCS_7_INDEX] = IWL_RATE_54M_INDEX,
63 [IWL_RATE_MCS_8_INDEX] = IWL_RATE_54M_INDEX,
64 [IWL_RATE_MCS_9_INDEX] = IWL_RATE_54M_INDEX,
65};
66
67static const u8 ant_toggle_lookup[] = {
68 [ANT_NONE] = ANT_NONE,
69 [ANT_A] = ANT_B,
70 [ANT_B] = ANT_C,
71 [ANT_AB] = ANT_BC,
72 [ANT_C] = ANT_A,
73 [ANT_AC] = ANT_AB,
74 [ANT_BC] = ANT_AC,
75 [ANT_ABC] = ANT_ABC,
70 [ANT_B] = ANT_A,
71 [ANT_AB] = ANT_AB,
76};
77
78#define IWL_DECLARE_RATE_INFO(r, s, rp, rn) \
79 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
80 IWL_RATE_HT_SISO_MCS_##s##_PLCP, \
81 IWL_RATE_HT_MIMO2_MCS_##s##_PLCP, \
82 IWL_RATE_VHT_SISO_MCS_##s##_PLCP, \
83 IWL_RATE_VHT_MIMO2_MCS_##s##_PLCP,\

--- 886 unchanged lines hidden (view full) ---

970}
971
972/* switch to another antenna/antennas and return 1 */
973/* if no other valid antenna found, return 0 */
974static int rs_toggle_antenna(u32 valid_ant, struct rs_rate *rate)
975{
976 u8 new_ant_type;
977
72};
73
74#define IWL_DECLARE_RATE_INFO(r, s, rp, rn) \
75 [IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
76 IWL_RATE_HT_SISO_MCS_##s##_PLCP, \
77 IWL_RATE_HT_MIMO2_MCS_##s##_PLCP, \
78 IWL_RATE_VHT_SISO_MCS_##s##_PLCP, \
79 IWL_RATE_VHT_MIMO2_MCS_##s##_PLCP,\

--- 886 unchanged lines hidden (view full) ---

966}
967
968/* switch to another antenna/antennas and return 1 */
969/* if no other valid antenna found, return 0 */
970static int rs_toggle_antenna(u32 valid_ant, struct rs_rate *rate)
971{
972 u8 new_ant_type;
973
978 if (!rate->ant || rate->ant > ANT_ABC)
974 if (!rate->ant || WARN_ON_ONCE(rate->ant & ANT_C))
979 return 0;
980
981 if (!rs_is_valid_ant(valid_ant, rate->ant))
982 return 0;
983
984 new_ant_type = ant_toggle_lookup[rate->ant];
985
986 while ((new_ant_type != rate->ant) &&

--- 3103 unchanged lines hidden ---
975 return 0;
976
977 if (!rs_is_valid_ant(valid_ant, rate->ant))
978 return 0;
979
980 new_ant_type = ant_toggle_lookup[rate->ant];
981
982 while ((new_ant_type != rate->ant) &&

--- 3103 unchanged lines hidden ---