Date: Fri, 16 Jan 2009 18:49:20 +0000 (UTC) From: Sam Leffler <sam@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r187335 - in user/sam/wifi/sys/dev/ath: . ath_hal Message-ID: <200901161849.n0GInKRG015578@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sam Date: Fri Jan 16 18:49:19 2009 New Revision: 187335 URL: http://svn.freebsd.org/changeset/base/187335 Log: ath_hal_getwirelessmodes should not involve regulatory; adjust the api to return what the hardware is capable of Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.c user/sam/wifi/sys/dev/ath/ath_hal/ah.h user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c user/sam/wifi/sys/dev/ath/if_ath.c Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.c Fri Jan 16 18:09:49 2009 (r187334) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.c Fri Jan 16 18:49:19 2009 (r187335) @@ -78,6 +78,15 @@ ath_hal_attach(uint16_t devid, HAL_SOFTC return AH_NULL; } +/* + * Return the mask of available modes based on the hardware capabilities. + */ +u_int +ath_hal_getwirelessmodes(struct ath_hal*ah) +{ + return ath_hal_getWirelessModes(ah); +} + /* linker set of registered RF backends */ OS_SET_DECLARE(ah_rfs, struct ath_hal_rf); Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah.h ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah.h Fri Jan 16 18:09:49 2009 (r187334) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah.h Fri Jan 16 18:49:19 2009 (r187335) @@ -873,7 +873,7 @@ extern void __ahdecl ath_hal_process_noi /* * Return bit mask of wireless modes supported by the hardware. */ -extern u_int __ahdecl ath_hal_getwirelessmodes(struct ath_hal*, HAL_CTRY_CODE); +extern u_int __ahdecl ath_hal_getwirelessmodes(struct ath_hal*); /* * Calculate the transmit duration of a frame. Modified: user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c ============================================================================== --- user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Fri Jan 16 18:09:49 2009 (r187334) +++ user/sam/wifi/sys/dev/ath/ath_hal/ah_regdomain.c Fri Jan 16 18:49:19 2009 (r187335) @@ -2126,26 +2126,6 @@ ath_hal_getwmodesnreg(struct ath_hal *ah } /* - * Return the mask of available modes based on the hardware - * capabilities and the specified country code. - */ - -u_int -ath_hal_getwirelessmodes(struct ath_hal *ah, HAL_CTRY_CODE cc) -{ - COUNTRY_CODE_TO_ENUM_RD *country = AH_NULL; - u_int mode = 0; - REG_DOMAIN rd; - - country = findCountry(cc); - if (country != AH_NULL) { - if (getWmRD(ah, country, ~CHANNEL_2GHZ, &rd)) - mode = ath_hal_getwmodesnreg(ah, country, &rd); - } - return mode; -} - -/* * Return if device is actually operating in 900 MHz band. */ HAL_BOOL Modified: user/sam/wifi/sys/dev/ath/if_ath.c ============================================================================== --- user/sam/wifi/sys/dev/ath/if_ath.c Fri Jan 16 18:09:49 2009 (r187334) +++ user/sam/wifi/sys/dev/ath/if_ath.c Fri Jan 16 18:49:19 2009 (r187335) @@ -661,7 +661,7 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); if (ath_hal_hasfastframes(ah)) ic->ic_caps |= IEEE80211_C_FF; - wmodes = ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country); + wmodes = ath_hal_getwirelessmodes(ah); if (wmodes & (HAL_MODE_108G|HAL_MODE_TURBO)) ic->ic_caps |= IEEE80211_C_TURBOP; #ifdef ATH_SUPPORT_TDMA @@ -7463,7 +7463,7 @@ ath_announce(struct ath_softc *sc) #define HAL_MODE_DUALBAND (HAL_MODE_11A|HAL_MODE_11B) struct ifnet *ifp = sc->sc_ifp; struct ath_hal *ah = sc->sc_ah; - u_int modes, cc; + u_int modes; if_printf(ifp, "mac %d.%d phy %d.%d", ah->ah_macVersion, ah->ah_macRev, @@ -7473,8 +7473,7 @@ ath_announce(struct ath_softc *sc) * to avoid falsely printing revs for inoperable parts. * Dual-band radio revs are returned in the 5Ghz rev number. */ - ath_hal_getcountrycode(ah, &cc); - modes = ath_hal_getwirelessmodes(ah, cc); + modes = ath_hal_getwirelessmodes(ah); if ((modes & HAL_MODE_DUALBAND) == HAL_MODE_DUALBAND) { if (ah->ah_analog5GhzRev && ah->ah_analog2GhzRev) printf(" 5ghz radio %d.%d 2ghz radio %d.%d",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901161849.n0GInKRG015578>