[PATCH2 07/11] staging: brcm80211: remove unused function from wlc_channel.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <brudley@xxxxxxxxxxxx>
Reviewed-by: Henry Ptasinski <henryp@xxxxxxxxxxxx>
Reviewed-by: Roland Vossen <rvossen@xxxxxxxxxxxx>
Signed-off-by: Arend van Spriel <arend@xxxxxxxxxxxx>
---
 drivers/staging/brcm80211/brcmsmac/wlc_channel.c |   67 ----------------------
 drivers/staging/brcm80211/brcmsmac/wlc_channel.h |   10 ---
 2 files changed, 0 insertions(+), 77 deletions(-)

diff --git a/drivers/staging/brcm80211/brcmsmac/wlc_channel.c b/drivers/staging/brcm80211/brcmsmac/wlc_channel.c
index a35c152..2e30d92 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 1f170af..d569ec4 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 */
-- 
1.7.1


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux