1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-12 14:29:28 +00:00

[bwn] make rf-kill work for PHY-N.

This commit is contained in:
Adrian Chadd 2016-05-14 23:44:30 +00:00
parent d54c38a3e9
commit 7fb49b1e66
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=299796

View File

@ -7090,7 +7090,8 @@ bwn_rfswitch(void *arg)
KASSERT(mac->mac_status >= BWN_MAC_STATUS_STARTED,
("%s: invalid MAC status %d", __func__, mac->mac_status));
if (mac->mac_phy.rev >= 3 || mac->mac_phy.type == BWN_PHYTYPE_LP) {
if (mac->mac_phy.rev >= 3 || mac->mac_phy.type == BWN_PHYTYPE_LP
|| mac->mac_phy.type == BWN_PHYTYPE_N) {
if (!(BWN_READ_4(mac, BWN_RF_HWENABLED_HI)
& BWN_RF_HWENABLED_HI_MASK))
cur = 1;
@ -7103,6 +7104,9 @@ bwn_rfswitch(void *arg)
if (mac->mac_flags & BWN_MAC_FLAG_RADIO_ON)
prev = 1;
DPRINTF(sc, BWN_DEBUG_RESET, "%s: called; cur=%d, prev=%d\n",
__func__, cur, prev);
if (cur != prev) {
if (cur)
mac->mac_flags |= BWN_MAC_FLAG_RADIO_ON;