Lines Matching refs:mss_hdr

234 			      const struct rtw89_fw_mss_pool_hdr *mss_hdr,  in __get_mssc_key_idx()  argument
244 if (!mss_hdr->defen) in __get_mssc_key_idx()
247 mss_sel_idx = sec->mss_cust_idx * le16_to_cpu(mss_hdr->msskey_num_max) + in __get_mssc_key_idx()
250 if (mss_hdr->defen) in __get_mssc_key_idx()
254 mss_sel_idx += sec->mss_dev_type * le16_to_cpu(mss_hdr->msskey_num_max) * in __get_mssc_key_idx()
255 le16_to_cpu(mss_hdr->msscust_max) + in __get_mssc_key_idx()
256 sec->mss_cust_idx * le16_to_cpu(mss_hdr->msskey_num_max) + in __get_mssc_key_idx()
266 if (!(mss_hdr->rmp_tbl[sel_byte_idx] & BIT(sel_bit_idx))) in __get_mssc_key_idx()
269 *key_idx = hweight8(mss_hdr->rmp_tbl[sel_byte_idx] & (BIT(sel_bit_idx) - 1)); in __get_mssc_key_idx()
272 *key_idx += hweight8(mss_hdr->rmp_tbl[i]); in __get_mssc_key_idx()
283 const struct rtw89_fw_mss_pool_hdr *mss_hdr = content + section_info->len; in __parse_formatted_mssc() local
292 if (memcmp(mss_signature, mss_hdr->signature, sizeof(mss_signature)) != 0) { in __parse_formatted_mssc()
297 if (mss_hdr->rmpfmt == MSS_POOL_RMP_TBL_BITMASK) { in __parse_formatted_mssc()
298 rmp_tbl_size = (le16_to_cpu(mss_hdr->msskey_num_max) * in __parse_formatted_mssc()
299 le16_to_cpu(mss_hdr->msscust_max) * in __parse_formatted_mssc()
300 mss_hdr->mssdev_max) >> 3; in __parse_formatted_mssc()
301 if (mss_hdr->defen) in __parse_formatted_mssc()
305 mss_hdr->rmpfmt); in __parse_formatted_mssc()
309 if (rmp_tbl_size + sizeof(*mss_hdr) != le32_to_cpu(mss_hdr->key_raw_offset)) { in __parse_formatted_mssc()
311 rmp_tbl_size, (int)sizeof(*mss_hdr), in __parse_formatted_mssc()
312 le32_to_cpu(mss_hdr->key_raw_offset)); in __parse_formatted_mssc()
323 *mssc_len = sizeof(*mss_hdr) + rmp_tbl_size + in __parse_formatted_mssc()
324 le16_to_cpu(mss_hdr->keypair_num) * key_sign_len; in __parse_formatted_mssc()
333 ret = __get_mssc_key_idx(rtwdev, mss_hdr, rmp_tbl_size, &real_key_idx); in __parse_formatted_mssc()
338 le32_to_cpu(mss_hdr->key_raw_offset) + in __parse_formatted_mssc()