fix Self-control mechanism transtype 15

Signed-off-by: wang_mingxu <wangmingxu9@huawei.com>
This commit is contained in:
wang_mingxu 2024-10-29 10:03:09 +08:00
parent eb4726ee38
commit 127e48a7c2
2 changed files with 11 additions and 0 deletions

View File

@ -266,6 +266,10 @@ static void SetLanePowerStatus(bool status)
static void HandleDetectWifiDirectApply(PowerControlInfo *powerInfo, WifiDirectLinkInfo *wifiDirectInfo)
{
if (powerInfo == NULL || wifiDirectInfo == NULL) {
LNN_LOGE(LNN_LANE, "invalid param");
return;
}
if (powerInfo->isDisableLowPower) {
if (powerInfo->transType == LANE_T_BYTE || powerInfo->transType == LANE_T_MSG) {
powerInfo->isChangedPid = true;
@ -333,6 +337,10 @@ void DetectDisableWifiDirectApply(void)
void DetectEnableWifiDirectApply(PowerControlInfo *powerInfo)
{
if (powerInfo == NULL) {
LNN_LOGE(LNN_LANE, "invalid param");
return;
}
WifiDirectLinkInfo wifiDirectInfo;
(void)memset_s(&wifiDirectInfo, sizeof(wifiDirectInfo), 0, sizeof(wifiDirectInfo));
if (LaneLock() != SOFTBUS_OK) {

View File

@ -1346,6 +1346,9 @@ static void FreeLowPriorityLink(uint32_t laneReqId, LaneLinkType linkType)
void ProcessPowerControlInfoByLaneReqId(const LaneLinkType linkType, uint32_t laneReqId)
{
if (laneReqId == INVALID_LANE_REQ_ID) {
return;
}
PowerControlInfo powerInfo;
(void)memset_s(&powerInfo, sizeof(powerInfo), 0, sizeof(powerInfo));
if (Lock() != SOFTBUS_OK) {