Skip to content

Commit

Permalink
staging: brcm80211: use string native library
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Sep 16, 2010
1 parent 3fb4e3d commit 48c51a8
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 292 deletions.
13 changes: 0 additions & 13 deletions drivers/staging/brcm80211/include/bcmutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,19 +165,6 @@ extern "C" {
#define PKTPRIO_UPD 0x400 /* DSCP used to update VLAN prio */
#define PKTPRIO_DSCP 0x800 /* DSCP prio found */

/* string */
extern int BCMROMFN(bcm_atoi) (char *s);
extern ulong BCMROMFN(bcm_strtoul) (char *cp, char **endp, uint base);
extern char *BCMROMFN(bcmstrstr) (char *haystack, char *needle);
extern char *BCMROMFN(bcmstrcat) (char *dest, const char *src);
extern char *BCMROMFN(bcmstrncat) (char *dest, const char *src,
uint size);
extern ulong wchar2ascii(char *abuf, ushort *wbuf, ushort wbuflen,
ulong abuflen);
char *bcmstrtok(char **string, const char *delimiters, char *tokdelim);
int bcmstricmp(const char *s1, const char *s2);
int bcmstrnicmp(const char *s1, const char *s2, int cnt);

/* ethernet address */
extern char *bcm_ether_ntoa(const struct ether_addr *ea, char *buf);
extern int BCMROMFN(bcm_ether_atoe) (char *p, struct ether_addr *ea);
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/brcm80211/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <wlc_cfg.h>

#include <osl.h>
#include <linux/kernel.h>
#include <bcmendian.h>
#include <bcmnvram.h>
#include <sbchipc.h>
Expand Down Expand Up @@ -177,7 +178,7 @@ int phy_getintvar(phy_info_t *pi, const char *name)
if (val == NULL)
return 0;

return bcm_strtoul(val, NULL, 0);
return simple_strtoul(val, NULL, 0);
}

void wlc_phyreg_enter(wlc_phy_t *pih)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/brcm80211/sys/wl_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1639,7 +1639,7 @@ static int __init wl_module_init(void)
else {
char *var = getvar(NULL, "wl_msglevel");
if (var)
wl_msg_level = bcm_strtoul(var, NULL, 0);
wl_msg_level = simple_strtoul(var, NULL, 0);
}
#ifndef WLC_HIGH_ONLY
{
Expand All @@ -1650,7 +1650,7 @@ static int __init wl_module_init(void)
else {
char *var = getvar(NULL, "phy_msglevel");
if (var)
phyhal_msg_level = bcm_strtoul(var, NULL, 0);
phyhal_msg_level = simple_strtoul(var, NULL, 0);
}
}
#endif /* WLC_HIGH_ONLY */
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/brcm80211/sys/wlc_bmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <typedefs.h>
#include <bcmdefs.h>
#include <osl.h>
#include <linux/kernel.h>
#include <proto/802.11.h>
#include <bcmwifi.h>
#include <bcmutils.h>
Expand Down Expand Up @@ -760,12 +761,12 @@ BCMATTACHFN(wlc_bmac_attach) (wlc_info_t *wlc, uint16 vendor, uint16 device,

var = getvar(vars, "vendid");
if (var) {
vendor = (uint16) bcm_strtoul(var, NULL, 0);
vendor = (uint16) simple_strtoul(var, NULL, 0);
WL_ERROR(("Overriding vendor id = 0x%x\n", vendor));
}
var = getvar(vars, "devid");
if (var) {
uint16 devid = (uint16) bcm_strtoul(var, NULL, 0);
uint16 devid = (uint16) simple_strtoul(var, NULL, 0);
if (devid != 0xffff) {
device = devid;
WL_ERROR(("Overriding device id = 0x%x\n",
Expand Down
3 changes: 1 addition & 2 deletions drivers/staging/brcm80211/sys/wlc_mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <typedefs.h>
#include <bcmdefs.h>
#include <osl.h>
#include <linux/ctype.h>
#include <bcmutils.h>
#include <bcmwifi.h>
#include <siutils.h>
Expand Down Expand Up @@ -75,8 +76,6 @@
#define W_REG(osh, r, v) RPC_WRITE_REG(osh, r, v)
#endif

#include <linux/ctype.h>

/*
* buffer length needed for wlc_format_ssid
* 32 SSID chars, max of 4 chars for each SSID char "\xFF", plus NULL.
Expand Down
3 changes: 2 additions & 1 deletion drivers/staging/brcm80211/util/bcmsrom.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <typedefs.h>
#include <bcmdefs.h>
#include <osl.h>
#include <linux/kernel.h>
#include <stdarg.h>
#include <bcmutils.h>
#include <hndsoc.h>
Expand Down Expand Up @@ -1924,7 +1925,7 @@ BCMATTACHFN(initvars_srom_pci) (si_t *sih, void *curmap, char **vars,

value = si_getdevpathvar(sih, "sromrev");
if (value) {
sromrev = (uint8) bcm_strtoul(value, NULL, 0);
sromrev = (uint8) simple_strtoul(value, NULL, 0);
flash = TRUE;
goto varscont;
}
Expand Down
Loading

0 comments on commit 48c51a8

Please sign in to comment.