| /linux/drivers/net/wireless/intel/iwlwifi/mvm/ |
| H A D | fw.c | 36 static int iwl_send_tx_ant_cfg(struct iwl_mvm *mvm, u8 valid_tx_ant) in iwl_send_tx_ant_cfg() argument 42 IWL_DEBUG_FW(mvm, "select valid tx ant: %u\n", valid_tx_ant); in iwl_send_tx_ant_cfg() 43 return iwl_mvm_send_cmd_pdu(mvm, TX_ANT_CONFIGURATION_CMD, 0, in iwl_send_tx_ant_cfg() 47 static int iwl_send_rss_cfg_cmd(struct iwl_mvm *mvm) in iwl_send_rss_cfg_cmd() argument 60 if (mvm->trans->info.num_rxqs == 1) in iwl_send_rss_cfg_cmd() 66 1 + (i % (mvm->trans->info.num_rxqs - 1)); in iwl_send_rss_cfg_cmd() 69 return iwl_mvm_send_cmd_pdu(mvm, RSS_CONFIG_CMD, 0, sizeof(cmd), &cmd); in iwl_send_rss_cfg_cmd() 72 static int iwl_mvm_send_dqa_cmd(struct iwl_mvm *mvm) in iwl_mvm_send_dqa_cmd() argument 80 ret = iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0, sizeof(dqa_cmd), &dqa_cmd); in iwl_mvm_send_dqa_cmd() 82 IWL_ERR(mvm, "Failed to send DQA enabling command: %d\n", ret); in iwl_mvm_send_dqa_cmd() [all …]
|
| H A D | ptp.c | 23 static void iwl_mvm_ptp_update_new_read(struct iwl_mvm *mvm, u32 gp2) in iwl_mvm_ptp_update_new_read() argument 28 if (gp2 < mvm->ptp_data.last_gp2 && in iwl_mvm_ptp_update_new_read() 29 mvm->ptp_data.last_gp2 - gp2 < IWL_PTP_WRAP_THRESHOLD_USEC) { in iwl_mvm_ptp_update_new_read() 30 IWL_DEBUG_INFO(mvm, in iwl_mvm_ptp_update_new_read() 32 gp2, mvm->ptp_data.last_gp2); in iwl_mvm_ptp_update_new_read() 36 if (gp2 < mvm->ptp_data.last_gp2) { in iwl_mvm_ptp_update_new_read() 37 mvm->ptp_data.wrap_counter++; in iwl_mvm_ptp_update_new_read() 38 IWL_DEBUG_INFO(mvm, in iwl_mvm_ptp_update_new_read() 40 mvm->ptp_data.wrap_counter); in iwl_mvm_ptp_update_new_read() 43 mvm->ptp_data.last_gp2 = gp2; in iwl_mvm_ptp_update_new_read() [all …]
|
| H A D | mac80211.c | 106 static void iwl_mvm_reset_phy_ctxts(struct iwl_mvm *mvm) in iwl_mvm_reset_phy_ctxts() argument 110 memset(mvm->phy_ctxts, 0, sizeof(mvm->phy_ctxts)); in iwl_mvm_reset_phy_ctxts() 112 mvm->phy_ctxts[i].id = i; in iwl_mvm_reset_phy_ctxts() 113 mvm->phy_ctxts[i].ref = 0; in iwl_mvm_reset_phy_ctxts() 124 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); in iwl_mvm_get_regdomain() local 128 IWL_DEBUG_LAR(mvm, "Getting regdomain data for %s from FW\n", alpha2); in iwl_mvm_get_regdomain() 130 lockdep_assert_held(&mvm->mutex); in iwl_mvm_get_regdomain() 132 resp = iwl_mvm_update_mcc(mvm, alpha2, src_id); in iwl_mvm_get_regdomain() 134 IWL_DEBUG_LAR(mvm, "Could not get update from FW %d\n", in iwl_mvm_get_regdomain() 146 resp_ver = iwl_fw_lookup_notif_ver(mvm->fw, IWL_ALWAYS_LONG_GROUP, in iwl_mvm_get_regdomain() [all …]
|
| H A D | ops.c | 82 struct iwl_mvm *mvm = IWL_OP_MODE_GET_MVM(op_mode); in iwl_mvm_nic_config() local 85 u32 phy_config = iwl_mvm_get_phy_config(mvm); in iwl_mvm_nic_config() 94 IWL_DEBUG_INFO(mvm, "Radio type=0x%x-0x%x-0x%x\n", radio_cfg_type, in iwl_mvm_nic_config() 97 if (mvm->trans->mac_cfg->device_family >= IWL_DEVICE_FAMILY_AX210) in iwl_mvm_nic_config() 101 reg_val = CSR_HW_REV_STEP_DASH(mvm->trans->info.hw_rev); in iwl_mvm_nic_config() 119 if (mvm->trans->mac_cfg->device_family < IWL_DEVICE_FAMILY_8000) in iwl_mvm_nic_config() 122 if (iwl_fw_dbg_is_d3_debug_enabled(&mvm->fwrt)) in iwl_mvm_nic_config() 125 iwl_trans_set_bits_mask(mvm->trans, CSR_HW_IF_CONFIG_REG, in iwl_mvm_nic_config() 140 if (!mvm->trans->mac_cfg->base->apmg_not_supported) in iwl_mvm_nic_config() 141 iwl_set_bits_mask_prph(mvm->trans, APMG_PS_CTRL_REG, in iwl_mvm_nic_config() [all …]
|
| H A D | time-event.c | 25 void iwl_mvm_te_clear_data(struct iwl_mvm *mvm, in iwl_mvm_te_clear_data() argument 28 lockdep_assert_held(&mvm->time_event_lock); in iwl_mvm_te_clear_data() 47 static void iwl_mvm_cleanup_roc(struct iwl_mvm *mvm) in iwl_mvm_cleanup_roc() argument 49 struct ieee80211_vif *vif = mvm->p2p_device_vif; in iwl_mvm_cleanup_roc() 51 lockdep_assert_held(&mvm->mutex); in iwl_mvm_cleanup_roc() 64 if (test_and_clear_bit(IWL_MVM_STATUS_ROC_P2P_RUNNING, &mvm->status)) { in iwl_mvm_cleanup_roc() 78 iwl_mvm_flush_sta(mvm, mvmvif->deflink.bcast_sta.sta_id, in iwl_mvm_cleanup_roc() 81 if (mvm->mld_api_is_used) { in iwl_mvm_cleanup_roc() 82 iwl_mvm_mld_rm_bcast_sta(mvm, vif, in iwl_mvm_cleanup_roc() 85 iwl_mvm_link_changed(mvm, vif, &vif->bss_conf, in iwl_mvm_cleanup_roc() [all …]
|
| H A D | sta.c | 18 static inline int iwl_mvm_add_sta_cmd_size(struct iwl_mvm *mvm) in iwl_mvm_add_sta_cmd_size() argument 20 if (iwl_mvm_has_new_rx_api(mvm) || in iwl_mvm_add_sta_cmd_size() 21 fw_has_api(&mvm->fw->ucode_capa, IWL_UCODE_TLV_API_STA_TYPE)) in iwl_mvm_add_sta_cmd_size() 27 int iwl_mvm_find_free_sta_id(struct iwl_mvm *mvm, enum nl80211_iftype iftype) in iwl_mvm_find_free_sta_id() argument 33 WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status)); in iwl_mvm_find_free_sta_id() 35 lockdep_assert_held(&mvm->mutex); in iwl_mvm_find_free_sta_id() 42 for (sta_id = 0; sta_id < mvm->fw->ucode_capa.num_stations; sta_id++) { in iwl_mvm_find_free_sta_id() 46 if (!rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_mvm_find_free_sta_id() 47 lockdep_is_held(&mvm->mutex))) in iwl_mvm_find_free_sta_id() 128 int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sta_send_to_fw() argument [all …]
|
| H A D | nvm.c | 33 static int iwl_nvm_write_chunk(struct iwl_mvm *mvm, u16 section, in iwl_nvm_write_chunk() argument 54 ret = iwl_mvm_send_cmd(mvm, &cmd); in iwl_nvm_write_chunk() 62 IWL_ERR(mvm, in iwl_nvm_write_chunk() 72 static int iwl_nvm_read_chunk(struct iwl_mvm *mvm, u16 section, in iwl_nvm_read_chunk() argument 93 ret = iwl_mvm_send_cmd(mvm, &cmd); in iwl_nvm_read_chunk() 116 IWL_DEBUG_EEPROM(mvm->trans->dev, in iwl_nvm_read_chunk() 121 IWL_DEBUG_EEPROM(mvm->trans->dev, in iwl_nvm_read_chunk() 123 ret, mvm->trans->info.name); in iwl_nvm_read_chunk() 130 IWL_ERR(mvm, "NVM ACCESS response with invalid offset %d\n", in iwl_nvm_read_chunk() 145 static int iwl_nvm_write_section(struct iwl_mvm *mvm, u16 section, in iwl_nvm_write_section() argument [all …]
|
| H A D | mvm.h | 422 struct iwl_mvm *mvm; member 750 struct iwl_mvm *mvm; member 1279 DEFINE_GUARD(mvm, struct iwl_mvm *, mutex_lock(&_T->mutex), mutex_unlock(&_T->mutex)) 1318 static inline bool iwl_mvm_is_radio_killed(struct iwl_mvm *mvm) in iwl_mvm_is_radio_killed() argument 1320 return test_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status) || in iwl_mvm_is_radio_killed() 1321 test_bit(IWL_MVM_STATUS_HW_CTKILL, &mvm->status); in iwl_mvm_is_radio_killed() 1324 static inline bool iwl_mvm_is_radio_hw_killed(struct iwl_mvm *mvm) in iwl_mvm_is_radio_hw_killed() argument 1326 return test_bit(IWL_MVM_STATUS_HW_RFKILL, &mvm->status); in iwl_mvm_is_radio_hw_killed() 1329 static inline bool iwl_mvm_firmware_running(struct iwl_mvm *mvm) in iwl_mvm_firmware_running() argument 1331 return test_bit(IWL_MVM_STATUS_FIRMWARE_RUNNING, &mvm->status); in iwl_mvm_firmware_running() [all …]
|
| H A D | scan.c | 111 static inline void *iwl_mvm_get_scan_req_umac_data(struct iwl_mvm *mvm) in iwl_mvm_get_scan_req_umac_data() argument 113 struct iwl_scan_req_umac *cmd = mvm->scan_cmd; in iwl_mvm_get_scan_req_umac_data() 115 if (iwl_mvm_is_adaptive_dwell_v2_supported(mvm)) in iwl_mvm_get_scan_req_umac_data() 118 if (iwl_mvm_is_adaptive_dwell_supported(mvm)) in iwl_mvm_get_scan_req_umac_data() 121 if (iwl_mvm_cdb_scan_api(mvm)) in iwl_mvm_get_scan_req_umac_data() 128 iwl_mvm_get_scan_req_umac_channel(struct iwl_mvm *mvm) in iwl_mvm_get_scan_req_umac_channel() argument 130 struct iwl_scan_req_umac *cmd = mvm->scan_cmd; in iwl_mvm_get_scan_req_umac_channel() 132 if (iwl_mvm_is_adaptive_dwell_v2_supported(mvm)) in iwl_mvm_get_scan_req_umac_channel() 135 if (iwl_mvm_is_adaptive_dwell_supported(mvm)) in iwl_mvm_get_scan_req_umac_channel() 138 if (iwl_mvm_cdb_scan_api(mvm)) in iwl_mvm_get_scan_req_umac_channel() [all …]
|
| H A D | utils.c | 45 int iwl_mvm_send_cmd(struct iwl_mvm *mvm, struct iwl_host_cmd *cmd) in iwl_mvm_send_cmd() argument 55 lockdep_assert_held(&mvm->mutex); in iwl_mvm_send_cmd() 57 ret = iwl_trans_send_cmd(mvm->trans, cmd); in iwl_mvm_send_cmd() 76 int _iwl_mvm_send_cmd_pdu(struct iwl_mvm *mvm, u32 id, in _iwl_mvm_send_cmd_pdu() argument 86 return iwl_mvm_send_cmd(mvm, &cmd); in _iwl_mvm_send_cmd_pdu() 92 int iwl_mvm_send_cmd_status(struct iwl_mvm *mvm, struct iwl_host_cmd *cmd, in iwl_mvm_send_cmd_status() argument 99 lockdep_assert_held(&mvm->mutex); in iwl_mvm_send_cmd_status() 111 ret = iwl_trans_send_cmd(mvm->trans, cmd); in iwl_mvm_send_cmd_status() 140 int _iwl_mvm_send_cmd_pdu_status(struct iwl_mvm *mvm, u32 id, u16 len, in _iwl_mvm_send_cmd_pdu_status() argument 149 return iwl_mvm_send_cmd_status(mvm, &cmd, status); in _iwl_mvm_send_cmd_pdu_status() [all …]
|
| H A D | d3.c | 23 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); in iwl_mvm_set_rekey_data() local 26 mutex_lock(&mvm->mutex); in iwl_mvm_set_rekey_data() 37 mutex_unlock(&mvm->mutex); in iwl_mvm_set_rekey_data() 115 struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); in iwl_mvm_wowlan_program_keys() local 153 mutex_lock(&mvm->mutex); in iwl_mvm_wowlan_program_keys() 154 ret = iwl_mvm_send_cmd_pdu(mvm, WEP_KEY, 0, in iwl_mvm_wowlan_program_keys() 158 mvm->ptk_ivlen = key->iv_len; in iwl_mvm_wowlan_program_keys() 159 mvm->ptk_icvlen = key->icv_len; in iwl_mvm_wowlan_program_keys() 160 mvm->gtk_ivlen = key->iv_len; in iwl_mvm_wowlan_program_keys() 161 mvm->gtk_icvlen = key->icv_len; in iwl_mvm_wowlan_program_keys() [all …]
|
| H A D | ftm-initiator.c | 49 static void iwl_mvm_ftm_reset(struct iwl_mvm *mvm) in iwl_mvm_ftm_reset() argument 53 mvm->ftm_initiator.req = NULL; in iwl_mvm_ftm_reset() 54 mvm->ftm_initiator.req_wdev = NULL; in iwl_mvm_ftm_reset() 55 memset(mvm->ftm_initiator.responses, 0, in iwl_mvm_ftm_reset() 56 sizeof(mvm->ftm_initiator.responses)); in iwl_mvm_ftm_reset() 58 list_for_each_entry_safe(e, t, &mvm->ftm_initiator.loc_list, list) { in iwl_mvm_ftm_reset() 64 void iwl_mvm_ftm_restart(struct iwl_mvm *mvm) in iwl_mvm_ftm_restart() argument 74 lockdep_assert_held(&mvm->mutex); in iwl_mvm_ftm_restart() 76 if (!mvm->ftm_initiator.req) in iwl_mvm_ftm_restart() 79 for (i = 0; i < mvm->ftm_initiator.req->n_peers; i++) { in iwl_mvm_ftm_restart() [all …]
|
| H A D | mac-ctxt.c | 47 struct iwl_mvm *mvm; member 185 void iwl_mvm_mac_ctxt_recalc_tsf_id(struct iwl_mvm *mvm, in iwl_mvm_mac_ctxt_recalc_tsf_id() argument 190 .mvm = mvm, in iwl_mvm_mac_ctxt_recalc_tsf_id() 198 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mvm_mac_ctxt_recalc_tsf_id() 208 int iwl_mvm_mac_ctxt_init(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_mac_ctxt_init() argument 212 .mvm = mvm, in iwl_mvm_mac_ctxt_init() 222 lockdep_assert_held(&mvm->mutex); in iwl_mvm_mac_ctxt_init() 243 if (!mvm->mld_api_is_used) { in iwl_mvm_mac_ctxt_init() 257 mvm->hw, IEEE80211_IFACE_ITER_RESUME_ALL, in iwl_mvm_mac_ctxt_init() 274 if (WARN_ON_ONCE(test_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status))) in iwl_mvm_mac_ctxt_init() [all …]
|
| H A D | rx.c | 20 void iwl_mvm_rx_rx_phy_cmd(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) in iwl_mvm_rx_rx_phy_cmd() argument 25 if (unlikely(pkt_len < sizeof(mvm->last_phy_info))) in iwl_mvm_rx_rx_phy_cmd() 28 memcpy(&mvm->last_phy_info, pkt->data, sizeof(mvm->last_phy_info)); in iwl_mvm_rx_rx_phy_cmd() 29 mvm->ampdu_ref++; in iwl_mvm_rx_rx_phy_cmd() 32 if (mvm->last_phy_info.phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_AGG)) { in iwl_mvm_rx_rx_phy_cmd() 33 spin_lock(&mvm->drv_stats_lock); in iwl_mvm_rx_rx_phy_cmd() 34 mvm->drv_rx_stats.ampdu_count++; in iwl_mvm_rx_rx_phy_cmd() 35 spin_unlock(&mvm->drv_stats_lock); in iwl_mvm_rx_rx_phy_cmd() 45 static void iwl_mvm_pass_packet_to_mac80211(struct iwl_mvm *mvm, in iwl_mvm_pass_packet_to_mac80211() argument 93 ieee80211_rx_napi(mvm->hw, sta, skb, napi); in iwl_mvm_pass_packet_to_mac80211() [all …]
|
| H A D | tx.c | 22 iwl_mvm_bar_check_trigger(struct iwl_mvm *mvm, const u8 *addr, in iwl_mvm_bar_check_trigger() argument 28 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL, FW_DBG_TRIGGER_BA); in iwl_mvm_bar_check_trigger() 37 iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, in iwl_mvm_bar_check_trigger() 45 static u32 iwl_mvm_tx_csum(struct iwl_mvm *mvm, struct sk_buff *skb, in iwl_mvm_tx_csum() argument 60 if (WARN_ONCE(!(mvm->hw->netdev_features & IWL_TX_CSUM_NETIF_FLAGS) || in iwl_mvm_tx_csum() 131 if (!iwl_mvm_has_new_tx_api(mvm) && info->control.hw_key && in iwl_mvm_tx_csum() 150 void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb, in iwl_mvm_set_tx_cmd() argument 189 iwl_mvm_bar_check_trigger(mvm, bar->ra, tx_cmd_params->tid_tspec, in iwl_mvm_set_tx_cmd() 209 tx_flags |= iwl_mvm_bt_coex_tx_prio(mvm, hdr, info, ac) << in iwl_mvm_set_tx_cmd() 230 if (ieee80211_is_data(fc) && len > mvm->rts_threshold && in iwl_mvm_set_tx_cmd() [all …]
|
| H A D | rfi.c | 73 bool iwl_rfi_supported(struct iwl_mvm *mvm) in iwl_rfi_supported() argument 83 int iwl_rfi_send_config_cmd(struct iwl_mvm *mvm, struct iwl_rfi_lut_entry *rfi_table) in iwl_rfi_send_config_cmd() argument 94 if (!iwl_rfi_supported(mvm)) in iwl_rfi_send_config_cmd() 97 lockdep_assert_held(&mvm->mutex); in iwl_rfi_send_config_cmd() 108 ret = iwl_mvm_send_cmd(mvm, &hcmd); in iwl_rfi_send_config_cmd() 111 IWL_ERR(mvm, "Failed to send RFI config cmd %d\n", ret); in iwl_rfi_send_config_cmd() 116 struct iwl_rfi_freq_table_resp_cmd *iwl_rfi_get_freq_table(struct iwl_mvm *mvm) in iwl_rfi_get_freq_table() argument 126 if (!iwl_rfi_supported(mvm)) in iwl_rfi_get_freq_table() 129 mutex_lock(&mvm->mutex); in iwl_rfi_get_freq_table() 130 ret = iwl_mvm_send_cmd(mvm, &cmd); in iwl_rfi_get_freq_table() [all …]
|
| H A D | rs-fw.c | 63 static u16 rs_fw_get_config_flags(struct iwl_mvm *mvm, in rs_fw_get_config_flags() argument 75 if (mvm->cfg->ht_params.stbc && in rs_fw_get_config_flags() 76 (num_of_ant(iwl_mvm_get_valid_tx_ant(mvm)) > 1)) { in rs_fw_get_config_flags() 86 if (mvm->cfg->ht_params.ldpc && in rs_fw_get_config_flags() 414 void iwl_mvm_tlc_update_notif(struct iwl_mvm *mvm, in iwl_mvm_tlc_update_notif() argument 427 if (IWL_FW_CHECK(mvm, notif->sta_id >= mvm->fw->ucode_capa.num_stations, in iwl_mvm_tlc_update_notif() 434 link_sta = rcu_dereference(mvm->fw_id_to_link_sta[notif->sta_id]); in iwl_mvm_tlc_update_notif() 435 sta = rcu_dereference(mvm->fw_id_to_mac_id[notif->sta_id]); in iwl_mvm_tlc_update_notif() 440 IWL_DEBUG_RATE(mvm, in iwl_mvm_tlc_update_notif() 452 IWL_DEBUG_RATE(mvm, in iwl_mvm_tlc_update_notif() [all …]
|
| H A D | sf.c | 96 static void iwl_mvm_fill_sf_command(struct iwl_mvm *mvm, in iwl_mvm_fill_sf_command() argument 175 static int iwl_mvm_sf_config(struct iwl_mvm *mvm, struct ieee80211_sta *sta, in iwl_mvm_sf_config() argument 187 if (new_state != SF_FULL_ON && mvm->sf_state == new_state) in iwl_mvm_sf_config() 192 iwl_mvm_fill_sf_command(mvm, &sf_cmd, NULL); in iwl_mvm_sf_config() 196 IWL_ERR(mvm, in iwl_mvm_sf_config() 200 iwl_mvm_fill_sf_command(mvm, &sf_cmd, sta); in iwl_mvm_sf_config() 203 iwl_mvm_fill_sf_command(mvm, &sf_cmd, NULL); in iwl_mvm_sf_config() 211 ret = iwl_mvm_send_cmd_pdu(mvm, REPLY_SF_CFG_CMD, CMD_ASYNC, in iwl_mvm_sf_config() 214 mvm->sf_state = new_state; in iwl_mvm_sf_config() 224 int iwl_mvm_sf_update(struct iwl_mvm *mvm, struct ieee80211_vif *changed_vif, in iwl_mvm_sf_update() argument [all …]
|
| H A D | time-sync.h | 13 void iwl_mvm_time_sync_msmt_event(struct iwl_mvm *mvm, 15 void iwl_mvm_time_sync_msmt_confirm_event(struct iwl_mvm *mvm, 17 int iwl_mvm_time_sync_config(struct iwl_mvm *mvm, const u8 *addr, 21 bool iwl_mvm_time_sync_frame(struct iwl_mvm *mvm, struct sk_buff *skb, u8 *addr) in iwl_mvm_time_sync_frame() argument 23 if (!mvm->time_sync.active) in iwl_mvm_time_sync_frame() 26 if (ether_addr_equal(mvm->time_sync.peer_addr, addr) && in iwl_mvm_time_sync_frame() 28 skb_queue_tail(&mvm->time_sync.frame_list, skb); in iwl_mvm_time_sync_frame()
|