Lines Matching refs:mvm

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()
102 static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, in iwl_mvm_get_signal_strength() argument
119 IWL_DEBUG_STATS(mvm, "energy In A %d B %d , and max %d\n", in iwl_mvm_get_signal_strength()
139 static u32 iwl_mvm_set_mac80211_rx_flag(struct iwl_mvm *mvm, in iwl_mvm_set_mac80211_rx_flag() argument
167 if (!fw_has_api(&mvm->fw->ucode_capa, in iwl_mvm_set_mac80211_rx_flag()
192 if (!mvm->monitor_on) in iwl_mvm_set_mac80211_rx_flag()
193 IWL_ERR(mvm, "Unhandled alg: 0x%x\n", rx_pkt_status); in iwl_mvm_set_mac80211_rx_flag()
199 static void iwl_mvm_rx_handle_tcm(struct iwl_mvm *mvm, in iwl_mvm_rx_handle_tcm() argument
222 if (time_after(jiffies, mvm->tcm.ts + MVM_TCM_PERIOD)) in iwl_mvm_rx_handle_tcm()
223 schedule_delayed_work(&mvm->tcm.work, 0); in iwl_mvm_rx_handle_tcm()
224 mdata = &mvm->tcm.data[mac]; in iwl_mvm_rx_handle_tcm()
228 if (mdata->rx.last_ampdu_ref != mvm->ampdu_ref) { in iwl_mvm_rx_handle_tcm()
229 mdata->rx.last_ampdu_ref = mvm->ampdu_ref; in iwl_mvm_rx_handle_tcm()
285 void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, in iwl_mvm_rx_rx_mpdu() argument
301 IWL_DEBUG_DROP(mvm, "Bad REPLY_RX_MPDU_CMD size\n"); in iwl_mvm_rx_rx_mpdu()
305 phy_info = &mvm->last_phy_info; in iwl_mvm_rx_rx_mpdu()
311 IWL_DEBUG_DROP(mvm, "FW lied about packet len\n"); in iwl_mvm_rx_rx_mpdu()
323 IWL_ERR(mvm, "alloc_skb failed\n"); in iwl_mvm_rx_rx_mpdu()
335 IWL_DEBUG_RX(mvm, "Bad CRC or FIFO: 0x%08X.\n", rx_pkt_status); in iwl_mvm_rx_rx_mpdu()
355 iwl_mvm_get_signal_strength(mvm, phy_info, rx_status); in iwl_mvm_rx_rx_mpdu()
357 IWL_DEBUG_STATS_LIMIT(mvm, "Rssi %d, TSF %llu\n", rx_status->signal, in iwl_mvm_rx_rx_mpdu()
366 if (!WARN_ON_ONCE(id >= mvm->fw->ucode_capa.num_stations)) { in iwl_mvm_rx_rx_mpdu()
367 sta = rcu_dereference(mvm->fw_id_to_mac_id[id]); in iwl_mvm_rx_rx_mpdu()
375 sta = ieee80211_find_sta_by_ifaddr(mvm->hw, hdr->addr2, NULL); in iwl_mvm_rx_rx_mpdu()
390 IWL_DEBUG_DROP(mvm, "MCAST before the vif is authorized\n"); in iwl_mvm_rx_rx_mpdu()
400 if (iwl_mvm_set_mac80211_rx_flag(mvm, hdr, rx_status, rx_pkt_status, in iwl_mvm_rx_rx_mpdu()
402 IWL_DEBUG_DROP(mvm, "Bad decryption results 0x%08x\n", in iwl_mvm_rx_rx_mpdu()
412 rcu_dereference(mvm->csa_tx_blocked_vif); in iwl_mvm_rx_rx_mpdu()
425 iwl_mvm_sta_modify_disable_tx_ap(mvm, sta, in iwl_mvm_rx_rx_mpdu()
429 rs_update_last_rssi(mvm, mvmsta, rx_status); in iwl_mvm_rx_rx_mpdu()
431 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, in iwl_mvm_rx_rx_mpdu()
443 iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, in iwl_mvm_rx_rx_mpdu()
447 if (!mvm->tcm.paused && len >= sizeof(*hdr) && in iwl_mvm_rx_rx_mpdu()
450 iwl_mvm_rx_handle_tcm(mvm, sta, hdr, len, phy_info, in iwl_mvm_rx_rx_mpdu()
469 rx_status->ampdu_reference = mvm->ampdu_ref; in iwl_mvm_rx_rx_mpdu()
524 iwl_mvm_update_frame_stats(mvm, rate_n_flags, in iwl_mvm_rx_rx_mpdu()
530 mvm->sched_scan_pass_all == SCHED_SCAN_PASS_ALL_ENABLED)) in iwl_mvm_rx_rx_mpdu()
531 mvm->sched_scan_pass_all = SCHED_SCAN_PASS_ALL_FOUND; in iwl_mvm_rx_rx_mpdu()
537 iwl_mvm_pass_packet_to_mac80211(mvm, sta, napi, skb, hdr, len, in iwl_mvm_rx_rx_mpdu()
542 struct iwl_mvm *mvm; member
551 struct iwl_mvm *mvm; member
559 struct iwl_mvm *mvm = mvmvif->mvm; in iwl_mvm_update_vif_sig() local
565 IWL_DEBUG_RX(mvm, "RSSI is 0 - skip signal based decision\n"); in iwl_mvm_update_vif_sig()
579 IWL_DEBUG_RX(mvm, "cqm_iterator bt coex high %d\n", in iwl_mvm_update_vif_sig()
581 iwl_mvm_bt_rssi_event(mvm, vif, RSSI_EVENT_HIGH); in iwl_mvm_update_vif_sig()
586 IWL_DEBUG_RX(mvm, "cqm_iterator bt coex low %d\n", in iwl_mvm_update_vif_sig()
588 iwl_mvm_bt_rssi_event(mvm, vif, RSSI_EVENT_LOW); in iwl_mvm_update_vif_sig()
600 IWL_DEBUG_RX(mvm, "cqm_iterator cqm low %d\n", in iwl_mvm_update_vif_sig()
610 IWL_DEBUG_RX(mvm, "cqm_iterator cqm high %d\n", in iwl_mvm_update_vif_sig()
688 iwl_mvm_rx_stats_check_trigger(struct iwl_mvm *mvm, struct iwl_rx_packet *pkt) in iwl_mvm_rx_stats_check_trigger() argument
694 trig = iwl_fw_dbg_trigger_on(&mvm->fwrt, NULL, FW_DBG_TRIGGER_STATS); in iwl_mvm_rx_stats_check_trigger()
709 iwl_fw_dbg_collect_trig(&mvm->fwrt, trig, NULL); in iwl_mvm_rx_stats_check_trigger()
729 iwl_mvm_update_tcm_from_stats(struct iwl_mvm *mvm, __le32 *air_time_le, in iwl_mvm_update_tcm_from_stats() argument
734 spin_lock(&mvm->tcm.lock); in iwl_mvm_update_tcm_from_stats()
736 struct iwl_mvm_tcm_mac *mdata = &mvm->tcm.data[i]; in iwl_mvm_update_tcm_from_stats()
749 spin_unlock(&mvm->tcm.lock); in iwl_mvm_update_tcm_from_stats()
753 iwl_mvm_stats_ver_15(struct iwl_mvm *mvm, in iwl_mvm_stats_ver_15() argument
757 .mvm = mvm, in iwl_mvm_stats_ver_15()
762 ieee80211_iterate_active_interfaces(mvm->hw, in iwl_mvm_stats_ver_15()
769 iwl_mvm_stats_ver_14(struct iwl_mvm *mvm, in iwl_mvm_stats_ver_14() argument
773 .mvm = mvm, in iwl_mvm_stats_ver_14()
794 ieee80211_iterate_active_interfaces(mvm->hw, in iwl_mvm_stats_ver_14()
800 static bool iwl_mvm_verify_stats_len(struct iwl_mvm *mvm, in iwl_mvm_verify_stats_len() argument
815 iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, STATISTICS_NOTIFICATION, 0), in iwl_mvm_verify_stats_len()
829 iwl_mvm_handle_rx_statistics_tlv(struct iwl_mvm *mvm, in iwl_mvm_handle_rx_statistics_tlv() argument
837 u32 notif_ver = iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, in iwl_mvm_handle_rx_statistics_tlv()
848 if (!iwl_mvm_verify_stats_len(mvm, pkt, sizeof(*stats))) in iwl_mvm_handle_rx_statistics_tlv()
851 iwl_mvm_stats_ver_14(mvm, stats); in iwl_mvm_handle_rx_statistics_tlv()
854 mvm->radio_stats.rx_time = le64_to_cpu(stats->rx_time); in iwl_mvm_handle_rx_statistics_tlv()
855 mvm->radio_stats.tx_time = le64_to_cpu(stats->tx_time); in iwl_mvm_handle_rx_statistics_tlv()
856 mvm->radio_stats.on_time_rf = le64_to_cpu(stats->on_time_rf); in iwl_mvm_handle_rx_statistics_tlv()
857 mvm->radio_stats.on_time_scan = in iwl_mvm_handle_rx_statistics_tlv()
873 if (!iwl_mvm_verify_stats_len(mvm, pkt, sizeof(*stats))) in iwl_mvm_handle_rx_statistics_tlv()
876 iwl_mvm_stats_ver_15(mvm, stats); in iwl_mvm_handle_rx_statistics_tlv()
879 mvm->radio_stats.rx_time = le64_to_cpu(stats->rx_time); in iwl_mvm_handle_rx_statistics_tlv()
880 mvm->radio_stats.tx_time = le64_to_cpu(stats->tx_time); in iwl_mvm_handle_rx_statistics_tlv()
881 mvm->radio_stats.on_time_rf = le64_to_cpu(stats->on_time_rf); in iwl_mvm_handle_rx_statistics_tlv()
882 mvm->radio_stats.on_time_scan = in iwl_mvm_handle_rx_statistics_tlv()
895 iwl_mvm_rx_stats_check_trigger(mvm, pkt); in iwl_mvm_handle_rx_statistics_tlv()
897 ieee80211_iterate_stations_atomic(mvm->hw, iwl_mvm_stats_energy_iter, in iwl_mvm_handle_rx_statistics_tlv()
905 iwl_mvm_update_tcm_from_stats(mvm, air_time, rx_bytes); in iwl_mvm_handle_rx_statistics_tlv()
908 void iwl_mvm_handle_rx_statistics(struct iwl_mvm *mvm, in iwl_mvm_handle_rx_statistics() argument
912 .mvm = mvm, in iwl_mvm_handle_rx_statistics()
919 if (iwl_fw_lookup_notif_ver(mvm->fw, LEGACY_GROUP, in iwl_mvm_handle_rx_statistics()
921 return iwl_mvm_handle_rx_statistics_tlv(mvm, pkt); in iwl_mvm_handle_rx_statistics()
923 if (!iwl_mvm_has_new_rx_stats_api(mvm)) { in iwl_mvm_handle_rx_statistics()
924 if (iwl_mvm_has_new_rx_api(mvm)) in iwl_mvm_handle_rx_statistics()
937 if (!iwl_mvm_has_new_rx_stats_api(mvm)) { in iwl_mvm_handle_rx_statistics()
944 mvm->rx_stats_v3 = stats->rx; in iwl_mvm_handle_rx_statistics()
946 mvm->radio_stats.rx_time = in iwl_mvm_handle_rx_statistics()
948 mvm->radio_stats.tx_time = in iwl_mvm_handle_rx_statistics()
950 mvm->radio_stats.on_time_rf = in iwl_mvm_handle_rx_statistics()
952 mvm->radio_stats.on_time_scan = in iwl_mvm_handle_rx_statistics()
966 mvm->rx_stats = stats->rx; in iwl_mvm_handle_rx_statistics()
968 mvm->radio_stats.rx_time = in iwl_mvm_handle_rx_statistics()
970 mvm->radio_stats.tx_time = in iwl_mvm_handle_rx_statistics()
972 mvm->radio_stats.on_time_rf = in iwl_mvm_handle_rx_statistics()
974 mvm->radio_stats.on_time_scan = in iwl_mvm_handle_rx_statistics()
984 iwl_mvm_rx_stats_check_trigger(mvm, pkt); in iwl_mvm_handle_rx_statistics()
986 ieee80211_iterate_active_interfaces(mvm->hw, in iwl_mvm_handle_rx_statistics()
991 if (!iwl_mvm_has_new_rx_api(mvm)) in iwl_mvm_handle_rx_statistics()
994 if (!iwl_mvm_has_new_rx_stats_api(mvm)) { in iwl_mvm_handle_rx_statistics()
1007 ieee80211_iterate_stations_atomic(mvm->hw, iwl_mvm_stats_energy_iter, in iwl_mvm_handle_rx_statistics()
1016 iwl_mvm_update_tcm_from_stats(mvm, air_time, bytes); in iwl_mvm_handle_rx_statistics()
1020 void iwl_mvm_rx_statistics(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb) in iwl_mvm_rx_statistics() argument
1022 iwl_mvm_handle_rx_statistics(mvm, rxb_addr(rxb)); in iwl_mvm_rx_statistics()
1025 void iwl_mvm_window_status_notif(struct iwl_mvm *mvm, in iwl_mvm_window_status_notif() argument
1059 sta = rcu_dereference(mvm->fw_id_to_mac_id[sta_id]); in iwl_mvm_window_status_notif()