diff options
author | Andrei Otcheretianski <andrei.otcheretianski@intel.com> | 2013-07-21 17:37:19 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-10-02 18:00:34 +0200 |
commit | 911222b57b8248aef81c14bf5a08b7e041850f8f (patch) | |
tree | 7ca9e87d157e2225f034c1896c95614519fe0640 /drivers/net/wireless/iwlwifi/mvm/bt-coex.c | |
parent | 016d27e13b08416988fa06013f66e94fa195244a (diff) |
iwlwifi: mvm: Implement BT coex notifications
Use beacon statistics notification handler
to notify bt coex about rssi changes.
Mac80211's mechanism is not used anymore.
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/bt-coex.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/bt-coex.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c index 0fad98b85f6..bba5947fd65 100644 --- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c @@ -467,11 +467,14 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, data->reduced_tx_power = false; /* ... and there is no need to get reports on RSSI any more. */ - ieee80211_disable_rssi_reports(vif); + mvmvif->bf_data.last_bt_coex_event = 0; + mvmvif->bf_data.bt_coex_max_thold = 0; + mvmvif->bf_data.bt_coex_min_thold = 0; return; } - ave_rssi = ieee80211_ave_rssi(vif); + /* try to get the avg rssi from fw */ + ave_rssi = mvmvif->bf_data.ave_beacon_signal; /* if the RSSI isn't valid, fake it is very low */ if (!ave_rssi) @@ -499,8 +502,13 @@ static void iwl_mvm_bt_notif_iterator(void *_data, u8 *mac, } /* Begin to monitor the RSSI: it may influence the reduced Tx power */ - ieee80211_enable_rssi_reports(vif, BT_DISABLE_REDUCED_TXPOWER_THRESHOLD, - BT_ENABLE_REDUCED_TXPOWER_THRESHOLD); + + /* reset previous bt coex event tracking */ + mvmvif->bf_data.last_bt_coex_event = 0; + mvmvif->bf_data.bt_coex_max_thold = + BT_ENABLE_REDUCED_TXPOWER_THRESHOLD; + mvmvif->bf_data.bt_coex_min_thold = + BT_DISABLE_REDUCED_TXPOWER_THRESHOLD; } static void iwl_mvm_bt_coex_notif_handle(struct iwl_mvm *mvm) |