utils.c (d35d95ce8b0a548f3c7059cc0978819bcf2b4536) | utils.c (dc52fac37c874cfb909caf6bef34edf69503b979) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2021 Intel Corporation 4 * Copyright (C) 2013-2014 Intel Mobile Communications GmbH 5 * Copyright (C) 2015-2017 Intel Deutschland GmbH 6 */ 7#include <net/mac80211.h> 8 --- 121 unchanged lines hidden (view full) --- 130 .id = id, 131 .len = { len, }, 132 .data = { data, }, 133 }; 134 135 return iwl_mvm_send_cmd_status(mvm, &cmd, status); 136} 137 | 1// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause 2/* 3 * Copyright (C) 2012-2014, 2018-2021 Intel Corporation 4 * Copyright (C) 2013-2014 Intel Mobile Communications GmbH 5 * Copyright (C) 2015-2017 Intel Deutschland GmbH 6 */ 7#include <net/mac80211.h> 8 --- 121 unchanged lines hidden (view full) --- 130 .id = id, 131 .len = { len, }, 132 .data = { data, }, 133 }; 134 135 return iwl_mvm_send_cmd_status(mvm, &cmd, status); 136} 137 |
138int iwl_mvm_legacy_hw_idx_to_mac80211_idx(u32 rate_n_flags, 139 enum nl80211_band band) 140{ 141 int format = rate_n_flags & RATE_MCS_MOD_TYPE_MSK; 142 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK; 143 bool is_LB = band == NL80211_BAND_2GHZ; 144 145 if (format == RATE_MCS_LEGACY_OFDM_MSK) 146 return is_LB ? rate + IWL_FIRST_OFDM_RATE : 147 rate; 148 149 /* CCK is not allowed in HB */ 150 return is_LB ? rate : -1; 151} 152 |
|
138int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, 139 enum nl80211_band band) 140{ 141 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1; 142 int idx; 143 int band_offset = 0; 144 145 /* Legacy rate format, search for match in table */ --- 974 unchanged lines hidden --- | 153int iwl_mvm_legacy_rate_to_mac80211_idx(u32 rate_n_flags, 154 enum nl80211_band band) 155{ 156 int rate = rate_n_flags & RATE_LEGACY_RATE_MSK_V1; 157 int idx; 158 int band_offset = 0; 159 160 /* Legacy rate format, search for match in table */ --- 974 unchanged lines hidden --- |