rtl8188eu: Fill out set/get txpower

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2022-07-16 13:21:15 -05:00
parent a36cfdfdb6
commit 318a5f1d15

View file

@ -3212,7 +3212,13 @@ static int cfg80211_rtw_set_txpower(struct wiphy *wiphy,
enum tx_power_setting type, int dbm) enum tx_power_setting type, int dbm)
#endif #endif
{ {
RTW_INFO("%s\n", __func__); _adapter *padapter = wiphy_to_adapter(wiphy);
int dbm = MBM_TO_DBM(mbm);
if (dbm > 18)
dbm = 18;
padapter->mppriv.txpoweridx = (u8)dbm;
SetTxPower(padapter);
return 0; return 0;
} }
@ -3222,9 +3228,9 @@ static int cfg80211_rtw_get_txpower(struct wiphy *wiphy,
#endif #endif
int *dbm) int *dbm)
{ {
RTW_INFO("%s\n", __func__); _adapter *padapter = wiphy_to_adapter(wiphy);
*dbm = (12); *dbm = padapter->mppriv.txpoweridx;
return 0; return 0;
} }