Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/bwn/if_bwnvar.h
Show First 20 Lines • Show All 123 Lines • ▼ Show 20 Lines | |||||
#define BWN_PHY_MASK(mac, offset, mask) do { \ | #define BWN_PHY_MASK(mac, offset, mask) do { \ | ||||
if (mac->mac_phy.phy_maskset != NULL) { \ | if (mac->mac_phy.phy_maskset != NULL) { \ | ||||
KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \ | KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \ | ||||
mac->mac_suspended > 0, \ | mac->mac_suspended > 0, \ | ||||
("dont access PHY or RF registers after turning on MAC")); \ | ("dont access PHY or RF registers after turning on MAC")); \ | ||||
mac->mac_phy.phy_maskset(mac, offset, mask, 0); \ | mac->mac_phy.phy_maskset(mac, offset, mask, 0); \ | ||||
} else \ | } else \ | ||||
BWN_PHY_WRITE(mac, offset, \ | BWN_PHY_WRITE(mac, offset, \ | ||||
BWN_PHY_READ(mac, offset) & mask); \ | BWN_PHY_READ(mac, offset) & (mask)); \ | ||||
} while (0) | } while (0) | ||||
#define BWN_PHY_COPY(mac, dst, src) do { \ | #define BWN_PHY_COPY(mac, dst, src) do { \ | ||||
KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \ | KASSERT(mac->mac_status < BWN_MAC_STATUS_INITED || \ | ||||
mac->mac_suspended > 0, \ | mac->mac_suspended > 0, \ | ||||
("dont access PHY or RF registers after turning on MAC")); \ | ("dont access PHY or RF registers after turning on MAC")); \ | ||||
BWN_PHY_WRITE(mac, dst, BWN_PHY_READ(mac, src)); \ | BWN_PHY_WRITE(mac, dst, BWN_PHY_READ(mac, src)); \ | ||||
} while (0) | } while (0) | ||||
#define BWN_LO_CALIB_EXPIRE (1000 * (30 - 2)) | #define BWN_LO_CALIB_EXPIRE (1000 * (30 - 2)) | ||||
▲ Show 20 Lines • Show All 1,040 Lines • Show Last 20 Lines |