|
@@ -801,23 +801,10 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
|
|
|
|
|
switch (vif->type) {
|
|
switch (vif->type) {
|
|
case NL80211_IFTYPE_STATION:
|
|
case NL80211_IFTYPE_STATION:
|
|
|
|
+ /* Count BSSes vifs */
|
|
|
|
+ data->num_bss_ifaces++;
|
|
/* default smps_mode for BSS / P2P client is AUTOMATIC */
|
|
/* default smps_mode for BSS / P2P client is AUTOMATIC */
|
|
smps_mode = IEEE80211_SMPS_AUTOMATIC;
|
|
smps_mode = IEEE80211_SMPS_AUTOMATIC;
|
|
- data->num_bss_ifaces++;
|
|
|
|
-
|
|
|
|
- /*
|
|
|
|
- * Count unassoc BSSes, relax SMSP constraints
|
|
|
|
- * and disable reduced Tx Power
|
|
|
|
- */
|
|
|
|
- if (!vif->bss_conf.assoc) {
|
|
|
|
- iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
|
|
|
|
- smps_mode);
|
|
|
|
- if (iwl_mvm_bt_coex_reduced_txp(mvm,
|
|
|
|
- mvmvif->ap_sta_id,
|
|
|
|
- false))
|
|
|
|
- IWL_ERR(mvm, "Couldn't send BT_CONFIG cmd\n");
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
break;
|
|
break;
|
|
case NL80211_IFTYPE_AP:
|
|
case NL80211_IFTYPE_AP:
|
|
/* default smps_mode for AP / GO is OFF */
|
|
/* default smps_mode for AP / GO is OFF */
|
|
@@ -843,6 +830,7 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
|
/* ... relax constraints and disable rssi events */
|
|
/* ... relax constraints and disable rssi events */
|
|
iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
|
|
iwl_mvm_update_smps(mvm, vif, IWL_MVM_SMPS_REQ_BT_COEX,
|
|
smps_mode);
|
|
smps_mode);
|
|
|
|
+ data->reduced_tx_power = false;
|
|
if (vif->type == NL80211_IFTYPE_STATION)
|
|
if (vif->type == NL80211_IFTYPE_STATION)
|
|
iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
|
iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
|
return;
|
|
return;
|
|
@@ -855,6 +843,11 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
|
smps_mode = vif->type == NL80211_IFTYPE_AP ?
|
|
smps_mode = vif->type == NL80211_IFTYPE_AP ?
|
|
IEEE80211_SMPS_OFF :
|
|
IEEE80211_SMPS_OFF :
|
|
IEEE80211_SMPS_DYNAMIC;
|
|
IEEE80211_SMPS_DYNAMIC;
|
|
|
|
+
|
|
|
|
+ /* relax SMPS contraints for next association */
|
|
|
|
+ if (!vif->bss_conf.assoc)
|
|
|
|
+ smps_mode = IEEE80211_SMPS_AUTOMATIC;
|
|
|
|
+
|
|
IWL_DEBUG_COEX(data->mvm,
|
|
IWL_DEBUG_COEX(data->mvm,
|
|
"mac %d: bt_status %d bt_activity_grading %d smps_req %d\n",
|
|
"mac %d: bt_status %d bt_activity_grading %d smps_req %d\n",
|
|
mvmvif->id, data->notif->bt_status, bt_activity_grading,
|
|
mvmvif->id, data->notif->bt_status, bt_activity_grading,
|
|
@@ -901,26 +894,21 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac,
|
|
/* if secondary is not NULL, it might be a GO */
|
|
/* if secondary is not NULL, it might be a GO */
|
|
data->secondary = chanctx_conf;
|
|
data->secondary = chanctx_conf;
|
|
|
|
|
|
- /* don't reduce the Tx power if in loose scheme */
|
|
|
|
|
|
+ /*
|
|
|
|
+ * don't reduce the Tx power if one of these is true:
|
|
|
|
+ * we are in LOOSE
|
|
|
|
+ * single share antenna product
|
|
|
|
+ * BT is active
|
|
|
|
+ * we are associated
|
|
|
|
+ */
|
|
if (iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT ||
|
|
if (iwl_get_coex_type(mvm, vif) == BT_COEX_LOOSE_LUT ||
|
|
- mvm->cfg->bt_shared_single_ant) {
|
|
|
|
|
|
+ mvm->cfg->bt_shared_single_ant || !vif->bss_conf.assoc ||
|
|
|
|
+ !data->notif->bt_status) {
|
|
data->reduced_tx_power = false;
|
|
data->reduced_tx_power = false;
|
|
iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
|
iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- /* reduced Txpower only if BT is on, so ...*/
|
|
|
|
- if (!data->notif->bt_status) {
|
|
|
|
- /* ... cancel reduced Tx power ... */
|
|
|
|
- if (iwl_mvm_bt_coex_reduced_txp(mvm, mvmvif->ap_sta_id, false))
|
|
|
|
- IWL_ERR(mvm, "Couldn't send BT_CONFIG cmd\n");
|
|
|
|
- data->reduced_tx_power = false;
|
|
|
|
-
|
|
|
|
- /* ... and there is no need to get reports on RSSI any more. */
|
|
|
|
- iwl_mvm_bt_coex_enable_rssi_event(mvm, vif, false, 0);
|
|
|
|
- return;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
/* try to get the avg rssi from fw */
|
|
/* try to get the avg rssi from fw */
|
|
ave_rssi = mvmvif->bf_data.ave_beacon_signal;
|
|
ave_rssi = mvmvif->bf_data.ave_beacon_signal;
|
|
|
|
|
|
@@ -1037,7 +1025,6 @@ static void iwl_mvm_bt_coex_notif_handle(struct iwl_mvm *mvm)
|
|
IWL_ERR(mvm, "Failed to update the ctrl_kill_msk\n");
|
|
IWL_ERR(mvm, "Failed to update the ctrl_kill_msk\n");
|
|
}
|
|
}
|
|
|
|
|
|
-/* upon association, the fw will send in BT Coex notification */
|
|
|
|
int iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,
|
|
int iwl_mvm_rx_bt_coex_notif(struct iwl_mvm *mvm,
|
|
struct iwl_rx_cmd_buffer *rxb,
|
|
struct iwl_rx_cmd_buffer *rxb,
|
|
struct iwl_device_cmd *dev_cmd)
|
|
struct iwl_device_cmd *dev_cmd)
|