summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Ptasinski <henryp@broadcom.com>2010-10-08 02:52:10 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-08 03:03:27 (GMT)
commit51c5651da4bf37f0cbb488d9c6f9044da659c367 (patch)
treebb9a419135b143c6a0cebffc267fe78125fa2dc5
parent4ca70f7fcbf9a4cd44c52f582ef4cfb678f3f560 (diff)
downloadlinux-fsl-qoriq-51c5651da4bf37f0cbb488d9c6f9044da659c367.tar.xz
staging: brcm80211: Remove dead code from bcmwifi.c
Removed unused functions wf_chspec_ntoa() and wf_chspec_aton(). Signed-off-by: Henry Ptasinski <henryp@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/brcm80211/include/bcmwifi.h15
-rw-r--r--drivers/staging/brcm80211/util/bcmwifi.c126
2 files changed, 0 insertions, 141 deletions
diff --git a/drivers/staging/brcm80211/include/bcmwifi.h b/drivers/staging/brcm80211/include/bcmwifi.h
index b85fea31..20ae84e 100644
--- a/drivers/staging/brcm80211/include/bcmwifi.h
+++ b/drivers/staging/brcm80211/include/bcmwifi.h
@@ -129,21 +129,6 @@ typedef u16 chanspec_t;
#define WLC_2G_25MHZ_OFFSET 5 /* 2.4GHz band channel offset */
/*
- * Convert chanspec to ascii string
- * @param chspec chanspec format
- * @param buf ascii string of chanspec
- * @return pointer to buf with room for at least CHANSPEC_STR_LEN bytes
- */
-extern char *wf_chspec_ntoa(chanspec_t chspec, char *buf);
-
-/*
- * Convert ascii string to chanspec
- * @param a pointer to input string
- * @return >= 0 if successful or 0 otherwise
- */
-extern chanspec_t wf_chspec_aton(char *a);
-
-/*
* Verify the chanspec is using a legal set of parameters, i.e. that the
* chanspec specified a band, bw, ctl_sb and channel and that the
* combination could be legal given any set of circumstances.
diff --git a/drivers/staging/brcm80211/util/bcmwifi.c b/drivers/staging/brcm80211/util/bcmwifi.c
index 4e89867..c51fea0 100644
--- a/drivers/staging/brcm80211/util/bcmwifi.c
+++ b/drivers/staging/brcm80211/util/bcmwifi.c
@@ -22,132 +22,6 @@
#include <bcmutils.h>
#include <bcmwifi.h>
-/* Chanspec ASCII representation:
- * <channel><band><bandwidth><ctl-sideband>
- * digit [AB] [N] [UL]
- *
- * <channel>: channel number of the 10MHz or 20MHz channel,
- * or control sideband channel of 40MHz channel.
- * <band>: A for 5GHz, B for 2.4GHz
- * <bandwidth>: N for 10MHz, nothing for 20MHz or 40MHz
- * (ctl-sideband spec implies 40MHz)
- * <ctl-sideband>: U for upper, L for lower
- *
- * <band> may be omitted on input, and will be assumed to be
- * 2.4GHz if channel number <= 14.
- *
- * Examples:
- * 8 -> 2.4GHz channel 8, 20MHz
- * 8b -> 2.4GHz channel 8, 20MHz
- * 8l -> 2.4GHz channel 8, 40MHz, lower ctl sideband
- * 8a -> 5GHz channel 8 (low 5 GHz band), 20MHz
- * 36 -> 5GHz channel 36, 20MHz
- * 36l -> 5GHz channel 36, 40MHz, lower ctl sideband
- * 40u -> 5GHz channel 40, 40MHz, upper ctl sideband
- * 180n -> channel 180, 10MHz
- */
-
-/* given a chanspec and a string buffer, format the chanspec as a
- * string, and return the original pointer a.
- * Min buffer length must be CHANSPEC_STR_LEN.
- * On error return NULL
- */
-char *wf_chspec_ntoa(chanspec_t chspec, char *buf)
-{
- const char *band, *bw, *sb;
- uint channel;
-
- band = "";
- bw = "";
- sb = "";
- channel = CHSPEC_CHANNEL(chspec);
- /* check for non-default band spec */
- if ((CHSPEC_IS2G(chspec) && channel > CH_MAX_2G_CHANNEL) ||
- (CHSPEC_IS5G(chspec) && channel <= CH_MAX_2G_CHANNEL))
- band = (CHSPEC_IS2G(chspec)) ? "b" : "a";
- if (CHSPEC_IS40(chspec)) {
- if (CHSPEC_SB_UPPER(chspec)) {
- sb = "u";
- channel += CH_10MHZ_APART;
- } else {
- sb = "l";
- channel -= CH_10MHZ_APART;
- }
- } else if (CHSPEC_IS10(chspec)) {
- bw = "n";
- }
-
- /* Outputs a max of 6 chars including '\0' */
- snprintf(buf, 6, "%d%s%s%s", channel, band, bw, sb);
- return buf;
-}
-
-/* given a chanspec string, convert to a chanspec.
- * On error return 0
- */
-chanspec_t wf_chspec_aton(char *a)
-{
- char *endp = NULL;
- uint channel, band, bw, ctl_sb;
- char c;
-
- channel = simple_strtoul(a, &endp, 10);
-
- /* check for no digits parsed */
- if (endp == a)
- return 0;
-
- if (channel > MAXCHANNEL)
- return 0;
-
- band =
- ((channel <=
- CH_MAX_2G_CHANNEL) ? WL_CHANSPEC_BAND_2G : WL_CHANSPEC_BAND_5G);
- bw = WL_CHANSPEC_BW_20;
- ctl_sb = WL_CHANSPEC_CTL_SB_NONE;
-
- a = endp;
-
- c = tolower(a[0]);
- if (c == '\0')
- goto done;
-
- /* parse the optional ['A' | 'B'] band spec */
- if (c == 'a' || c == 'b') {
- band = (c == 'a') ? WL_CHANSPEC_BAND_5G : WL_CHANSPEC_BAND_2G;
- a++;
- c = tolower(a[0]);
- if (c == '\0')
- goto done;
- }
-
- /* parse bandwidth 'N' (10MHz) or 40MHz ctl sideband ['L' | 'U'] */
- if (c == 'n') {
- bw = WL_CHANSPEC_BW_10;
- } else if (c == 'l') {
- bw = WL_CHANSPEC_BW_40;
- ctl_sb = WL_CHANSPEC_CTL_SB_LOWER;
- /* adjust channel to center of 40MHz band */
- if (channel <= (MAXCHANNEL - CH_20MHZ_APART))
- channel += CH_10MHZ_APART;
- else
- return 0;
- } else if (c == 'u') {
- bw = WL_CHANSPEC_BW_40;
- ctl_sb = WL_CHANSPEC_CTL_SB_UPPER;
- /* adjust channel to center of 40MHz band */
- if (channel > CH_20MHZ_APART)
- channel -= CH_10MHZ_APART;
- else
- return 0;
- } else {
- return 0;
- }
-
- done:
- return channel | band | bw | ctl_sb;
-}
-
/*
* Verify the chanspec is using a legal set of parameters, i.e. that the
* chanspec specified a band, bw, ctl_sb and channel and that the