Lines Matching refs:ch_id

221 static int is_valid_channel(u16 ch_id)  in is_valid_channel()  argument
223 if (ch_id <= 14 || in is_valid_channel()
224 (36 <= ch_id && ch_id <= 64 && ch_id % 4 == 0) || in is_valid_channel()
225 (100 <= ch_id && ch_id <= 140 && ch_id % 4 == 0) || in is_valid_channel()
226 (145 <= ch_id && ch_id <= 165 && ch_id % 4 == 1)) in is_valid_channel()
231 static u8 ch_id_to_ch_index(u16 ch_id) in ch_id_to_ch_index() argument
233 if (WARN_ON(!is_valid_channel(ch_id))) in ch_id_to_ch_index()
236 if (ch_id <= 14) in ch_id_to_ch_index()
237 return ch_id - 1; in ch_id_to_ch_index()
238 if (ch_id <= 64) in ch_id_to_ch_index()
239 return (ch_id + 20) / 4; in ch_id_to_ch_index()
240 if (ch_id <= 140) in ch_id_to_ch_index()
241 return (ch_id - 12) / 4; in ch_id_to_ch_index()
242 return (ch_id - 13) / 4; in ch_id_to_ch_index()
246 static u16 channel_id_to_papd(u16 ch_id) in channel_id_to_papd() argument
248 if (WARN_ON(!is_valid_channel(ch_id))) in channel_id_to_papd()
251 if (1 <= ch_id && ch_id <= 14) in channel_id_to_papd()
253 if (36 <= ch_id && ch_id <= 64) in channel_id_to_papd()
255 if (100 <= ch_id && ch_id <= 140) in channel_id_to_papd()
260 static u16 channel_id_to_txp(struct iwl_phy_db *phy_db, u16 ch_id) in channel_id_to_txp() argument
264 u8 ch_index = ch_id_to_ch_index(ch_id); in channel_id_to_txp()
283 u32 type, u8 **data, u16 *size, u16 ch_id) in iwl_phy_db_get_section_data() argument
293 ch_group_id = channel_id_to_papd(ch_id); in iwl_phy_db_get_section_data()
295 ch_group_id = channel_id_to_txp(phy_db, ch_id); in iwl_phy_db_get_section_data()