Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1571,6 +1571,8 @@ void rtw_core_scan_start(struct rtw_dev *rtwdev, struct rtw_vif *rtwvif,

set_bit(RTW_FLAG_DIG_DISABLE, rtwdev->flags);
set_bit(RTW_FLAG_SCANNING, rtwdev->flags);

rtw_phy_dig_set_max_coverage(rtwdev);
}

void rtw_core_scan_complete(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
Expand All @@ -1582,6 +1584,7 @@ void rtw_core_scan_complete(struct rtw_dev *rtwdev, struct ieee80211_vif *vif,
if (!rtwvif)
return;

rtw_phy_dig_reset(rtwdev);
clear_bit(RTW_FLAG_SCANNING, rtwdev->flags);
clear_bit(RTW_FLAG_DIG_DISABLE, rtwdev->flags);

Expand Down
15 changes: 15 additions & 0 deletions phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,21 @@ static void rtw_phy_statistics(struct rtw_dev *rtwdev)
#define DIG_CVRG_MIN 0x1c
#define DIG_RSSI_GAIN_OFFSET 15

void rtw_phy_dig_set_max_coverage(struct rtw_dev *rtwdev) {
rtw_dbg(rtwdev, RTW_DBG_PHY, "Setting IGI to max coverage\n");
rtw_phy_dig_write(rtwdev, DIG_CVRG_MAX);
}

void rtw_phy_dig_reset(struct rtw_dev *rtwdev) {
struct rtw_dm_info *dm_info = &rtwdev->dm_info;
u8 last_igi;

last_igi = dm_info->igi_history[0];
rtw_dbg(rtwdev, RTW_DBG_PHY, "Resetting IGI=%u\n", last_igi);

rtw_phy_dig_write(rtwdev, last_igi);
}

static bool
rtw_phy_dig_check_damping(struct rtw_dm_info *dm_info)
{
Expand Down
2 changes: 2 additions & 0 deletions phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ static inline int rtw_check_supported_rfe(struct rtw_dev *rtwdev)
}

void rtw_phy_dig_write(struct rtw_dev *rtwdev, u8 igi);
void rtw_phy_dig_reset(struct rtw_dev *rtwdev);
void rtw_phy_dig_set_max_coverage(struct rtw_dev *rtwdev);

struct rtw_power_params {
u8 pwr_base;
Expand Down