From: Arend van Spriel Date: Fri, 21 Jan 2011 10:20:12 +0000 (+0100) Subject: staging: brcm80211: remove unused function from wlc_channel.c X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=20de47a5c2d6516a4eebf874cc35ee5432955f8d;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: brcm80211: remove unused function from wlc_channel.c Working through a list of unused functions in the driver tree. This file has following redundant function(s): wlc_channel_country_abbrev wlc_channel_locale_flags wlc_channel_get_chanvec wlc_valid_40chanspec_in_band wlc_channel_set_txpower_limit wlc_valid_chanspec Reviewed-by: Brett Rudley Reviewed-by: Henry Ptasinski Reviewed-by: Roland Vossen Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c index a35c15214880..2e30d9223052 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c +++ b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c @@ -658,46 +658,11 @@ void wlc_channel_mgr_detach(wlc_cm_info_t *wlc_cm) kfree(wlc_cm); } -const char *wlc_channel_country_abbrev(wlc_cm_info_t *wlc_cm) -{ - return wlc_cm->country_abbrev; -} - -u8 wlc_channel_locale_flags(wlc_cm_info_t *wlc_cm) -{ - struct wlc_info *wlc = wlc_cm->wlc; - - return wlc_cm->bandstate[wlc->band->bandunit].locale_flags; -} - u8 wlc_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm, uint bandunit) { return wlc_cm->bandstate[bandunit].locale_flags; } -/* return chanvec for a given country code and band */ -bool -wlc_channel_get_chanvec(struct wlc_info *wlc, const char *country_abbrev, - int bandtype, chanvec_t *channels) -{ - const country_info_t *country; - const locale_info_t *locale = NULL; - - country = wlc_country_lookup(wlc, country_abbrev); - if (country == NULL) - return false; - - if (bandtype == WLC_BAND_2G) - locale = wlc_get_locale_2g(country->locale_2G); - else if (bandtype == WLC_BAND_5G) - locale = wlc_get_locale_5g(country->locale_5G); - if (locale == NULL) - return false; - - wlc_locale_get_channels(locale, channels); - return true; -} - /* set the driver's current country and regulatory information using a country code * as the source. Lookup built in country information found with the country code. */ @@ -1071,16 +1036,6 @@ bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val) val)); } -/* Is the 40 MHz allowed for the current locale and specified band? */ -bool wlc_valid_40chanspec_in_band(wlc_cm_info_t *wlc_cm, uint bandunit) -{ - struct wlc_info *wlc = wlc_cm->wlc; - - return (((wlc_cm->bandstate[bandunit]. - locale_flags & (WLC_NO_MIMO | WLC_NO_40MHZ)) == 0) - && wlc->bandstate[bandunit]->mimo_cap_40); -} - static void wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm_info_t *wlc_cm, struct txpwr_limits *txpwr, @@ -1185,23 +1140,6 @@ wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, &txpwr); } -int -wlc_channel_set_txpower_limit(wlc_cm_info_t *wlc_cm, - u8 local_constraint_qdbm) -{ - struct wlc_info *wlc = wlc_cm->wlc; - struct txpwr_limits txpwr; - - wlc_channel_reg_limits(wlc_cm, wlc->chanspec, &txpwr); - - wlc_channel_min_txpower_limits_with_local_constraint(wlc_cm, &txpwr, - local_constraint_qdbm); - - wlc_phy_txpower_limit_set(wlc->band->pi, &txpwr, wlc->chanspec); - - return 0; -} - #ifdef POWER_DBG static void wlc_phy_txpower_limits_dump(txpwr_limits_t *txpwr) { @@ -1598,11 +1536,6 @@ wlc_valid_chanspec_ext(wlc_cm_info_t *wlc_cm, chanspec_t chspec, bool dualband) return false; } -bool wlc_valid_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec) -{ - return wlc_valid_chanspec_ext(wlc_cm, chspec, false); -} - bool wlc_valid_chanspec_db(wlc_cm_info_t *wlc_cm, chanspec_t chspec) { return wlc_valid_chanspec_ext(wlc_cm, chspec, true); diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.h b/drivers/staging/brcm80211/brcmsmac/wlc_channel.h index 1f170aff68fd..d569ec45267c 100644 --- a/drivers/staging/brcm80211/brcmsmac/wlc_channel.h +++ b/drivers/staging/brcm80211/brcmsmac/wlc_channel.h @@ -112,8 +112,6 @@ extern int wlc_set_countrycode_rev(wlc_cm_info_t *wlc_cm, const char *country_abbrev, const char *ccode, int regrev); -extern const char *wlc_channel_country_abbrev(wlc_cm_info_t *wlc_cm); -extern u8 wlc_channel_locale_flags(wlc_cm_info_t *wlc_cm); extern u8 wlc_channel_locale_flags_in_band(wlc_cm_info_t *wlc_cm, uint bandunit); @@ -124,15 +122,12 @@ extern bool wlc_quiet_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec); #define VALID_CHANNEL20_IN_BAND(wlc, bandunit, val) \ wlc_valid_channel20_in_band((wlc)->cmi, bandunit, val) #define VALID_CHANNEL20(wlc, val) wlc_valid_channel20((wlc)->cmi, val) -#define VALID_40CHANSPEC_IN_BAND(wlc, bandunit) wlc_valid_40chanspec_in_band((wlc)->cmi, bandunit) -extern bool wlc_valid_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chspec); extern bool wlc_valid_chanspec_db(wlc_cm_info_t *wlc_cm, chanspec_t chspec); extern bool wlc_valid_channel20_db(wlc_cm_info_t *wlc_cm, uint val); extern bool wlc_valid_channel20_in_band(wlc_cm_info_t *wlc_cm, uint bandunit, uint val); extern bool wlc_valid_channel20(wlc_cm_info_t *wlc_cm, uint val); -extern bool wlc_valid_40chanspec_in_band(wlc_cm_info_t *wlc_cm, uint bandunit); extern void wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, @@ -140,8 +135,6 @@ extern void wlc_channel_reg_limits(wlc_cm_info_t *wlc_cm, extern void wlc_channel_set_chanspec(wlc_cm_info_t *wlc_cm, chanspec_t chanspec, u8 local_constraint_qdbm); -extern int wlc_channel_set_txpower_limit(wlc_cm_info_t *wlc_cm, - u8 local_constraint_qdbm); extern const country_info_t *wlc_country_lookup(struct wlc_info *wlc, const char *ccode); @@ -152,8 +145,5 @@ extern const locale_info_t *wlc_get_locale_5g(u8 locale_idx); extern bool wlc_japan(struct wlc_info *wlc); extern u8 wlc_get_regclass(wlc_cm_info_t *wlc_cm, chanspec_t chanspec); -extern bool wlc_channel_get_chanvec(struct wlc_info *wlc, - const char *country_abbrev, int bandtype, - chanvec_t *channels); #endif /* _WLC_CHANNEL_H */