diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-04-26 16:06:18 +0200 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-05-05 10:04:16 +1000 |
commit | 6f6fb48026d811d763f51a458e97e9d1a5133642 (patch) | |
tree | 7a21994ae1ce7315342f16c188397f646b06c7b7 /drivers/staging/rt2870/rt_profile.c | |
parent | c0da96eb83db8409a55059e43308bde6ed347729 (diff) |
Staging: rt2870: prepare for rt{28,30}70/*.[ch] merge
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rt2870/rt_profile.c')
-rw-r--r-- | drivers/staging/rt2870/rt_profile.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/staging/rt2870/rt_profile.c b/drivers/staging/rt2870/rt_profile.c index 3496622082ed..22a0009f61cd 100644 --- a/drivers/staging/rt2870/rt_profile.c +++ b/drivers/staging/rt2870/rt_profile.c @@ -886,11 +886,13 @@ NDIS_STATUS RTMPReadParametersHook( // Save uid and gid used for filesystem access. // Set user and group to 0 (root) +#ifndef RT30xx orgfsuid = current_fsuid(); orgfsgid = current_fsgid(); /* Hm, can't really do this nicely anymore, so rely on these files * being set to the proper permission to read them... */ /* current->cred->fsuid = current->cred->fsgid = 0; */ +#endif orgfs = get_fs(); set_fs(KERNEL_DS); @@ -1435,6 +1437,23 @@ NDIS_STATUS RTMPReadParametersHook( DBGPRINT(RT_DEBUG_TRACE, ("TGnWifiTest=%d\n", pAd->StaCfg.bTGnWifiTest)); } } + +#ifdef RT30xx + { + if(RTMPGetKeyParameter("AntDiversity", tmpbuf, 10, buffer)) + { + for (i = 0, macptr = rstrtok(tmpbuf,";"); macptr; macptr = rstrtok(NULL,";"), i++) + { + if(simple_strtol(macptr, 0, 10) != 0) //Enable + pAd->CommonCfg.bRxAntDiversity = TRUE; + else //Disable + pAd->CommonCfg.bRxAntDiversity = FALSE; + + DBGPRINT(RT_DEBUG_ERROR, ("AntDiversity=%d\n", pAd->CommonCfg.bRxAntDiversity)); + } + } + } +#endif // RT30xx // } } else @@ -1547,12 +1566,21 @@ static void HTParametersHook( if (Value == 0) { pAd->CommonCfg.BACapability.field.AutoBA = FALSE; +#ifdef RT30xx + pAd->CommonCfg.BACapability.field.Policy = BA_NOTUSE; +#endif } else { pAd->CommonCfg.BACapability.field.AutoBA = TRUE; +#ifdef RT30xx + pAd->CommonCfg.BACapability.field.Policy = IMMED_BA; +#endif } pAd->CommonCfg.REGBACapability.field.AutoBA = pAd->CommonCfg.BACapability.field.AutoBA; +#ifdef RT30xx + pAd->CommonCfg.REGBACapability.field.Policy = pAd->CommonCfg.BACapability.field.Policy; +#endif DBGPRINT(RT_DEBUG_TRACE, ("HT: Auto BA = %s\n", (Value==0) ? "Disable" : "Enable")); } |