git: 6e5056a903cc - main - bwi: Remove write-only variable
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 05 Apr 2022 19:55:56 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6e5056a903ccad5c5e9da543f77f9e0fe55489fb commit 6e5056a903ccad5c5e9da543f77f9e0fe55489fb Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-04-05 19:07:20 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-04-05 19:52:54 +0000 bwi: Remove write-only variable bbp_atten is write-only: we don't use it later in bwi_rf_calc_nrssi_slope_11b. However, we may also be able to eliminate the read of this value from the device. However, The documationation for this hardware is thing and I can't test this card so I've left the read of this register in case it's required. Sponsored by: Netflix --- sys/dev/bwi/bwirf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/bwi/bwirf.c b/sys/dev/bwi/bwirf.c index 1345c64d126a..e3a3d1b88e5f 100644 --- a/sys/dev/bwi/bwirf.c +++ b/sys/dev/bwi/bwirf.c @@ -1649,7 +1649,7 @@ bwi_rf_calc_nrssi_slope_11b(struct bwi_mac *mac) struct bwi_phy *phy = &mac->mac_phy; uint16_t save_rf[SAVE_RF_MAX]; uint16_t save_phy[SAVE_PHY_MAX]; - uint16_t ant_div, bbp_atten, chan_ex; + uint16_t ant_div, chan_ex; int16_t nrssi[2]; int i; @@ -1662,7 +1662,7 @@ bwi_rf_calc_nrssi_slope_11b(struct bwi_mac *mac) save_phy[i] = PHY_READ(mac, save_phy_regs[i]); ant_div = CSR_READ_2(sc, BWI_RF_ANTDIV); - bbp_atten = CSR_READ_2(sc, BWI_BBP_ATTEN); + CSR_READ_2(sc, BWI_BBP_ATTEN); chan_ex = CSR_READ_2(sc, BWI_RF_CHAN_EX); /*