Commit 2b76ef13 authored by Emmanuel Grumbach's avatar Emmanuel Grumbach Committed by Johannes Berg

iwlwifi: mvm: implement reduced Tx power

This allows to have better wifi TPT when BT is active under
good RSSI conditions.
Wifi will have better chance to send Acks and Cts even if BT
is active.
Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 63494374
This diff is collapsed.
...@@ -333,9 +333,18 @@ static ssize_t iwl_dbgfs_mac_params_read(struct file *file, ...@@ -333,9 +333,18 @@ static ssize_t iwl_dbgfs_mac_params_read(struct file *file,
mvmvif->queue_params[i].uapsd); mvmvif->queue_params[i].uapsd);
} }
if (vif->type == NL80211_IFTYPE_STATION) if (vif->type == NL80211_IFTYPE_STATION &&
pos += scnprintf(buf+pos, bufsz-pos, "ap_sta_id %d\n", ap_sta_id != IWL_MVM_STATION_COUNT) {
ap_sta_id); struct ieee80211_sta *sta;
struct iwl_mvm_sta *mvm_sta;
sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[ap_sta_id],
lockdep_is_held(&mvm->mutex));
mvm_sta = (void *)sta->drv_priv;
pos += scnprintf(buf+pos, bufsz-pos,
"ap_sta_id %d - reduced Tx power %d\n",
ap_sta_id, mvm_sta->bt_reduced_txpower);
}
rcu_read_lock(); rcu_read_lock();
chanctx_conf = rcu_dereference(vif->chanctx_conf); chanctx_conf = rcu_dereference(vif->chanctx_conf);
......
...@@ -1329,6 +1329,15 @@ static int iwl_mvm_set_tim(struct ieee80211_hw *hw, ...@@ -1329,6 +1329,15 @@ static int iwl_mvm_set_tim(struct ieee80211_hw *hw,
return iwl_mvm_mac_ctxt_beacon_changed(mvm, mvm_sta->vif); return iwl_mvm_mac_ctxt_beacon_changed(mvm, mvm_sta->vif);
} }
static void iwl_mvm_mac_rssi_callback(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
enum ieee80211_rssi_event rssi_event)
{
struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
iwl_mvm_bt_rssi_event(mvm, vif, rssi_event);
}
struct ieee80211_ops iwl_mvm_hw_ops = { struct ieee80211_ops iwl_mvm_hw_ops = {
.tx = iwl_mvm_mac_tx, .tx = iwl_mvm_mac_tx,
.ampdu_action = iwl_mvm_mac_ampdu_action, .ampdu_action = iwl_mvm_mac_ampdu_action,
...@@ -1352,6 +1361,7 @@ struct ieee80211_ops iwl_mvm_hw_ops = { ...@@ -1352,6 +1361,7 @@ struct ieee80211_ops iwl_mvm_hw_ops = {
.update_tkip_key = iwl_mvm_mac_update_tkip_key, .update_tkip_key = iwl_mvm_mac_update_tkip_key,
.remain_on_channel = iwl_mvm_roc, .remain_on_channel = iwl_mvm_roc,
.cancel_remain_on_channel = iwl_mvm_cancel_roc, .cancel_remain_on_channel = iwl_mvm_cancel_roc,
.rssi_callback = iwl_mvm_mac_rssi_callback,
.add_chanctx = iwl_mvm_add_chanctx, .add_chanctx = iwl_mvm_add_chanctx,
.remove_chanctx = iwl_mvm_remove_chanctx, .remove_chanctx = iwl_mvm_remove_chanctx,
......
...@@ -522,5 +522,7 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm); ...@@ -522,5 +522,7 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm);
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 *cmd); struct iwl_device_cmd *cmd);
void iwl_mvm_bt_rssi_event(struct iwl_mvm *mvm, struct ieee80211_vif *vif,
enum ieee80211_rssi_event rssi_event);
#endif /* __IWL_MVM_H__ */ #endif /* __IWL_MVM_H__ */
...@@ -271,6 +271,7 @@ struct iwl_mvm_tid_data { ...@@ -271,6 +271,7 @@ struct iwl_mvm_tid_data {
* @tid_disable_agg: bitmap: if bit(tid) is set, the fw won't send ampdus for * @tid_disable_agg: bitmap: if bit(tid) is set, the fw won't send ampdus for
* tid. * tid.
* @max_agg_bufsize: the maximal size of the AGG buffer for this station * @max_agg_bufsize: the maximal size of the AGG buffer for this station
* @bt_reduced_txpower: is reduced tx power enabled for this station
* @lock: lock to protect the whole struct. Since %tid_data is access from Tx * @lock: lock to protect the whole struct. Since %tid_data is access from Tx
* and from Tx response flow, it needs a spinlock. * and from Tx response flow, it needs a spinlock.
* @pending_frames: number of frames for this STA on the shared Tx queues. * @pending_frames: number of frames for this STA on the shared Tx queues.
...@@ -287,6 +288,7 @@ struct iwl_mvm_sta { ...@@ -287,6 +288,7 @@ struct iwl_mvm_sta {
u32 mac_id_n_color; u32 mac_id_n_color;
u16 tid_disable_agg; u16 tid_disable_agg;
u8 max_agg_bufsize; u8 max_agg_bufsize;
bool bt_reduced_txpower;
spinlock_t lock; spinlock_t lock;
atomic_t pending_frames; atomic_t pending_frames;
struct iwl_mvm_tid_data tid_data[IWL_MAX_TID_COUNT]; struct iwl_mvm_tid_data tid_data[IWL_MAX_TID_COUNT];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment