From 43b099231f754502335acf5cd363c4d9cf62033a Mon Sep 17 00:00:00 2001 From: kimocoder Date: Thu, 19 Sep 2019 15:27:45 +0000 Subject: [PATCH] Fix update channel info --- os_dep/linux/ioctl_cfg80211.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index ec37415..d750e4a 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -6123,7 +6123,11 @@ static int cfg80211_rtw_set_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), chan_target, chan_width, chan_offset); + padapter->mlmeextpriv.cur_channel = target_channel; + rtw_ps_deny(padapter, PS_DENY_IOCTL); + //LeaveAllPowerSaveModeDirect(padapter); /* leave PS mode for guaranteeing to access hw register successfully */ rtw_set_chbw_cmd(padapter, chan_target, chan_width, chan_offset, RTW_CMDF_WAIT_ACK); + rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL); return 0; } @@ -6223,7 +6227,10 @@ static int cfg80211_rtw_set_monitor_channel(struct wiphy *wiphy RTW_INFO(FUNC_ADPT_FMT" ch:%d bw:%d, offset:%d\n" , FUNC_ADPT_ARG(padapter), target_channal, target_width, target_offset); + padapter->mlmeextpriv.cur_channel = target_channel; + rtw_ps_deny(padapter, PS_DENY_IOCTL); rtw_set_chbw_cmd(padapter, target_channal, target_width, target_offset, RTW_CMDF_WAIT_ACK); + rtw_ps_deny_cancel(padapter, PS_DENY_IOCTL); return 0; }