From f88f1b9f38f910dbb6102a1b3de2360095e4e745 Mon Sep 17 00:00:00 2001 From: Dmitry Shmidt Date: Tue, 5 Oct 2010 16:08:44 -0700 Subject: wl1271: Fix memory corruption in parameters processing Change-Id: I930417d785f9ae831c53615f6cb9f75a5ddaae33 Signed-off-by: Dmitry Shmidt --- wl1271/platforms/os/common/src/osRgstry.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'wl1271/platforms/os/common') diff --git a/wl1271/platforms/os/common/src/osRgstry.c b/wl1271/platforms/os/common/src/osRgstry.c index a4988de8..2723f94b 100644 --- a/wl1271/platforms/os/common/src/osRgstry.c +++ b/wl1271/platforms/os/common/src/osRgstry.c @@ -959,11 +959,6 @@ regFillInitTable( static TI_UINT8 tmpIeTableSize = 37; static TI_UINT8 strSize = 113; - static TI_UINT8 defRxRssiAndProcessCompensation_2_4G[] = "ec,f6,00,0c,18,f8,fc,00,08,10,f0,f8,00,0a,14"; - static TI_UINT8 tmpRssiTableSize = RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE; - static TI_UINT8 staRssiAndProcessCompensation[RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE] ; - static TI_UINT8 RssiSize = 44; - /* defaults values for CoexActivity table*/ /* example: WLAN(0), BT_VOICE(0), defPrio(20), raisePrio(25), minServ(0), maxServ(1ms) */ static TI_UINT8 defCoexActivityTable[] = ""; /* Sample "01 00 14 19 0000 0001 " */ @@ -3987,25 +3982,14 @@ regReadIntegerTable (pAdapter, &STRTxPerChannelPowerLimits_5G_OFDM, RADIO_TX_PER NUMBER_OF_5G_CHANNELS, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPerChannelPowerLimits_5G_OFDM, (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE); -/* in case of zero value, use this methode */ - RssiSize = tmpRssiTableSize*2 +tmpRssiTableSize - 1 ; /*includes spaces between bytes*/ - - - regReadStringParameter(pAdapter, &STRRxRssiAndProcessCompensation_2_4G , - (TI_INT8*)(defRxRssiAndProcessCompensation_2_4G), RssiSize, - (TI_UINT8*)staRssiAndProcessCompensation, &RssiSize); - - parseTwoDigitsSequenceHex (staRssiAndProcessCompensation , - (TI_UINT8*)&p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxRssiAndProcessCompensation_2_4G, - RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE); - - +regReadIntegerTable (pAdapter, &STRRxRssiAndProcessCompensation_2_4G, RADIO_RX_RSSI_PROCESS_2_4_DEF_TABLE, + RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE, NULL, (TI_INT8*)p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxRssiAndProcessCompensation_2_4G, + (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE); regReadIntegerTable (pAdapter, &STRRxRssiAndProcessCompensation_5G, RADIO_RX_RSSI_PROCESS_5_DEF_TABLE, RSSI_AND_PROCESS_COMPENSATION_TABLE_SIZE, NULL, (TI_INT8*)p->twdInitParams.tIniFileRadioParams.tStatRadioParams.RxRssiAndProcessCompensation_5G, (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE); - regReadIntegerTable (pAdapter, &STRTxPDVsRateOffsets_2_4G, RADIO_TX_PD_VS_RATE_OFFSET_2_4_DEF_TABLE, NUMBER_OF_RATE_GROUPS_E, NULL, (TI_INT8*)&p->twdInitParams.tIniFileRadioParams.tDynRadioParams.TxPDVsRateOffsets_2_4G, (TI_UINT32*)&uTempEntriesCount, sizeof (TI_UINT8),TI_TRUE); -- cgit v1.2.3