Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 268417
b: refs/heads/master
c: 2e08396
h: refs/heads/master
i:
  268415: c7ca31d
v: v3
  • Loading branch information
Arend van Spriel authored and Greg Kroah-Hartman committed Sep 16, 2011
1 parent f84caaf commit 61ce536
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 66 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b876618c0ce69151571f6f197e7c54fd5b80081
refs/heads/master: 2e08396da0d185d81101e96de3ac4bc65b96d2fa
62 changes: 2 additions & 60 deletions trunk/drivers/staging/brcm80211/brcmsmac/aiutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,17 +1018,9 @@ static __used void ai_nvram_process(struct si_info *sii, char *pvars)

/* do a pci config read to get subsystem id and subvendor id */
pci_read_config_dword(sii->pbus, PCI_SUBSYSTEM_VENDOR_ID, &w);
/* Let nvram variables override subsystem Vend/ID */
sii->pub.boardvendor = (u16)ai_getdevpathintvar(&sii->pub,
"boardvendor");
if (sii->pub.boardvendor == 0)
sii->pub.boardvendor = w & 0xffff;

sii->pub.boardtype = (u16)ai_getdevpathintvar(&sii->pub,
"boardtype");
if (sii->pub.boardtype == 0)
sii->pub.boardtype = (w >> 16) & 0xffff;

sii->pub.boardvendor = w & 0xffff;
sii->pub.boardtype = (w >> 16) & 0xffff;
sii->pub.boardflags = getintvar(pvars, "boardflags");
}

Expand Down Expand Up @@ -1864,56 +1856,6 @@ int ai_devpath(struct si_pub *sih, char *path, int size)
return 0;
}

/* Concatenate the dev path with a varname into the given 'var' buffer
* and return the 'var' pointer. Nothing is done to the arguments if
* len == 0 or var is NULL, var is still returned. On overflow, the
* first char will be set to '\0'.
*/
static char *ai_devpathvar(struct si_pub *sih, char *var, int len,
const char *name)
{
uint path_len;

if (!var || len <= 0)
return var;

if (ai_devpath(sih, var, len) == 0) {
path_len = strlen(var);

if (strlen(name) + 1 > (uint) (len - path_len))
var[0] = '\0';
else
strncpy(var + path_len, name, len - path_len - 1);
}

return var;
}

/* Get a variable, but only if it has a devpath prefix */
char *ai_getdevpathvar(struct si_pub *sih, const char *name)
{
char varname[SI_DEVPATH_BUFSZ + 32];

ai_devpathvar(sih, varname, sizeof(varname), name);

return getvar(NULL, varname);
}

/* Get a variable, but only if it has a devpath prefix */
int ai_getdevpathintvar(struct si_pub *sih, const char *name)
{
char varname[SI_DEVPATH_BUFSZ + 32];

ai_devpathvar(sih, varname, sizeof(varname), name);

return getintvar(NULL, varname);
}

char *ai_getnvramflvar(struct si_pub *sih, const char *name)
{
return getvar(NULL, name);
}

bool ai_pci_war16165(struct si_pub *sih)
{
struct si_info *sii;
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmsmac/aiutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,6 @@ extern bool ai_is_sprom_available(struct si_pub *sih);
* Return 0 on success, nonzero otherwise.
*/
extern int ai_devpath(struct si_pub *sih, char *path, int size);
/* Read variable with prepending the devpath to the name */
extern char *ai_getdevpathvar(struct si_pub *sih, const char *name);
extern int ai_getdevpathintvar(struct si_pub *sih, const char *name);

extern void ai_pci_sleep(struct si_pub *sih);
extern void ai_pci_down(struct si_pub *sih);
Expand All @@ -382,6 +379,4 @@ extern void ai_chipcontrl_epa4331(struct si_pub *sih, bool on);
/* Enable Ex-PA for 4313 */
extern void ai_epa_4313war(struct si_pub *sih);

char *ai_getnvramflvar(struct si_pub *sih, const char *name);

#endif /* _BRCM_AIUTILS_H_ */

0 comments on commit 61ce536

Please sign in to comment.