Skip to content
Commit 9619a47f authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: refactor dm func set and clear



Refactor the code to set and clear "dm functions".

The only remaining callers of Switch_DM_Func use
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true) or
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false).

Remove Switch_DM_Func and call SetHwReg8188EU directly.

For HW_VAR_DM_FUNC_SET, the parameter is always DYNAMIC_ALL_FUNC_ENABLE.
This operation resets podmpriv->SupportAbility to the initial value.
Rename HW_VAR_DM_FUNC_SET to HW_VAR_DM_FUNC_RESET and drop the unused
else branch.

For HW_VAR_DM_FUNC_CLR, the parameter is always DYNAMIC_FUNC_DISABLE
(0x00). We can set podmpriv->SupportAbility to 0 directly.

Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20220321203031.143486-7-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 07142f8c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment