diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-02-08 10:08:54 -0800 |
---|---|---|
committer | Dmitry Shmidt <dimitrysh@google.com> | 2010-02-08 10:08:54 -0800 |
commit | 5d969c3c4738de33d100a514cc06079c1fdaa0e7 (patch) | |
tree | f55d35d14ea24ef50233710e099f2d7039f9cb26 | |
parent | 69393dd0f4849bf4756c71f1b56e37560a00ab90 (diff) | |
download | wlan-5d969c3c4738de33d100a514cc06079c1fdaa0e7.tar.gz |
wl1271: tiwlan.ini custom changes and minor fixes.
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
-rw-r--r-- | wl1271/config/tiwlan.ini | 19 | ||||
-rw-r--r-- | wl1271/platforms/os/linux/build/Makefile | 1 | ||||
-rw-r--r-- | wl1271/platforms/os/linux/src/WlanDrvIf.c | 80 | ||||
-rw-r--r-- | wl1271/platforms/os/linux/src/osmemapi.c | 23 |
4 files changed, 74 insertions, 49 deletions
diff --git a/wl1271/config/tiwlan.ini b/wl1271/config/tiwlan.ini index 73028e16..28f8d775 100644 --- a/wl1271/config/tiwlan.ini +++ b/wl1271/config/tiwlan.ini @@ -1,5 +1,12 @@ # The letters in this file are case sensitive, use lower case only !!! +coexWlanActiveBtAclMasterMinEDR = 20 +coexWlanActiveBtAclMasterMaxEDR = 50 +coexWlanActiveMaxBtAclMasterEDR = 10 +coexWlanActiveBtAclSlaveMinEDR = 20 +coexWlanActiveBtAclSlaveMinEDR = 50 +coexWlanActiveMaxBtAclSlaveEDR = 10 + SmeConnectMode = 1 #0 - auto, 1 - manual WME_Enable = 1 #0=diable WME support / 1=Enable dot11NetworkType = 3 #2 - A only mode, 3 - B/G mode, 4 - A/G Dual mode @@ -24,10 +31,10 @@ dot11PowerMode = 0 #0 - Auto PowerMgmtHangOverPeriod = 10 #in mSec units -AutoPowerModeDozeMode = 2 #2 - Short Doze +AutoPowerModeDozeMode = 3 #2 - Short Doze #3 - Long Doze -AutoPowerModeActiveTh = 2 #packets per second +AutoPowerModeActiveTh = 15 #packets per second AutoPowerModeDozeTh = 8 #packets per seconds - threshold for entering ELP in Auto mode @@ -49,7 +56,7 @@ dot11RTSThreshold = 4096 WPAMixedMode= 1 RSNPreAuthentication = 1 -CalibrationChannel24 = 1 +CalibrationChannel24 = 7 CalibrationChannel5 = 36 # Regulatury Domain tables. @@ -137,9 +144,9 @@ QOS_txBlksThresholdVO = 20 # desiredPsMode = 1 # Global Power save delivery protocol (1 - UPSD, 0 - Legacy) -QOS_wmePsModeBE = 0 # Power save delivery protocol for BE AC (1 - UPSD, 0 - Legacy) -QOS_wmePsModeBK = 0 # Power save delivery protocol for BK AC (1 - UPSD, 0 - Legacy) -QOS_wmePsModeVI = 0 # Power save delivery protocol for VI AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeBE = 1 # Power save delivery protocol for BE AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeBK = 1 # Power save delivery protocol for BK AC (1 - UPSD, 0 - Legacy) +QOS_wmePsModeVI = 1 # Power save delivery protocol for VI AC (1 - UPSD, 0 - Legacy) QOS_wmePsModeVO = 1 # Power save delivery protocol for VO AC (1 - UPSD, 0 - Legacy) # diff --git a/wl1271/platforms/os/linux/build/Makefile b/wl1271/platforms/os/linux/build/Makefile index c93bb801..6ca370c0 100644 --- a/wl1271/platforms/os/linux/build/Makefile +++ b/wl1271/platforms/os/linux/build/Makefile @@ -48,7 +48,6 @@ OS_SRCS = \ $(DK_ROOT)/platforms/os/linux/src/RxBuf.c \ $(DK_ROOT)/platforms/hw/linux/host_platform.c \ $(DK_ROOT)/external_drivers/sdio/linux/SdioDrv.c -# $(DK_ROOT)/external_drivers/$(HOST_PLATFORM)/Linux/sdio/SdioDrv.c # $(DK_ROOT)/platforms/hw/host_platform_$(HOST_PLATFORM)/linux/host_platform.c ifeq ($(STACK_PROFILING_ON),y) diff --git a/wl1271/platforms/os/linux/src/WlanDrvIf.c b/wl1271/platforms/os/linux/src/WlanDrvIf.c index ab322c7b..7f5368ea 100644 --- a/wl1271/platforms/os/linux/src/WlanDrvIf.c +++ b/wl1271/platforms/os/linux/src/WlanDrvIf.c @@ -482,28 +482,34 @@ int wlanDrvIf_LoadFiles (TWlanDrvIfObj *drv, TLoaderFilesData *pInitFiles) */ int wlanDrvIf_GetFile (TI_HANDLE hOs, TFileInfo *pFileInfo) { - TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs; + TWlanDrvIfObj *drv = (TWlanDrvIfObj *)hOs; if (drv == NULL || pFileInfo == NULL) { ti_dprintf(TIWLAN_LOG_ERROR, "wlanDrv_GetFile: ERROR: Null File Handler, Exiting"); return TI_NOK; } - /* Future option for getting the FW image part by part */ - pFileInfo->hOsFileDesc = NULL; - - /* Fill the file's location and size in the file's info structure */ - switch (pFileInfo->eFileType) - { - case FILE_TYPE_INI: - pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tIniFile.pImage; - pFileInfo->uLength = drv->tCommon.tIniFile.uSize; - break; - case FILE_TYPE_NVS: - pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tNvsImage.pImage; - pFileInfo->uLength = drv->tCommon.tNvsImage.uSize; - break; + /* Future option for getting the FW image part by part */ + pFileInfo->hOsFileDesc = NULL; + + /* Fill the file's location and size in the file's info structure */ + switch (pFileInfo->eFileType) + { + case FILE_TYPE_INI: + pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tIniFile.pImage; + pFileInfo->uLength = drv->tCommon.tIniFile.uSize; + break; + case FILE_TYPE_NVS: + pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tNvsImage.pImage; + pFileInfo->uLength = drv->tCommon.tNvsImage.uSize; + break; case FILE_TYPE_FW: + if (drv->tCommon.tFwImage.pImage == NULL) + { + ti_dprintf(TIWLAN_LOG_ERROR, "wlanDrv_GetFile: ERROR: no Firmware image, exiting\n"); + return TI_NOK; + } + pFileInfo->pBuffer = (TI_UINT8 *)drv->tCommon.tFwImage.pImage; pFileInfo->bLast = TI_FALSE; pFileInfo->uLength = 0; @@ -575,16 +581,16 @@ int wlanDrvIf_GetFile (TI_HANDLE hOs, TFileInfo *pFileInfo) pFileInfo->bLast = TI_TRUE; } - break; - } + break; + } - /* Call the requester callback */ - if (pFileInfo->fCbFunc) - { - pFileInfo->fCbFunc (pFileInfo->hCbHndl); - } + /* Call the requester callback */ + if (pFileInfo->fCbFunc) + { + pFileInfo->fCbFunc (pFileInfo->hCbHndl); + } - return TI_OK; + return TI_OK; } @@ -626,6 +632,7 @@ void wlanDrvIf_SetMacAddress (TI_HANDLE hOs, TI_UINT8 *pMacAddr) int wlanDrvIf_Start (struct net_device *dev) { TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev); + int status; ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Start()\n"); printk("%s\n", __func__); @@ -634,18 +641,25 @@ int wlanDrvIf_Start (struct net_device *dev) return -ENODEV; } + if (DRV_STATE_FAILED == drv->tCommon.eDriverState) + { + ti_dprintf (TIWLAN_LOG_ERROR, "wlanDrvIf_Start() Driver failed!\n"); + return -ENODEV; + } + /* * Insert Start command in DrvMain action queue, request driver scheduling * and wait for action completion (all init process). */ os_wake_lock_timeout_enable(drv); - drvMain_InsertAction (drv->tCommon.hDrvMain, ACTION_TYPE_START); - return 0; + status = drvMain_InsertAction (drv->tCommon.hDrvMain, ACTION_TYPE_START); + return (status) ? -1 : 0; } int wlanDrvIf_Open (struct net_device *dev) { TWlanDrvIfObj *drv = (TWlanDrvIfObj *)NETDEV_GET_PRIVATE(dev); + int status = 0; ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Open()\n"); printk("%s\n", __func__); @@ -654,10 +668,10 @@ int wlanDrvIf_Open (struct net_device *dev) return -ENODEV; } - if (drv->tCommon.eDriverState == DRV_STATE_STOPPED || - drv->tCommon.eDriverState == DRV_STATE_IDLE) { - wlanDrvIf_Start(dev); - } + if (drv->tCommon.eDriverState == DRV_STATE_STOPPED || + drv->tCommon.eDriverState == DRV_STATE_IDLE) { + status = wlanDrvIf_Start(dev); + } /* * Finalize network interface setup @@ -676,7 +690,7 @@ int wlanDrvIf_Open (struct net_device *dev) sdioDrv_register_pm(wlanDrvIf_pm_resume, wlanDrvIf_pm_suspend); #endif #endif - return 0; + return status; } /** @@ -698,6 +712,12 @@ int wlanDrvIf_Stop (struct net_device *dev) ti_dprintf (TIWLAN_LOG_OTHER, "wlanDrvIf_Stop()\n"); printk("%s\n", __func__); + + if (DRV_STATE_FAILED == drv->tCommon.eDriverState) + { + return -ENODEV; + } + /* * Insert Stop command in DrvMain action queue, request driver scheduling * and wait for Stop process completion. diff --git a/wl1271/platforms/os/linux/src/osmemapi.c b/wl1271/platforms/os/linux/src/osmemapi.c index e0e2fe2c..85a77535 100644 --- a/wl1271/platforms/os/linux/src/osmemapi.c +++ b/wl1271/platforms/os/linux/src/osmemapi.c @@ -116,22 +116,22 @@ os_memoryAlloc( #endif { if (in_atomic()) - { - blk = kmalloc(total_size, GFP_ATOMIC); - } - else - { - blk = kmalloc(total_size, GFP_KERNEL); - } - if (!blk) - { + { + blk = kmalloc(total_size, GFP_ATOMIC); + } + else + { + blk = kmalloc(total_size, GFP_KERNEL); + } + if (!blk) + { printk("%s: NULL\n",__func__); return NULL; } blk->f_free = (os_free)kfree; } - else - { + else + { /* We expect that the big allocations should be made outside the interrupt, otherwise fail */ @@ -248,7 +248,6 @@ os_memoryFree( } os_profile (OsContext, 5, blk->size + sizeof(struct os_mem_block) + sizeof(__u32)); - blk->f_free(blk); } |