[PATCH 23/41] staging: rtl8188eu: Remove unused function Efuse_PgPacketWrite_BT()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c |9 - drivers/staging/rtl8188eu/include/hal_intf.h |3 --- 2 files changed, 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 9321546..f2ca6d4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -221,15 +221,6 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo) return result; } -static int Efuse_PgPacketWrite_BT(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo) -{ - int ret; - - ret = pAdapter->HalFunc.Efuse_PgPacketWrite_BT(pAdapter, offset, word_en, data, pseudo); - - return ret; -} - /*- * Function: efuse_WordEnableDataRead * diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index cacf9df..a86b3f8 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -233,9 +233,6 @@ struct hal_ops { enum rf_radio_path eRFPath, u32 RegAddr, u32 BitMask, u32 Data); - bool(*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset, - u8 word_en, u8 *data, bool test); - void (*sreset_init_value)(struct adapter *padapter); u8 (*sreset_get_wifi_status)(struct adapter *padapter); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/41] staging: rtl8188eu: Remove function rtw_BT_efuse_map_read()
rtl8188eu is not a wifi/bluetooth combo device, so remove bluetooth related code. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 17 -- drivers/staging/rtl8188eu/include/rtw_efuse.h |2 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 78 3 files changed, 97 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index f2ca6d4..7e126ce 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -345,23 +345,6 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) return _SUCCESS; } -u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) -{ - u16 mapLen = 0; - - EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen); - - if ((addr + cnts) > mapLen) - return _FAIL; - - Efuse_PowerSwitch(padapter, false, true); - - efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false); - - Efuse_PowerSwitch(padapter, false, false); - - return _SUCCESS; -} /* */ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) { diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index 7df0441..41d6cf2 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -123,8 +123,6 @@ u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr, u16 cnts, u8 *data); u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); -u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr, -u16 cnts, u8 *data); u16 Efuse_GetCurrentSize(struct adapter *adapter, bool test); u8 Efuse_CalculateWordCnts(u8 word_en); void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test); diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 79a1ac4..56e24fa 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -5883,77 +5883,6 @@ static int rtw_mp_efuse_get(struct net_device *dev, efuse_GetCurrentSize(padapter, &raw_cursize); raw_maxsize = efuse_GetMaxSize(padapter); sprintf(extra, "[available raw size] = %d bytes", raw_maxsize-raw_cursize); - } else if (strcmp(tmp[0], "btfmap") == 0) { - mapLen = EFUSE_BT_MAX_MAP_LEN; - if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) { - DBG_88E("%s: rtw_BT_efuse_map_read Fail!!\n", __func__); - err = -EFAULT; - goto exit; - } - - sprintf(extra, "\n"); - for (i = 0; i < 512; i += 16) { - /* set 512 because the iwpriv's extra size have limit 0x7FF */ - sprintf(extra, "%s0x%03x\t", extra, i); - for (j = 0; j < 8; j++) - sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]); - sprintf(extra, "%s\t", extra); - for (; j < 16; j++) - sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]); - sprintf(extra, "%s\n", extra); - } - } else if (strcmp(tmp[0], "btbmap") == 0) { - mapLen = EFUSE_BT_MAX_MAP_LEN; - if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) { - DBG_88E("%s: rtw_BT_efuse_map_read Fail!!\n", __func__); - err = -EFAULT; - goto exit; - } - - sprintf(extra, "\n"); - for (i = 512; i < 1024; i += 16) { - sprintf(extra, "%s0x%03x\t", extra, i); - for (j = 0; j < 8; j++) - sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]); - sprintf(extra, "%s\t", extra); - for (; j < 16; j++) - sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]); - sprintf(extra, "%s\n", extra); - } - } else if (strcmp(tmp[0], "btrmap") == 0) { - if ((tmp[1] == NULL) || (tmp[2] == NULL)) { -
[PATCH 26/41] staging: rtl8188eu: Remove unused function EFUSE_Read1Byte()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 59 - drivers/staging/rtl8188eu/include/rtw_efuse.h |1 - 2 files changed, 60 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 16377f6..dc82973 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -63,65 +63,6 @@ Efuse_CalculateWordCnts(u8 word_en) return word_cnts; } -/*- - * Function: EFUSE_Read1Byte - * - * Overview: Copy from WMAC fot EFUSE read 1 byte. - * - * Input: NONE - * - * Output: NONE - * - * Return: NONE - * - * Revised History: - * WhenWho Remark - * 09/23/2008 MHC Copy from WMAC. - * - *---*/ -u8 EFUSE_Read1Byte(struct adapter *Adapter, u16 Address) -{ - u8 data; - u8 Bytetemp = {0x00}; - u8 temp = {0x00}; - u32 k = 0; - u16 contentLen = 0; - - EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen); - - if (Address < contentLen) { /* E-fuse 512Byte */ - /* Write E-fuse Register address bit0~7 */ - temp = Address & 0xFF; - usb_write8(Adapter, EFUSE_CTRL+1, temp); - Bytetemp = usb_read8(Adapter, EFUSE_CTRL+2); - /* Write E-fuse Register address bit8~9 */ - temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC); - usb_write8(Adapter, EFUSE_CTRL+2, temp); - - /* Write 0x30[31]= 0 */ - Bytetemp = usb_read8(Adapter, EFUSE_CTRL+3); - temp = Bytetemp & 0x7F; - usb_write8(Adapter, EFUSE_CTRL+3, temp); - - /* Wait Write-ready (0x30[31]= 1) */ - Bytetemp = usb_read8(Adapter, EFUSE_CTRL+3); - while (!(Bytetemp & 0x80)) { - Bytetemp = usb_read8(Adapter, EFUSE_CTRL+3); - k++; - if (k == 1000) { - k = 0; - break; - } - } - data = usb_read8(Adapter, EFUSE_CTRL); - return data; - } else { - return 0xFF; - } - -} /* EFUSE_Read1Byte */ - -/* 11/16/2008 MH Read one byte from real Efuse. */ u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data, bool pseudo) { u8 tmpidx = 0; diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index d8be20d..0849f85 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -140,7 +140,6 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata); u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr, u8 word_en, u8 *data, bool test); -u8 EFUSE_Read1Byte(struct adapter *adapter, u16 address); void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test); void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/41] staging: rtl8188eu: efuse_OneByteRead():Remove unused parameter bool test
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|4 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 44 ++--- drivers/staging/rtl8188eu/include/rtw_efuse.h |2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index dc82973..6ba8cbfa 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -63,7 +63,7 @@ Efuse_CalculateWordCnts(u8 word_en) return word_cnts; } -u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data, bool pseudo) +u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data) { u8 tmpidx = 0; u8 result; @@ -154,7 +154,7 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata) static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value) { - return efuse_OneByteRead(padapter, address, value, false); + return efuse_OneByteRead(padapter, address, value); } static u8 efuse_write8(struct adapter *padapter, u16 address, u8 *value) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 1e9ece2..8d76946 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -904,8 +904,8 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e efuse_OneByteWrite(pAdapter, start_addr++, data[0], bPseudoTest); efuse_OneByteWrite(pAdapter, start_addr++, data[1], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[0], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[1], bPseudoTest); + efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[0]); + efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[1]); if ((data[0] != tmpdata[0]) || (data[1] != tmpdata[1])) badworden &= (~BIT0); } @@ -914,8 +914,8 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e efuse_OneByteWrite(pAdapter, start_addr++, data[2], bPseudoTest); efuse_OneByteWrite(pAdapter, start_addr++, data[3], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[2], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[3], bPseudoTest); + efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[2]); + efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[3]); if ((data[2] != tmpdata[2]) || (data[3] != tmpdata[3])) badworden &= (~BIT1); } @@ -924,8 +924,8 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e efuse_OneByteWrite(pAdapter, start_addr++, data[4], bPseudoTest); efuse_OneByteWrite(pAdapter, start_addr++, data[5], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[4], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[5], bPseudoTest); + efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[4]); + efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[5]); if ((data[4] != tmpdata[4]) || (data[5] != tmpdata[5])) badworden &= (~BIT2); } @@ -934,8 +934,8 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e efuse_OneByteWrite(pAdapter, start_addr++, data[6], bPseudoTest); efuse_OneByteWrite(pAdapter, start_addr++, data[7], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[6], bPseudoTest); - efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[7], bPseudoTest); + efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[6]); + efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[7]); if ((data[6] != tmpdata[6]) || (data[7] != tmpdata[7])) badworden &= (~BIT3); } @@ -955,13 +955,13 @@ u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest) rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr); while (bContinual && - efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest) && + efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && AVAILABLE_EFUSE_ADDR(efuse_addr)) { if (efuse_data != 0xFF) { if ((efuse_data&0x1F) == 0x0F) {/* extended header */ hoffset = efuse_data;
[PATCH 39/41] staging: rtl8188eu: rtw_efuse.c: Remove unused local variables
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index a0204ed..26d1d51 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -24,24 +24,6 @@ #include #include -/*Define local variable--*/ -u8 fakeEfuseBank; -u32 fakeEfuseUsedBytes; -u8 fakeEfuseContent[EFUSE_MAX_HW_SIZE] = {0}; -u8 fakeEfuseInitMap[EFUSE_MAX_MAP_LEN] = {0}; -u8 fakeEfuseModifiedMap[EFUSE_MAX_MAP_LEN] = {0}; - -u32 BTEfuseUsedBytes; -u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE]; -u8 BTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0}; -u8 BTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0}; - -u32 fakeBTEfuseUsedBytes; -u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE]; -u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0}; -u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0}; -/*Define local variable--*/ - /* */ #define REG_EFUSE_CTRL 0x0030 #define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/41] staging: rtl8188eu: hal_EfuseCheckIfDatafollowed(): Remove unused parameter
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 1945099..ed9e42c 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -1257,7 +1257,7 @@ static bool wordEnMatched(struct pgpkt *pTargetPkt, struct pgpkt *pCurPkt, return false; } -static bool hal_EfuseCheckIfDatafollowed(struct adapter *pAdapter, u8 word_cnts, u16 startAddr, bool bPseudoTest) +static bool hal_EfuseCheckIfDatafollowed(struct adapter *pAdapter, u8 word_cnts, u16 startAddr) { bool bRet = false; u8 i, efuse_data; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 38/41] staging: rtl8188eu: rtw_efuse.c: Remove unused global variables
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_efuse.h | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index 00f8797..b608b92 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -99,24 +99,6 @@ struct efuse_hal { u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN]; }; -/*Export global variable*/ -extern u8 fakeEfuseBank; -extern u32 fakeEfuseUsedBytes; -extern u8 fakeEfuseContent[]; -extern u8 fakeEfuseInitMap[]; -extern u8 fakeEfuseModifiedMap[]; - -extern u32 BTEfuseUsedBytes; -extern u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE]; -extern u8 BTEfuseInitMap[]; -extern u8 BTEfuseModifiedMap[]; - -extern u32 fakeBTEfuseUsedBytes; -extern u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE]; -extern u8 fakeBTEfuseInitMap[]; -extern u8 fakeBTEfuseModifiedMap[]; -/*Export global variable*/ - u8 efuse_GetCurrentSize(struct adapter *adapter, u16 *size); u16 efuse_GetMaxSize(struct adapter *adapter); u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/41] staging: rtl8188eu: Efuse_WordEnableDataWrite(): Remove unused parameter test
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |8 drivers/staging/rtl8188eu/include/rtw_efuse.h |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index b895d36..1945099 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -882,7 +882,7 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v } } -u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest) +u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data) { u16 tmpaddr = 0; u16 start_addr = efuse_addr; @@ -1071,7 +1071,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) { /* check if data exist */ - badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pFixPkt->word_en, originaldata, bPseudoTest); + badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pFixPkt->word_en, originaldata); if (badworden != 0xf) { /* write fail */ PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest); @@ -1198,7 +1198,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u u32 PgWriteSuccess = 0; badworden = 0x0f; - badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pTargetPkt->word_en, pTargetPkt->data, bPseudoTest); + badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pTargetPkt->word_en, pTargetPkt->data); if (badworden == 0x0F) { /* write ok */ return true; @@ -1325,7 +1325,7 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u (!hal_EfuseCheckIfDatafollowed(pAdapter, curPkt.word_cnts, startAddr+1, bPseudoTest)) && wordEnMatched(pTargetPkt, &curPkt, &matched_wden)) { /* Here to write partial data */ - badworden = Efuse_WordEnableDataWrite(pAdapter, startAddr+1, matched_wden, pTargetPkt->data, bPseudoTest); + badworden = Efuse_WordEnableDataWrite(pAdapter, startAddr+1, matched_wden, pTargetPkt->data); if (badworden != 0x0F) { u32 PgWriteSuccess = 0; /* if write fail on some words, write these bad words again */ diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index 1de6fa7..f8737a4 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -138,7 +138,7 @@ bool Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data, bool test); void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata); u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr, -u8 word_en, u8 *data, bool test); +u8 word_en, u8 *data); void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype); void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/41] staging: rtl8188eu: Remove bool bPseudoTest parameter from efuse functions
In most of the functions bPseudoTest is not used and in remaining ones it's always false. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|2 +- drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c |4 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 68 + drivers/staging/rtl8188eu/include/rtw_efuse.h |5 +- 4 files changed, 33 insertions(+), 46 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index bfa6588..a0204ed 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -306,7 +306,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) } if (word_en != 0xF) { - ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false); + ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata); DBG_88E("offset=%x\n", offset); DBG_88E("word_en=%x\n", word_en); diff --git a/drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c b/drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c index e62cca8..10c9b6d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c +++ b/drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c @@ -1179,7 +1179,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv) ppgpkt->offset)); Efuse_PowerSwitch(Adapter, false, true); - if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false) == true) + if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data) == true) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; else status = NDIS_STATUS_FAILURE; @@ -1190,7 +1190,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv) ppgpkt->offset, ppgpkt->word_en)); Efuse_PowerSwitch(Adapter, true, true); - if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false) == true) + if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data) == true) *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len; else status = NDIS_STATUS_FAILURE; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index ed9e42c..0de4a91 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -733,22 +733,19 @@ hal_EfusePgPacketWrite2ByteHeader( struct adapter *pAdapter, u8 efuseType, u16 *pAddr, - struct pgpkt *pTargetPkt, - bool bPseudoTest); + struct pgpkt *pTargetPkt); static bool hal_EfusePgPacketWrite1ByteHeader( struct adapter *pAdapter, u8 efuseType, u16 *pAddr, - struct pgpkt *pTargetPkt, - bool bPseudoTest); + struct pgpkt *pTargetPkt); static bool hal_EfusePgPacketWriteData( struct adapter *pAdapter, u8 efuseType, u16 *pAddr, - struct pgpkt *pTargetPkt, - bool bPseudoTest); + struct pgpkt *pTargetPkt); /* * Function: Efuse_PowerSwitch @@ -975,7 +972,7 @@ u16 Efuse_GetCurrentSize(struct adapter *pAdapter) return efuse_addr; } -int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest) +int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data) { u8 ReadState = PG_STATE_HEADER; int bContinual = true; @@ -1061,7 +1058,7 @@ int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseu return true; } -static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, struct pgpkt *pFixPkt, u16 *pAddr, bool bPseudoTest) +static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, struct pgpkt *pFixPkt, u16 *pAddr) { u8 originaldata[8], badworden = 0; u16 efuse_addr = *pAddr; @@ -1069,12 +1066,12 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st _rtw_memset((void *)originaldata, 0xff, 8); - if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) { + if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata)) { /* check if data exist */
[PATCH 29/41] staging: rtl8188eu: efuse_ReadEFuse(): Remove parameter bool bPseudoTest
bPseudoTest is always false. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|4 ++-- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 20 ++-- drivers/staging/rtl8188eu/include/rtw_efuse.h |2 +- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 9519888..ecfd311 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -232,7 +232,7 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) Efuse_PowerSwitch(padapter, false, true); - efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false); + efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data); Efuse_PowerSwitch(padapter, false, false); @@ -415,7 +415,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse, EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen); - efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo); + efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse); Efuse_PowerSwitch(pAdapter, false, false); } diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index ff5dfff..7ef2313 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -807,23 +807,15 @@ void Efuse_PowerSwitch( } } -void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest) +void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf) { - if (!bPseudoTest) { - int ret = _FAIL; - if (rtw_IOL_applied(Adapter)) { - rtw_hal_power_on(Adapter); - iol_mode_enable(Adapter, 1); - ret = iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf); - iol_mode_enable(Adapter, 0); - - if (_SUCCESS == ret) - goto exit; - } + if (rtw_IOL_applied(Adapter)) { + rtw_hal_power_on(Adapter); + iol_mode_enable(Adapter, 1); + iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf); + iol_mode_enable(Adapter, 0); } - -exit: return; } diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index cd96366..fc87388 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -131,7 +131,7 @@ u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data); u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data); void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, - u16 _size_byte, u8 *pbuf, bool bPseudoTest); + u16 _size_byte, u8 *pbuf); void Efuse_PowerSwitch(struct adapter *adapt, u8 bWrite, u8 PwrState); int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test); bool Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/41] staging: rtl8188eu: EFUSE_ShadowMapUpdate():Remove unused parameter bool test
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|3 +-- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |4 ++-- drivers/staging/rtl8188eu/include/rtw_efuse.h |2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index c7ea214..bfa6588 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -438,8 +438,7 @@ static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse) *---*/ void EFUSE_ShadowMapUpdate( struct adapter *pAdapter, - u8 efuseType, - bool pseudo) + u8 efuseType) { struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter); u16 mapLen = 0; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 61bff1a..b895d36 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -1629,13 +1629,13 @@ Hal_InitPGData88E(struct adapter *padapter) if (!pEEPROM->bautoload_fail_flag) { /* autoload OK. */ if (!is_boot_from_eeprom(padapter)) { /* Read EFUSE real map to shadow. */ - EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false); + EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI); } } else {/* autoload fail */ RT_TRACE(_module_hci_hal_init_c_, _drv_notice_, ("AutoLoad Fail reported from CR9346!!\n")); /* update to default value 0xFF */ if (!is_boot_from_eeprom(padapter)) - EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false); + EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI); } } diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index 23a0168..1de6fa7 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -140,7 +140,7 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata); u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr, u8 word_en, u8 *data, bool test); -void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test); +void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype); void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val); #endif -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 40/41] staging: rtl8188eu: rtw_efuse.c: Remove unnecessary comments
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c | 125 ++-- 1 file changed, 24 insertions(+), 101 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 26d1d51..7eb8946 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -24,14 +24,10 @@ #include #include -/* */ #define REG_EFUSE_CTRL 0x0030 #define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */ -/* */ -/* 11/16/2008 MH Add description. Get current efuse area enabled word!!. */ -u8 -Efuse_CalculateWordCnts(u8 word_en) +u8 Efuse_CalculateWordCnts(u8 word_en) { u8 word_cnts = 0; if (!(word_en & BIT(0))) @@ -50,8 +46,6 @@ u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data) u8 tmpidx = 0; u8 result; - /* -e-fuse reg ctrl - */ - /* address */ usb_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr & 0xff)); usb_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) & 0x03)) | (usb_read8(pAdapter, EFUSE_CTRL+2) & 0xFC)); @@ -70,14 +64,11 @@ u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data) return result; } -/* 11/16/2008 MH Write one byte to reald Efuse. */ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data) { u8 tmpidx = 0; u8 result; - /* -e-fuse reg ctrl - */ - /* address */ usb_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff)); usb_write8(pAdapter, EFUSE_CTRL+2, (usb_read8(pAdapter, EFUSE_CTRL+2) & 0xFC) | @@ -97,23 +88,9 @@ u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data) return result; } -/*- - * Function: efuse_WordEnableDataRead - * - * Overview: Read allowed word in current efuse section data. - * - * Input: NONE - * - * Output: NONE - * - * Return: NONE - * - * Revised History: - * WhenWho Remark - * 11/16/2008 MHC Create Version 0. - * 11/21/2008 MHC Fix Write bug when we only enable late word. - * - *---*/ +/* + * Overview: Read allowed word in current efuse section data. + */ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata) { if (!(word_en&BIT(0))) { @@ -186,14 +163,14 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts return res; } -/* */ + u16 efuse_GetMaxSize(struct adapter *padapter) { u16 max_size; EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size); return max_size; } -/* */ + u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size) { Efuse_PowerSwitch(padapter, false, true); @@ -202,7 +179,7 @@ u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size) return _SUCCESS; } -/* */ + u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) { u16 mapLen = 0; @@ -221,7 +198,6 @@ u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) return _SUCCESS; } -/* */ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data) { u8 offset, word_en; @@ -313,24 +289,13 @@ exit: return ret; } -/*- - * Function: efuse_ShadowRead1Byte - * efuse_ShadowRead2Byte - * efuse_ShadowRead4Byte - * - * Overview: Read from efuse init map by one/two/four bytes ! - * - * Input: NONE - * - * Output: NONE - * - * Return: NONE - * - * Revised History: - * WhenWho Remark - * 11/12/2008 MHC Create Version 0. +/* + * Function: efuse_ShadowRead1Byte + * efuse_ShadowRead2Byte + * efuse_ShadowRead4Byte * - *---*/ + * Overview: Read from efuse init map by one/two/four bytes ! + */ static void efuse_ShadowRead1Byte( struct adapter *pAdapter, @@ -341,9 +306,8 @@ efuse_ShadowRead1Byte( *Value = pEEPROM->efuse_eeprom_data[Offset]; -} /* EFUSE_ShadowRead1Byte */ +} -/* Read Two Bytes */ static void efuse_ShadowRead2Byte( struct adapter *pAdapter, @@ -355,9 +319,8 @@ efuse_ShadowRead2Byte( *Value = pEEPROM->efuse_eeprom_data[Offset]; *Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8; -} /* EFUSE_Shadow
[PATCH 41/41] staging: rtl8188eu: Move all efuse related code to rtw_efuse.c
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c| 871 drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 875 + drivers/staging/rtl8188eu/include/rtl8188e_hal.h |2 + 3 files changed, 875 insertions(+), 873 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index 7eb8946..672bfed 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -23,10 +23,881 @@ #include #include #include +#include +#include #define REG_EFUSE_CTRL 0x0030 #define EFUSE_CTRL REG_EFUSE_CTRL /* E-Fuse Control. */ +enum{ + VOLTAGE_V25 = 0x03, + LDOE25_SHIFT= 28 , + }; + +/* + * Function: Efuse_PowerSwitch + * + * Overview: When we want to enable write operation, we should change to + * pwr on state. When we stop write, we should switch to 500k mode + * and disable LDO 2.5V. + */ + +void Efuse_PowerSwitch( + struct adapter *pAdapter, + u8 bWrite, + u8 PwrState) +{ + u8 tempval; + u16 tmpV16; + + if (PwrState) { + usb_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON); + + /* 1.2V Power: From VDDON with Power Cut(0xh[15]), defualt valid */ + tmpV16 = usb_read16(pAdapter, REG_SYS_ISO_CTRL); + if (!(tmpV16 & PWC_EV12V)) { + tmpV16 |= PWC_EV12V; +usb_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16); + } + /* Reset: 0xh[28], default valid */ + tmpV16 = usb_read16(pAdapter, REG_SYS_FUNC_EN); + if (!(tmpV16 & FEN_ELDR)) { + tmpV16 |= FEN_ELDR; + usb_write16(pAdapter, REG_SYS_FUNC_EN, tmpV16); + } + + /* Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */ + tmpV16 = usb_read16(pAdapter, REG_SYS_CLKR); + if ((!(tmpV16 & LOADER_CLK_EN)) || (!(tmpV16 & ANA8M))) { + tmpV16 |= (LOADER_CLK_EN | ANA8M); + usb_write16(pAdapter, REG_SYS_CLKR, tmpV16); + } + + if (bWrite) { + /* Enable LDO 2.5V before read/write action */ + tempval = usb_read8(pAdapter, EFUSE_TEST+3); + tempval &= 0x0F; + tempval |= (VOLTAGE_V25 << 4); + usb_write8(pAdapter, EFUSE_TEST+3, (tempval | 0x80)); + } + } else { + usb_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF); + + if (bWrite) { + /* Disable LDO 2.5V after read/write action */ + tempval = usb_read8(pAdapter, EFUSE_TEST+3); + usb_write8(pAdapter, EFUSE_TEST+3, (tempval & 0x7F)); + } + } +} + +static void +efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf) +{ + u8 *efuseTbl = NULL; + u8 rtemp8; + u16 eFuse_Addr = 0; + u8 offset, wren; + u16 i, j; + u16 **eFuseWord = NULL; + u16 efuse_utilized = 0; + u8 u1temp = 0; + + efuseTbl = (u8 *)rtw_zmalloc(EFUSE_MAP_LEN_88E); + if (efuseTbl == NULL) { + DBG_88E("%s: alloc efuseTbl fail!\n", __func__); + goto exit; + } + + eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16)); + if (eFuseWord == NULL) { + DBG_88E("%s: alloc eFuseWord fail!\n", __func__); + goto exit; + } + + /* 0. Refresh efuse init map as all oxFF. */ + for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) + for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++) + eFuseWord[i][j] = 0x; + + /* */ + /* 1. Read the first byte to check if efuse is empty!!! */ + /* */ + /* */ + rtemp8 = *(phymap+eFuse_Addr); + if (rtemp8 != 0xFF) { + efuse_utilized++; + eFuse_Addr++; + } else { + DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =%x\n", eFuse_Addr, rtemp8); + goto exit; + } + + /* */ + /* 2. Read real efuse content. Filter PG header and every section data. */ + /* */ + while ((rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) { + /* Check PG header for section num. */ + if ((rtemp8 & 0x1F) == 0x0F) {
[PATCH 31/41] staging: rtl8188eu: Efuse_ReadAllMap(): Remove unused parameter bool test
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index dfbb774..c7ea214 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -407,7 +407,7 @@ efuse_ShadowRead4Byte( * 11/11/2008 MHC Create Version 0. * *---*/ -static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse, bool pseudo) +static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse) { u16 mapLen = 0; @@ -449,7 +449,7 @@ void EFUSE_ShadowMapUpdate( if (pEEPROM->bautoload_fail_flag) _rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen); else - Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, pseudo); + Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data); } /* EFUSE_ShadowMapUpdate */ /*- -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/41] staging: rtl8188eu: rtl8188e_hal_init.c: Remove forward declarations
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 0de4a91..cf94e46 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -728,25 +728,6 @@ enum{ LDOE25_SHIFT= 28 , }; -static bool -hal_EfusePgPacketWrite2ByteHeader( - struct adapter *pAdapter, - u8 efuseType, - u16 *pAddr, - struct pgpkt *pTargetPkt); -static bool -hal_EfusePgPacketWrite1ByteHeader( - struct adapter *pAdapter, - u8 efuseType, - u16 *pAddr, - struct pgpkt *pTargetPkt); -static bool -hal_EfusePgPacketWriteData( - struct adapter *pAdapter, - u8 efuseType, - u16 *pAddr, - struct pgpkt *pTargetPkt); - /* * Function: Efuse_PowerSwitch * -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/41] staging: rtl8188eu: hal_EfusePartialWriteCheck(): Remove bluetooth specific code
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index cf94e46..10ff404 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -1257,12 +1257,8 @@ static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len); EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&efuse_max); - if (efuseType == EFUSE_WIFI) { - rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr); - startAddr %= EFUSE_REAL_CONTENT_LEN; - } else { - startAddr = (u16)(BTEfuseUsedBytes%EFUSE_REAL_CONTENT_LEN); - } + rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr); + startAddr %= EFUSE_REAL_CONTENT_LEN; while (1) { if (startAddr >= efuse_max_available_len) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/41] staging: rtl8188eu: Efuse_GetCurrentSize(): Remove parameter bool test
test is always false. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|2 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 16 +--- drivers/staging/rtl8188eu/include/rtw_efuse.h |2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index ecfd311..dfbb774 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -215,7 +215,7 @@ u16 efuse_GetMaxSize(struct adapter *padapter) u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size) { Efuse_PowerSwitch(padapter, false, true); - *size = Efuse_GetCurrentSize(padapter, false); + *size = Efuse_GetCurrentSize(padapter); Efuse_PowerSwitch(padapter, false, false); return _SUCCESS; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 7ef2313..61bff1a 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -934,17 +934,14 @@ u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_e return badworden; } -u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest) +u16 Efuse_GetCurrentSize(struct adapter *pAdapter) { int bContinual = true; u16 efuse_addr = 0; u8 hoffset = 0, hworden = 0; u8 efuse_data, word_cnts = 0; - if (bPseudoTest) - efuse_addr = (u16)(fakeEfuseUsedBytes); - else - rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr); + rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr); while (bContinual && efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && @@ -973,10 +970,7 @@ u16 Efuse_GetCurrentSize(struct adapter *pAdapter, bool bPseudoTest) } } - if (bPseudoTest) - fakeEfuseUsedBytes = efuse_addr; - else - rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr); + rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr); return efuse_addr; } @@ -1085,7 +1079,7 @@ static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, st if (!PgWriteSuccess) return false; else - efuse_addr = Efuse_GetCurrentSize(pAdapter, bPseudoTest); + efuse_addr = Efuse_GetCurrentSize(pAdapter); } else { efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1; } @@ -1374,7 +1368,7 @@ hal_EfusePgCheckAvailableAddr( /* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */ EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len); - if (Efuse_GetCurrentSize(pAdapter, bPseudoTest) >= efuse_max_available_len) + if (Efuse_GetCurrentSize(pAdapter) >= efuse_max_available_len) return false; return true; } diff --git a/drivers/staging/rtl8188eu/include/rtw_efuse.h b/drivers/staging/rtl8188eu/include/rtw_efuse.h index fc87388..23a0168 100644 --- a/drivers/staging/rtl8188eu/include/rtw_efuse.h +++ b/drivers/staging/rtl8188eu/include/rtw_efuse.h @@ -123,7 +123,7 @@ u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr, u16 cnts, u8 *data); u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data); -u16 Efuse_GetCurrentSize(struct adapter *adapter, bool test); +u16 Efuse_GetCurrentSize(struct adapter *adapter); u8 Efuse_CalculateWordCnts(u8 word_en); void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1, void *out); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/7] staging: rtl8188eu: Consolidate usb operation code.
navin patidar (7): staging: rtl8188eu: Merge hal/usb_ops_linux.c into os_dep/usb_ops_linux.c staging: rtl8188eu: Remove macros specific to kernel version < 2.6.12 staging:rtl8188eu:usb_ops.h:Remove unused enum, macros and function declaration staging: rtl8188eu: usb_ops.h: Remove macro rtw_usb_control_msg() staging: rtl8188eu: Remove inline function rtw_inc_and_chk_continual_urb_error() staging: rtl8188eu: Remove continual_urb_error from struct dvobj_priv staging: rtl8188eu: Merge usb_ops.h into usb_ops_linux.h drivers/staging/rtl8188eu/Makefile|1 - drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|1 - drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/core/rtw_xmit.c |1 - drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |2 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c|2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c |1 - drivers/staging/rtl8188eu/hal/usb_ops_linux.c | 665 - drivers/staging/rtl8188eu/include/drv_types.h |2 - drivers/staging/rtl8188eu/include/usb_ops.h | 112 drivers/staging/rtl8188eu/include/usb_ops_linux.h | 25 + drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |2 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c |4 +- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 630 ++- 16 files changed, 658 insertions(+), 794 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/hal/usb_ops_linux.c delete mode 100644 drivers/staging/rtl8188eu/include/usb_ops.h -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/7] staging: rtl8188eu: usb_ops.h: Remove macro rtw_usb_control_msg()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/usb_ops.h |5 - drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h index 74009ca..79d206e 100644 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ b/drivers/staging/rtl8188eu/include/usb_ops.h @@ -32,11 +32,6 @@ #define MAX_VENDOR_REQ_CMD_SIZE254 /* 8188cu SIE Support */ #define MAX_USB_IO_CTL_SIZE(MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) -#define rtw_usb_control_msg(dev, pipe, request, requesttype, \ - value, index, data, size, timeout_ms) \ - usb_control_msg((dev), (pipe), (request), (requesttype), (value),\ - (index), (data), (size), (timeout_ms)) - #include /* diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 7563188..363f7f5 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -273,7 +273,7 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i memcpy(pIo_buf, pdata, len); } - status = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); + status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == len) { /* Success this control transfer. */ rtw_reset_continual_urb_error(dvobjpriv); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/7] staging: rtl8188eu: Merge hal/usb_ops_linux.c into os_dep/usb_ops_linux.c
Consolidate all usb operation related functions in one file. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/Makefile |1 - drivers/staging/rtl8188eu/hal/usb_ops_linux.c| 665 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 642 - 3 files changed, 641 insertions(+), 667 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/hal/usb_ops_linux.c diff --git a/drivers/staging/rtl8188eu/Makefile b/drivers/staging/rtl8188eu/Makefile index 74a032c..2745076 100644 --- a/drivers/staging/rtl8188eu/Makefile +++ b/drivers/staging/rtl8188eu/Makefile @@ -46,7 +46,6 @@ r8188eu-y := \ hal/rtl8188eu_recv.o\ hal/rtl8188eu_xmit.o\ hal/usb_halinit.o \ - hal/usb_ops_linux.o \ os_dep/ioctl_linux.o\ os_dep/mlme_linux.o \ os_dep/os_intfs.o \ diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c deleted file mode 100644 index 1002ff0..000 --- a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c +++ /dev/null @@ -1,665 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#define _HCI_OPS_OS_C_ - -#include -#include -#include -#include -#include -#include - -static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype) -{ - struct dvobj_priv *dvobjpriv = adapter_to_dvobj(adapt); - struct usb_device *udev = dvobjpriv->pusbdev; - unsigned int pipe; - int status = 0; - u8 reqtype; - u8 *pIo_buf; - int vendorreq_times = 0; - - if ((adapt->bSurpriseRemoved) || (adapt->pwrctrlpriv.pnp_bstop_trx)) { - RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usbctrl_vendorreq:(adapt->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n")); - status = -EPERM; - goto exit; - } - - if (len > MAX_VENDOR_REQ_CMD_SIZE) { - DBG_88E("[%s] Buffer len error ,vendor request failed\n", __func__); - status = -EINVAL; - goto exit; - } - - _enter_critical_mutex(&dvobjpriv->usb_vendor_req_mutex, NULL); - - /* Acquire IO memory for vendorreq */ - pIo_buf = dvobjpriv->usb_vendor_req_buf; - - if (pIo_buf == NULL) { - DBG_88E("[%s] pIo_buf == NULL\n", __func__); - status = -ENOMEM; - goto release_mutex; - } - - while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) { - _rtw_memset(pIo_buf, 0, len); - - if (requesttype == 0x01) { - pipe = usb_rcvctrlpipe(udev, 0);/* read_in */ - reqtype = REALTEK_USB_VENQT_READ; - } else { - pipe = usb_sndctrlpipe(udev, 0);/* write_out */ - reqtype = REALTEK_USB_VENQT_WRITE; - memcpy(pIo_buf, pdata, len); - } - - status = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); - - if (status == len) { /* Success this control transfer. */ - rtw_reset_continual_urb_error(dvobjpriv); - if (requesttype == 0x01) - memcpy(pdata, pIo_buf, len); - } else { /* error cases */ - DBG_88E("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n", - value, (requesttype == 0x01) ? "read" : "write", - len, status, *(u32 *)pdata, vendorreq_times); - - if (status < 0) { - if (status == (-ESHUTDOWN) || status == -ENODEV) { - adapt->bSurpriseRemoved = true; -
[PATCH 2/7] staging: rtl8188eu: Remove macros specific to kernel version < 2.6.12
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/usb_ops.h | 16 +--- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h index ff730f4..e10b711 100644 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ b/drivers/staging/rtl8188eu/include/usb_ops.h @@ -38,7 +38,6 @@ enum{ #define MAX_VENDOR_REQ_CMD_SIZE254 /* 8188cu SIE Support */ #define MAX_USB_IO_CTL_SIZE(MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) #define rtw_usb_control_msg(dev, pipe, request, requesttype, \ value, index, data, size, timeout_ms) \ usb_control_msg((dev), (pipe), (request), (requesttype), (value),\ @@ -46,20 +45,7 @@ enum{ #define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \ usb_bulk_msg((usb_dev), (pipe), (data), (len), \ (actual_length), (timeout_ms)) -#else -#define rtw_usb_control_msg(dev, pipe, request, requesttype, \ - value, index, data, size, timeout_ms) \ - usb_control_msg((dev), (pipe), (request), (requesttype),\ - (value), (index), (data), (size), \ - ((timeout_ms) == 0) || \ - ((timeout_ms)*HZ/1000 > 0) ?\ - ((timeout_ms)*HZ/1000) : 1) -#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, \ -actual_length, timeout_ms) \ - usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \ -((timeout_ms) == 0) || ((timeout_ms)*HZ/1000 > 0) ?\ -((timeout_ms)*HZ/1000) : 1) -#endif + #include void rtl8188eu_set_hw_type(struct adapter *padapter); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/7] staging:rtl8188eu:usb_ops.h:Remove unused enum, macros and function declaration
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/usb_ops.h | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h index e10b711..74009ca 100644 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ b/drivers/staging/rtl8188eu/include/usb_ops.h @@ -27,13 +27,7 @@ #define REALTEK_USB_VENQT_READ 0xC0 #define REALTEK_USB_VENQT_WRITE0x40 -#define REALTEK_USB_VENQT_CMD_REQ 0x05 -#define REALTEK_USB_VENQT_CMD_IDX 0x00 -enum{ - VENDOR_WRITE = 0x00, - VENDOR_READ = 0x01, -}; #define ALIGNMENT_UNIT 16 #define MAX_VENDOR_REQ_CMD_SIZE254 /* 8188cu SIE Support */ #define MAX_USB_IO_CTL_SIZE(MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) @@ -42,14 +36,9 @@ enum{ value, index, data, size, timeout_ms) \ usb_control_msg((dev), (pipe), (request), (requesttype), (value),\ (index), (data), (size), (timeout_ms)) -#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \ - usb_bulk_msg((usb_dev), (pipe), (data), (len), \ -(actual_length), (timeout_ms)) #include -void rtl8188eu_set_hw_type(struct adapter *padapter); - /* * Increase and check if the continual_urb_error of this @param dvobjprivei * is larger than MAX_CONTINUAL_URB_ERR -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 5/7] staging: rtl8188eu: Remove inline function rtw_inc_and_chk_continual_urb_error()
rtw_inc_and_chk_continual_urb_error() is used to check if device is removed unexpectedly, to do that we can just check status of urb in usb_read_port_complete() and usbctrl_vendorreq() doed that by checking return value of usb_control_msg(). Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/usb_ops.h | 19 --- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c | 10 +- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h index 79d206e..eb934bf 100644 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ b/drivers/staging/rtl8188eu/include/usb_ops.h @@ -35,25 +35,6 @@ #include /* - * Increase and check if the continual_urb_error of this @param dvobjprivei - * is larger than MAX_CONTINUAL_URB_ERR - * @return true: - * @return false: - */ -static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj) -{ - int ret = false; - int value; - value = atomic_inc_return(&dvobj->continual_urb_error); - if (value > MAX_CONTINUAL_URB_ERR) { - DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n", - dvobj, value, MAX_CONTINUAL_URB_ERR); - ret = true; - } - return ret; -} - -/* * Set the continual_urb_error of this @param dvobjprive to 0 */ static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj) diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 363f7f5..9f9bb06 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -300,11 +300,6 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i } } - if (rtw_inc_and_chk_continual_urb_error(dvobjpriv)) { - adapt->bSurpriseRemoved = true; - break; - } - } /* firmware download is checksumed, don't retry */ @@ -432,15 +427,12 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) skb_put(precvbuf->pskb, purb->actual_length); precvbuf->pskb = NULL; - if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(adapt))) - adapt->bSurpriseRemoved = true; - switch (purb->status) { case -EINVAL: case -EPIPE: case -ENODEV: case -ESHUTDOWN: - RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete:bSurpriseRemoved=true\n")); + adapt->bSurpriseRemoved = true; case -ENOENT: adapt->bDriverStopped = true; RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete:bDriverStopped=true\n")); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/7] staging: rtl8188eu: Remove continual_urb_error from struct dvobj_priv
rtw_inc_and_chk_continual_urb_error() was only user of continual_urb_error, which has been removed. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/drv_types.h|2 -- drivers/staging/rtl8188eu/include/usb_ops.h |8 drivers/staging/rtl8188eu/os_dep/usb_intf.c |2 -- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |3 --- 4 files changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/drv_types.h b/drivers/staging/rtl8188eu/include/drv_types.h index 6750135..097fcc9 100644 --- a/drivers/staging/rtl8188eu/include/drv_types.h +++ b/drivers/staging/rtl8188eu/include/drv_types.h @@ -174,8 +174,6 @@ struct dvobj_priv { struct usb_interface *pusbintf; struct usb_device *pusbdev; - - atomic_t continual_urb_error; }; static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj) diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h index eb934bf..ea23b459 100644 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ b/drivers/staging/rtl8188eu/include/usb_ops.h @@ -34,14 +34,6 @@ #include -/* -* Set the continual_urb_error of this @param dvobjprive to 0 -*/ -static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj) -{ - atomic_set(&dvobj->continual_urb_error, 0); -} - #define USB_HIGH_SPEED_BULK_SIZE 512 #define USB_FULL_SPEED_BULK_SIZE 64 diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index c4a4880..4af2c95 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -121,8 +121,6 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf) if (!pdvobjpriv->usb_vendor_req_buf) goto free_dvobj; - rtw_reset_continual_urb_error(pdvobjpriv); - usb_get_dev(pusbd); status = _SUCCESS; diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 9f9bb06..ad7c48e 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -276,7 +276,6 @@ static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 i status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT); if (status == len) { /* Success this control transfer. */ - rtw_reset_continual_urb_error(dvobjpriv); if (requesttype == 0x01) memcpy(pdata, pIo_buf, len); } else { /* error cases */ @@ -408,8 +407,6 @@ static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs) usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf); DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__); } else { - rtw_reset_continual_urb_error(adapter_to_dvobj(adapt)); - skb_put(precvbuf->pskb, purb->actual_length); skb_queue_tail(&precvpriv->rx_skb_queue, precvbuf->pskb); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 7/7] staging: rtl8188eu: Merge usb_ops.h into usb_ops_linux.h
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|1 - drivers/staging/rtl8188eu/core/rtw_recv.c |1 - drivers/staging/rtl8188eu/core/rtw_xmit.c |1 - drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |2 - drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c|2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c |1 - drivers/staging/rtl8188eu/include/usb_ops.h | 55 - drivers/staging/rtl8188eu/include/usb_ops_linux.h | 25 ++ drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|1 - drivers/staging/rtl8188eu/os_dep/recv_linux.c |2 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c |2 +- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |1 - 13 files changed, 29 insertions(+), 67 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/usb_ops.h diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index f1398ab..3dea17f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c @@ -26,7 +26,6 @@ #include #include -#include extern void indicate_wx_scan_complete_event(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 0e73df5..eaf43f2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index a113f0f..eb938a5 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 7ea0320..4d3ea7c 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -28,8 +28,6 @@ #include -#include - void iol_mode_enable(struct adapter *padapter, u8 enable) { u8 reg_0xf0 = 0; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c index 0f6222d..32e59c5 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index 4bc2ce0..3112e6c 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include s32rtl8188eu_init_xmit_priv(struct adapter *adapt) diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 03701ca..8c26d0a 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h deleted file mode 100644 index ea23b459..000 --- a/drivers/staging/rtl8188eu/include/usb_ops.h +++ /dev/null @@ -1,55 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#ifndef __USB_OPS_H_ -#define __USB_OPS_H_ - -#include -#include -#include -#include - -#define REALTEK_USB_VENQT_READ 0xC0 -#define REALTEK_USB_VENQT_WRITE0x40 - -#define ALIGNMENT_UNIT 16 -#define MAX_VENDOR_REQ_CMD_SIZE254 /* 8188cu SIE Support */ -#define MAX_USB_IO_CTL_SIZE(MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT) - -#include - -#define USB_HIGH_SPEED_BULK_SIZE 512 -#define
[PATCH 00/42] Remove dummy and wrapper functions.
navin patidar (42): staging: rtl8188eu: Remove dummy function odm_DynamicTxPower() staging: rtl8188eu: Remove dummy function CheckFwRsvdPageContent() staging: rtl8188eu: Remove dummy rtl8188e_GetHalODMVar() and its wrapper staging: rtl8188eu: Remove dummy rtl8188e_start_thread() and its wrapper staging: rtl8188eu: Remove dummy rtl8188e_stop_thread() and its wrapper staging: rtl8188eu: Remove dummy function Hal_InitChannelPlan() staging: rtl8188eu: Remove dummy rtl8188eu_free_xmit_priv() and its wrapper staging: rtl8188eu: Remove function _rtw_memset() staging: rtl8188eu: Remove rtw_mfree2d(), wrapper for kfree() staging: rtl8188eu: Remove unused function rtw_list_insert_head() staging: rtl8188eu: Remove rtw_list_insert_tail(), wrapper for list_add_tail() staging: rtl8188eu: Remove function rtw_end_of_queue_search() staging: rtl8188eu: Remove rtw_is_list_empty(), wrapper for list_emty() staging: rtl8188eu: Remove _rtw_init_listhead(), wrapper for INIT_LIST_HEAD() staging: rtl8188eu: Remove unused function rtw_sleep_schedulable() staging: rtl8188eu: Use kstrtoul() for string to long conversion staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc() staging: rtl8188eu: Remove unused function rtw_division64() staging: rtl8188eu: Remove unused function rtw_get_time_interval_ms() staging: rtl8188eu: osdep_service.h: Remove unused macro, enum and variables staging: rtl8188eu: Replace rtw_list_delete() with list_del_init() staging: rtl8188eu: osdep_service.c: Remove unused macro staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty() staging: rtl8188eu: Replace _cancel_workitem_sync() with cancel_work_sync() staging: rtl8188eu: Remove unused inline function _RND512() staging: rtl8188eu: Replace _cancel_timer_ex() with del_timer_sync() staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32() staging: rtl8188eu: Use cpu_to_be16() instead of RTW_PUT_BE16() staging: rtl8188eu: Use get_unaligned_be16() instead of RTW_GET_BE16() staging: rtl8188eu: Remove unused inline function bitshift() staging: rtl8188eu: Use get_unaligned_le16() instead of RTW_GET_LE16() staging: rtl8188eu: Use cpu_to_le16() insted of RTW_PUT_LE16() staging: rtl8188eu: osdep_service.h: Remove unused function definations staging: rtl8188eu: Remove unused inline function _RND256() staging: rtl8188eu: Use round_up() instead of _RND128() staging: rtl8188eu: Use round_up() instead of _RND8() staging: rtl8188eu: Use round_up() instead of _RND4() staging: rtl8188eu: osdep_service.h: Remove unused macros staging: rtl8188eu: Use round_up() instead of RND4() staging: rtl8188eu: Remove function thread_enter() staging: rtl8188eu: Remove function flush_signals_thread() staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync() drivers/staging/rtl8188eu/core/rtw_ap.c | 52 ++--- drivers/staging/rtl8188eu/core/rtw_cmd.c | 159 drivers/staging/rtl8188eu/core/rtw_debug.c|2 +- drivers/staging/rtl8188eu/core/rtw_efuse.c| 24 +-- drivers/staging/rtl8188eu/core/rtw_ieee80211.c| 33 ++-- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c| 18 +- drivers/staging/rtl8188eu/core/rtw_led.c | 52 ++--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 85 - drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 188 +- drivers/staging/rtl8188eu/core/rtw_mp.c | 28 +-- drivers/staging/rtl8188eu/core/rtw_p2p.c | 142 ++ drivers/staging/rtl8188eu/core/rtw_recv.c | 52 ++--- drivers/staging/rtl8188eu/core/rtw_security.c | 34 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 54 +++--- drivers/staging/rtl8188eu/core/rtw_wlan_util.c|8 +- drivers/staging/rtl8188eu/core/rtw_xmit.c | 115 ++-- drivers/staging/rtl8188eu/hal/hal_com.c |2 +- drivers/staging/rtl8188eu/hal/hal_intf.c | 29 --- drivers/staging/rtl8188eu/hal/odm.c | 14 -- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 12 +- drivers/staging/rtl8188eu/hal/rtl8188e_dm.c |4 +- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c | 21 +-- drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c |2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c|4 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c| 24 +-- drivers/staging/rtl8188eu/hal/usb_halinit.c |7 +- drivers/staging/rtl8188eu/include/hal_intf.h | 12 -- drivers/staging/rtl8188eu/include/odm_precomp.h |1 - drivers/staging/rtl8188eu/include/osdep_service.h | 161 drivers/staging/rtl8188eu/include/rtl8188e_cmd.h |1 - drivers/staging/rtl8188eu/include/rtl8188e_hal.h |1 - drivers/staging/rtl8188eu/include/rtl8188e_xmit.h |1 - drivers/staging/rtl8188eu/include/rtw_cmd.h |2 +- drivers
[PATCH 01/42] staging: rtl8188eu: Remove dummy function odm_DynamicTxPower()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/odm.c | 14 -- drivers/staging/rtl8188eu/include/odm_precomp.h |1 - 2 files changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/odm.c b/drivers/staging/rtl8188eu/hal/odm.c index 60dbde7..f8dcfda 100644 --- a/drivers/staging/rtl8188eu/hal/odm.c +++ b/drivers/staging/rtl8188eu/hal/odm.c @@ -221,7 +221,6 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm) ODM_TXPowerTrackingCheck(pDM_Odm); odm_EdcaTurboCheck(pDM_Odm); - odm_DynamicTxPower(pDM_Odm); } /* Init /.. Fixed HW value. Only init time. */ @@ -1110,19 +1109,6 @@ void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm) pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal; } -void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm) -{ - /* For AP/ADSL use struct rtl8192cd_priv * */ - /* For CE/NIC use struct adapter * */ - - if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR)) - return; - - /* 2012/01/12 MH According to Luke's suggestion, only high power will support the feature. */ - if (!pDM_Odm->ExtPA) - return; -} - /* 3 */ /* 3 RSSI Monitor */ /* 3 */ diff --git a/drivers/staging/rtl8188eu/include/odm_precomp.h b/drivers/staging/rtl8188eu/include/odm_precomp.h index df61892..0ab8254 100644 --- a/drivers/staging/rtl8188eu/include/odm_precomp.h +++ b/drivers/staging/rtl8188eu/include/odm_precomp.h @@ -71,7 +71,6 @@ void odm_RefreshRateAdaptiveMaskMP(struct odm_dm_struct *pDM_Odm); void odm_DynamicBBPowerSaving(struct odm_dm_struct *pDM_Odm); void odm_SwAntDivChkAntSwitch(struct odm_dm_struct *pDM_Odm, u8 Step); void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm); -void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm); void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm); void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm); void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/42] staging: rtl8188eu: Remove dummy function CheckFwRsvdPageContent()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c |6 -- drivers/staging/rtl8188eu/include/rtl8188e_cmd.h |1 - 2 files changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 5c9d64e..fe8ba7e 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -476,12 +476,6 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u *pLength = pktlen; } -/* To check if reserved page content is destroyed by beacon because beacon is too large. */ -/* 2010.06.23. Added by tynli. */ -void CheckFwRsvdPageContent(struct adapter *Adapter) -{ -} - /* */ /* Description: Fill the reserved packets that FW will use to RSVD page. */ /* Now we just send 4 types packet to rsvd page. */ diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_cmd.h b/drivers/staging/rtl8188eu/include/rtl8188e_cmd.h index b32bc28..4601169 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_cmd.h @@ -116,7 +116,6 @@ void rtl8188e_Add_RateATid(struct adapter *padapter, u32 bitmap, u8 arg, void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state); #endif /* CONFIG_88EU_P2P */ -void CheckFwRsvdPageContent(struct adapter *adapt); void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt); #endif/* __RTL8188E_CMD_H__ */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 07/42] staging: rtl8188eu: Remove dummy rtl8188eu_free_xmit_priv() and its wrapper
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_xmit.c |3 --- drivers/staging/rtl8188eu/hal/hal_intf.c |6 -- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|4 drivers/staging/rtl8188eu/hal/usb_halinit.c |1 - drivers/staging/rtl8188eu/include/hal_intf.h |2 -- drivers/staging/rtl8188eu/include/rtl8188e_xmit.h |1 - 6 files changed, 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index eb938a5..3156067 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -233,9 +233,6 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv) u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ; u32 num_xmit_extbuf = NR_XMIT_EXTBUFF; - - rtw_hal_free_xmit_priv(padapter); - if (pxmitpriv->pxmit_frame_buf == NULL) return; diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 799c314..f002c43 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -214,12 +214,6 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt) return _FAIL; } -void rtw_hal_free_xmit_priv(struct adapter *adapt) -{ - if (adapt->HalFunc.free_xmit_priv != NULL) - adapt->HalFunc.free_xmit_priv(adapt); -} - s32 rtw_hal_init_recv_priv(struct adapter *adapt) { if (adapt->HalFunc.init_recv_priv) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index 3112e6c..34bc660 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -35,10 +35,6 @@ s32 rtl8188eu_init_xmit_priv(struct adapter *adapt) return _SUCCESS; } -void rtl8188eu_free_xmit_priv(struct adapter *adapt) -{ -} - static u8 urb_zero_packet_chk(struct adapter *adapt, int sz) { u8 set_tx_desc_offset; diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 5096d4d..3a539e4 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -2223,7 +2223,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt) halfunc->inirp_deinit = &rtl8188eu_inirp_deinit; halfunc->init_xmit_priv = &rtl8188eu_init_xmit_priv; - halfunc->free_xmit_priv = &rtl8188eu_free_xmit_priv; halfunc->init_recv_priv = &rtl8188eu_init_recv_priv; halfunc->free_recv_priv = &rtl8188eu_free_recv_priv; diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index 05e363e..fb797c7 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -157,7 +157,6 @@ struct hal_ops { u32 (*inirp_deinit)(struct adapter *padapter); s32 (*init_xmit_priv)(struct adapter *padapter); - void(*free_xmit_priv)(struct adapter *padapter); s32 (*init_recv_priv)(struct adapter *padapter); void(*free_recv_priv)(struct adapter *padapter); @@ -302,7 +301,6 @@ s32 rtw_hal_mgnt_xmit(struct adapter *padapter, struct xmit_frame *pmgntframe); s32rtw_hal_init_xmit_priv(struct adapter *padapter); -void rtw_hal_free_xmit_priv(struct adapter *padapter); s32rtw_hal_init_recv_priv(struct adapter *padapter); void rtw_hal_free_recv_priv(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h index cf7267a..0b96d42 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_xmit.h @@ -159,7 +159,6 @@ struct txrpt_ccx_88e { void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull); s32 rtl8188eu_init_xmit_priv(struct adapter *padapter); -void rtl8188eu_free_xmit_priv(struct adapter *padapter); s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame); s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame); s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/42] staging: rtl8188eu: Remove dummy rtl8188e_start_thread() and its wrapper
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |7 --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |5 - drivers/staging/rtl8188eu/include/hal_intf.h |2 -- drivers/staging/rtl8188eu/os_dep/os_intfs.c |1 - 4 files changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index bcd9c4d..4506fd8 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -263,13 +263,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, } /* Start specifical interface thread */ -void rtw_hal_start_thread(struct adapter *adapt) -{ - if (adapt->HalFunc.run_thread) - adapt->HalFunc.run_thread(adapt); -} - -/* Start specifical interface thread */ void rtw_hal_stop_thread(struct adapter *adapt) { if (adapt->HalFunc.cancel_thread) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 9ce036e..f08696a 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -573,10 +573,6 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable } } -void rtl8188e_start_thread(struct adapter *padapter) -{ -} - void rtl8188e_stop_thread(struct adapter *padapter) { } @@ -605,7 +601,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog; pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid; - pHalFunc->run_thread = &rtl8188e_start_thread; pHalFunc->cancel_thread = &rtl8188e_stop_thread; pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E; diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index 482d0f3f..d80dd72 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -207,7 +207,6 @@ struct hal_ops { void(*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg, u8 rssi_level); - void(*run_thread)(struct adapter *adapter); void(*cancel_thread)(struct adapter *adapter); u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter); @@ -313,7 +312,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level); void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level); void rtw_hal_clone_data(struct adapter *dst_adapt, struct adapter *src_adapt); -void rtw_hal_start_thread(struct adapter *padapter); void rtw_hal_stop_thread(struct adapter *padapter); void rtw_hal_bcn_related_reg_setting(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index e19ec25..287126a 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -749,7 +749,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter) else _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); /* wait for cmd_thread to run */ - rtw_hal_start_thread(padapter); return _status; } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/42] staging: rtl8188eu: Remove dummy function Hal_InitChannelPlan()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |4 drivers/staging/rtl8188eu/hal/usb_halinit.c |4 drivers/staging/rtl8188eu/include/rtl8188e_hal.h |1 - 3 files changed, 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index bee20a0..0094d21 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -1079,10 +1079,6 @@ void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool Aut DBG_88E("ThermalMeter = 0x%x\n", pHalData->EEPROMThermalMeter); } -void Hal_InitChannelPlan(struct adapter *padapter) -{ -} - bool HalDetectPwrDownMode88E(struct adapter *Adapter) { u8 tmpvalue = 0; diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 8c26d0a..5096d4d 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -1149,10 +1149,6 @@ readAdapterInfo_8188EU( Hal_EfuseParseBoardType88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); Hal_ReadThermalMeter_88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag); - /* */ - /* The following part initialize some vars by PG info. */ - /* */ - Hal_InitChannelPlan(adapt); } static void _ReadPROMContent( diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h index 94a5f93..ed3204f 100644 --- a/drivers/staging/rtl8188eu/include/rtl8188e_hal.h +++ b/drivers/staging/rtl8188eu/include/rtl8188e_hal.h @@ -457,7 +457,6 @@ void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo, bool HalDetectPwrDownMode88E(struct adapter *Adapter); -void Hal_InitChannelPlan(struct adapter *padapter); void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc); /* register */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/42] staging: rtl8188eu: Remove dummy rtl8188e_stop_thread() and its wrapper
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |7 --- drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |5 - drivers/staging/rtl8188eu/include/hal_intf.h |2 -- drivers/staging/rtl8188eu/os_dep/os_intfs.c |1 - 4 files changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 4506fd8..799c314 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -262,13 +262,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, rssi_level); } -/* Start specifical interface thread */ -void rtw_hal_stop_thread(struct adapter *adapt) -{ - if (adapt->HalFunc.cancel_thread) - adapt->HalFunc.cancel_thread(adapt); -} - u32 rtw_hal_read_bbreg(struct adapter *adapt, u32 regaddr, u32 bitmask) { u32 data = 0; diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index f08696a..bee20a0 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -573,10 +573,6 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable } } -void rtl8188e_stop_thread(struct adapter *padapter) -{ -} - static void hal_notch_filter_8188e(struct adapter *adapter, bool enable) { if (enable) { @@ -601,7 +597,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog; pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid; - pHalFunc->cancel_thread = &rtl8188e_stop_thread; pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E; pHalFunc->AntDivCompareHandler = &AntDivCompare8188E; diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index d80dd72..05e363e 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -207,7 +207,6 @@ struct hal_ops { void(*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg, u8 rssi_level); - void(*cancel_thread)(struct adapter *adapter); u8 (*AntDivBeforeLinkHandler)(struct adapter *adapter); void(*AntDivCompareHandler)(struct adapter *adapter, @@ -312,7 +311,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level); void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level); void rtw_hal_clone_data(struct adapter *dst_adapt, struct adapter *src_adapt); -void rtw_hal_stop_thread(struct adapter *padapter); void rtw_hal_bcn_related_reg_setting(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/os_dep/os_intfs.c b/drivers/staging/rtl8188eu/os_dep/os_intfs.c index 287126a..19fd812 100644 --- a/drivers/staging/rtl8188eu/os_dep/os_intfs.c +++ b/drivers/staging/rtl8188eu/os_dep/os_intfs.c @@ -761,7 +761,6 @@ void rtw_stop_drv_threads(struct adapter *padapter) if (padapter->cmdThread) _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); - rtw_hal_stop_thread(padapter); } static u8 rtw_init_default_value(struct adapter *padapter) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/42] staging: rtl8188eu: Remove dummy rtl8188e_GetHalODMVar() and its wrapper
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |9 - drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c |5 - drivers/staging/rtl8188eu/include/hal_intf.h |6 -- 3 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 1afc566..bcd9c4d 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -156,15 +156,6 @@ void rtw_hal_set_odm_var(struct adapter *adapt, val1, set); } -void rtw_hal_get_odm_var(struct adapter *adapt, -enum hal_odm_variable var, void *val1, -bool set) -{ - if (adapt->HalFunc.GetHalODMVarHandler) - adapt->HalFunc.GetHalODMVarHandler(adapt, var, - val1, set); -} - void rtw_hal_enable_interrupt(struct adapter *adapt) { if (adapt->HalFunc.enable_interrupt) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c index 4d3ea7c..9ce036e 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c @@ -544,10 +544,6 @@ static void rtl8188e_read_chip_version(struct adapter *padapter) ReadChipVersion8188E(padapter); } -static void rtl8188e_GetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet) -{ -} - static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet) { struct hal_data_8188e *pHalData = GET_HAL_DATA(Adapter); @@ -622,7 +618,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc) pHalFunc->sreset_init_value = &sreset_init_value; pHalFunc->sreset_get_wifi_status = &sreset_get_wifi_status; - pHalFunc->GetHalODMVarHandler = &rtl8188e_GetHalODMVar; pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar; pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync; diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index a86b3f8..482d0f3f 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -197,9 +197,6 @@ struct hal_ops { enum hal_def_variable eVariable, void *pValue); - void(*GetHalODMVarHandler)(struct adapter *padapter, - enum hal_odm_variable eVariable, - void *pValue1, bool bSet); void(*SetHalODMVarHandler)(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet); @@ -295,9 +292,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter, void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet); -void rtw_hal_get_odm_var(struct adapter *padapter, -enum hal_odm_variable eVariable, -void *pValue1, bool bSet); void rtw_hal_enable_interrupt(struct adapter *padapter); void rtw_hal_disable_interrupt(struct adapter *padapter); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/42] staging: rtl8188eu: Remove rtw_mfree2d(), wrapper for kfree()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_efuse.c|2 +- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |5 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c index d18bdda..baaf276 100644 --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c @@ -213,7 +213,7 @@ exit: kfree(efuseTbl); if (eFuseWord) - rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16)); + kfree(eFuseWord); } static void efuse_read_phymap_from_txpktbuf( diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2cd9e26..e5bfdd7 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -196,7 +196,6 @@ void _rtw_mfree(u8 *pbuf, u32 sz); #define rtw_mfree(pbuf, sz)_rtw_mfree((pbuf), (sz)) void *rtw_malloc2d(int h, int w, int size); -void rtw_mfree2d(void *pbuf, int h, int w, int size); void _rtw_memcpy(void *dec, void *sour, u32 sz); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index 02144a4..92203c3 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -89,11 +89,6 @@ void *rtw_malloc2d(int h, int w, int size) return a; } -void rtw_mfree2d(void *pbuf, int h, int w, int size) -{ - kfree(pbuf); -} - void _rtw_init_listhead(struct list_head *list) { INIT_LIST_HEAD(list); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/42] staging: rtl8188eu: Remove rtw_list_insert_tail(), wrapper for list_add_tail()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ap.c |2 +- drivers/staging/rtl8188eu/core/rtw_cmd.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_mlme.c | 12 ++-- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_mp.c |2 +- drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c |6 +++--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 20 ++-- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |5 - 10 files changed, 31 insertions(+), 37 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index eb96c56..a51ae26 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -1176,7 +1176,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode->valid = true; - rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q)); + list_add_tail(&paclnode->list, get_list_head(pacl_node_q)); pacl_list->num++; diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index c7b7f15..0bcd8a8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -138,7 +138,7 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj) spin_lock_irqsave(&queue->lock, irqL); - rtw_list_insert_tail(&obj->list, &queue->queue); + list_add_tail(&obj->list, &queue->queue); spin_unlock_irqrestore(&queue->lock, irqL); @@ -2124,7 +2124,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) } pwlan->last_scanned = jiffies; } else { - rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); + list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); } pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 1a39b67..e44e76e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -74,7 +74,7 @@ int _rtw_init_mlme_priv(struct adapter *padapter) for (i = 0; i < MAX_BSS_CNT; i++) { _rtw_init_listhead(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue)); + list_add_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue)); pnetwork++; } @@ -135,7 +135,7 @@ int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork) spin_lock_bh(&queue->lock); - rtw_list_insert_tail(&pnetwork->list, &queue->queue); + list_add_tail(&pnetwork->list, &queue->queue); spin_unlock_bh(&queue->lock); @@ -217,7 +217,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo } spin_lock_bh(&free_queue->lock); rtw_list_delete(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue)); + list_add_tail(&(pnetwork->list), &(free_queue->queue)); pmlmepriv->num_of_scanned--; spin_unlock_bh(&free_queue->lock); } @@ -231,7 +231,7 @@ void _rtw_free_network_nolock(structmlme_priv *pmlmepriv, struct wlan_network * if (pnetwork->fixed) return; rtw_list_delete(&(pnetwork->list)); - rtw_list_insert_tail(&(pnetwork->list), get_list_head(free_queue)); + list_add_tail(&(pnetwork->list), get_list_head(free_queue)); pmlmepriv->num_of_scanned--; } @@ -575,7 +575,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t /* bss info not receiving from the right channel */ if (pnetwork->network.PhyInfo.SignalQuality == 101) pnetwork->network.PhyInfo.SignalQuality = 0; - rtw_list_insert_tail(&(pnetwork->list), &(queue->queue)); + list_add_tail(&(pnetwork->list), &(queue->queue)); } } else { /* we have an entry and we are going to update it. But this entry may @@ -830,7 +830,7 @@ static void free_scanqueue(stru
[PATCH 12/42] staging: rtl8188eu: Remove function rtw_end_of_queue_search()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ap.c | 16 ++--- drivers/staging/rtl8188eu/core/rtw_debug.c|2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 13 ++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |7 +-- drivers/staging/rtl8188eu/core/rtw_p2p.c |4 +- drivers/staging/rtl8188eu/core/rtw_recv.c |8 +-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 10 ++-- drivers/staging/rtl8188eu/core/rtw_xmit.c | 14 ++--- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/include/osdep_service.h |2 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 65 + drivers/staging/rtl8188eu/os_dep/osdep_service.c |8 --- drivers/staging/rtl8188eu/os_dep/xmit_linux.c |2 +- 13 files changed, 49 insertions(+), 104 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index a51ae26..7682115 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -288,7 +288,7 @@ voidexpire_timeout_chk(struct adapter *padapter) plist = phead->next; /* check auth_queue */ - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { psta = container_of(plist, struct sta_info, auth_list); plist = plist->next; @@ -322,7 +322,7 @@ voidexpire_timeout_chk(struct adapter *padapter) plist = phead->next; /* check asoc_queue */ - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { psta = container_of(plist, struct sta_info, asoc_list); plist = plist->next; @@ -1146,7 +1146,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) phead = get_list_head(pacl_node_q); plist = phead->next; - while (!rtw_end_of_queue_search(phead, plist)) { + while (phead != plist) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = plist->next; @@ -1207,7 +1207,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) phead = get_list_head(pacl_node_q); plist = phead->next; - while (!rtw_end_of_queue_search(phead, plist)) { + while (phead != plist) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = plist->next; @@ -1505,7 +1505,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated) plist = phead->next; /* check asoc_queue */ - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { psta = container_of(plist, struct sta_info, asoc_list); plist = plist->next; @@ -1779,7 +1779,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset) plist = phead->next; /* for each sta in asoc_queue */ - while (!rtw_end_of_queue_search(phead, plist)) { + while (phead != plist) { psta = container_of(plist, struct sta_info, asoc_list); plist = plist->next; @@ -1813,7 +1813,7 @@ int rtw_sta_flush(struct adapter *padapter) plist = phead->next; /* free sta asoc_queue */ - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { psta = container_of(plist, struct sta_info, asoc_list); plist = plist->next; @@ -1942,7 +1942,7 @@ void stop_ap_mode(struct adapter *padapter) spin_lock_bh(&(pacl_node_q->lock)); phead = get_list_head(pacl_node_q); plist = phead->next; - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { paclnode = container_of(plist, struct rtw_wlan_acl_node, list); plist = plist->next; diff --git a/drivers/staging/rtl8188eu/core/rtw_debug.c b/drivers/staging/rtl8188eu/core/rtw_debug.c index dd15163..1f72f7d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_debug.c +++ b/drivers/staging/rtl8188eu/core/rtw_debug.c @@ -853,7 +853,7 @@ int proc_get_all_sta_info(char *page, char **start, phead = &(pstapriv->sta_hash[i]); plist = phead->next; - while ((rtw_end_of_queue_search(phead, plist)) == false) { + while (phead != plist) { psta = container_of(plist, struct sta_info, hash_list); plist = plist->next; diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index e44e76e..2fc294e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++
[PATCH 10/42] staging: rtl8188eu: Remove unused function rtw_list_insert_head()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |5 - 2 files changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index e5bfdd7..05cc352 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -201,7 +201,6 @@ void _rtw_memcpy(void *dec, void *sour, u32 sz); void _rtw_init_listhead(struct list_head *list); u32 rtw_is_list_empty(struct list_head *phead); -void rtw_list_insert_head(struct list_head *plist, struct list_head *phead); void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead); void rtw_list_delete(struct list_head *plist); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index 92203c3..8067f9c 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -107,11 +107,6 @@ u32rtw_is_list_empty(struct list_head *phead) return false; } -void rtw_list_insert_head(struct list_head *plist, struct list_head *phead) -{ - list_add(plist, phead); -} - void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead) { list_add_tail(plist, phead); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/42] staging: rtl8188eu: Remove unused function rtw_sleep_schedulable()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c | 12 2 files changed, 13 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 23b75fc..7a0afab 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -211,7 +211,6 @@ u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); s32 rtw_get_time_interval_ms(u32 start, u32 end); -void rtw_sleep_schedulable(int ms); u32 rtw_atoi(u8 *s); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index 1ef9c49..f43ace2 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -129,18 +129,6 @@ inline s32 rtw_get_time_interval_ms(u32 start, u32 end) return rtw_systime_to_ms(end-start); } -void rtw_sleep_schedulable(int ms) -{ - u32 delta; - - delta = (ms * HZ)/1000;/* ms) */ - if (delta == 0) - delta = 1;/* 1 ms */ - set_current_state(TASK_INTERRUPTIBLE); - if (schedule_timeout(delta) != 0) - return; -} - #define RTW_SUSPEND_LOCK_NAME "rtw_wifi" struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/42] staging: rtl8188eu: Use kstrtoul() for string to long conversion
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |3 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 24 +++-- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 17 --- 3 files changed, 17 insertions(+), 27 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 7a0afab..7c2336f 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -211,9 +211,6 @@ u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); s32 rtw_get_time_interval_ms(u32 start, u32 end); - -u32 rtw_atoi(u8 *s); - static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer) { return del_timer_sync(ptimer); diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index 15748a5..5cca278 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -6590,9 +6590,10 @@ static int rtw_mp_rate(struct net_device *dev, struct iw_request_info *info, struct iw_point *wrqu, char *extra) { - u32 rate = MPT_RATE_1M; + unsigned long rate = MPT_RATE_1M; char*input = kmalloc(wrqu->length, GFP_KERNEL); struct adapter *padapter = rtw_netdev_priv(dev); + int status; if (!input) return -ENOMEM; @@ -6600,8 +6601,12 @@ static int rtw_mp_rate(struct net_device *dev, kfree(input); return -EFAULT; } - rate = rtw_atoi(input); - sprintf(extra, "Set data rate to %d", rate); + + status = kstrtoul(input, 0, &rate); + if (status) + return status; + + sprintf(extra, "Set data rate to %lu", rate); kfree(input); if (rate <= 0x7f) rate = wifirate2_ratetbl_inx((u8)rate); @@ -6623,8 +6628,9 @@ static int rtw_mp_channel(struct net_device *dev, struct iw_point *wrqu, char *extra) { struct adapter *padapter = rtw_netdev_priv(dev); - char*input = kmalloc(wrqu->length, GFP_KERNEL); - u32 channel = 1; + char *input = kmalloc(wrqu->length, GFP_KERNEL); + unsigned long channel = 1; + int status; if (!input) return -ENOMEM; @@ -6632,8 +6638,12 @@ static int rtw_mp_channel(struct net_device *dev, kfree(input); return -EFAULT; } - channel = rtw_atoi(input); - sprintf(extra, "Change channel %d to channel %d", padapter->mppriv.channel, channel); + + status = kstrtoul(input, 0, &channel); + if (status) + return status; + + sprintf(extra, "Change channel %d to channel %lu", padapter->mppriv.channel, channel); padapter->mppriv.channel = channel; Hal_SetChannel(padapter); diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index f43ace2..2a4469d 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -39,23 +39,6 @@ inline int RTW_STATUS_CODE(int error_code) return _FAIL; } -u32 rtw_atoi(u8 *s) -{ - int num = 0, flag = 0; - int i; - for (i = 0; i <= strlen(s); i++) { - if (s[i] >= '0' && s[i] <= '9') - num = num * 10 + s[i] - '0'; - else if (s[0] == '-' && i == 0) - flag = 1; - else - break; - } - if (flag == 1) - num = num * -1; - return num; -} - u8 *_rtw_malloc(u32 sz) { u8 *pbuf = NULL; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/42] staging: rtl8188eu: Remove _rtw_init_listhead(), wrapper for INIT_LIST_HEAD()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ap.c |6 +++--- drivers/staging/rtl8188eu/core/rtw_cmd.c | 12 ++-- drivers/staging/rtl8188eu/core/rtw_mlme.c |6 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 10 +- drivers/staging/rtl8188eu/core/rtw_mp.c |2 +- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 14 +++--- drivers/staging/rtl8188eu/core/rtw_xmit.c | 12 ++-- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/include/rtw_cmd.h |2 +- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|2 +- drivers/staging/rtl8188eu/os_dep/osdep_service.c |7 +-- drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |2 +- 13 files changed, 37 insertions(+), 43 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 7682115..c3c4649 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -1170,7 +1170,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) paclnode = &pacl_list->aclnode[i]; if (!paclnode->valid) { - _rtw_init_listhead(&paclnode->list); + INIT_LIST_HEAD(&paclnode->list); memcpy(paclnode->addr, addr, ETH_ALEN); @@ -1910,11 +1910,11 @@ void start_ap_mode(struct adapter *padapter) pmlmepriv->p2p_probe_resp_ie = NULL; /* for ACL */ - _rtw_init_listhead(&(pacl_list->acl_node_q.queue)); + INIT_LIST_HEAD(&(pacl_list->acl_node_q.queue)); pacl_list->num = 0; pacl_list->mode = 0; for (i = 0; i < NUM_ACL; i++) { - _rtw_init_listhead(&pacl_list->aclnode[i].list); + INIT_LIST_HEAD(&pacl_list->aclnode[i].list); pacl_list->aclnode[i].valid = false; } } diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 1f6587b..29f45e8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -651,7 +651,7 @@ u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) return _FAIL; } - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetBBReg); ph2c->parmbuf = (unsigned char *)prdbbparm; ph2c->cmdsz = sizeof(struct readBB_parm); @@ -715,7 +715,7 @@ u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) goto exit; } - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg); ph2c->parmbuf = (unsigned char *)prdrfparm; ph2c->cmdsz = sizeof(struct readRF_parm); @@ -774,7 +774,7 @@ u8 rtw_createbss_cmd(struct adapter *padapter) goto exit; } - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = _CreateBss_CMD_; pcmd->parmbuf = (unsigned char *)pdev_network; pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network); @@ -801,7 +801,7 @@ u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned goto exit; } - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = GEN_CMD_CODE(_CreateBss); pcmd->parmbuf = pbss; pcmd->cmdsz = sz; @@ -944,7 +944,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */ - _rtw_init_listhead(&pcmd->list); + INIT_LIST_HEAD(&pcmd->list); pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */ pcmd->parmbuf = (unsigned char *)psecnetwork; pcmd->rsp = NULL; @@ -1194,7 +1194,7 @@ u8 rtw_getrttbl_cmd(struct adapter *padapter, struct getratable_rsp *pval) goto exit; } - _rtw_init_listhead(&ph2c->list); + INIT_LIST_HEAD(&ph2c->list); ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable); ph2c->parmbuf = (unsigned char *)pgetrttblparm; ph2c->cmdsz = sizeof(struct getratable_parm); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 2fc294e..f0ad0c5 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -72,7 +72,7 @@ int _rtw_init_mlme_priv(struct adap
[PATCH 13/42] staging: rtl8188eu: Remove rtw_is_list_empty(), wrapper for list_emty()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |2 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 12 ++-- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_xmit.c |2 +- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|2 +- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 19 +-- 8 files changed, 14 insertions(+), 32 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 0bcd8a8..1f6587b 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -155,7 +155,7 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) spin_lock_irqsave(&queue->lock, irqL); - if (rtw_is_list_empty(&(queue->queue))) { + if (list_empty(&(queue->queue))) { obj = NULL; } else { obj = container_of((&queue->queue)->next, struct cmd_obj, list); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 418fb21..8b678b7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -817,7 +817,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) pstat->auth_seq = 0; } else { spin_lock_bh(&pstapriv->asoc_list_lock); - if (!rtw_is_list_empty(&pstat->asoc_list)) { + if (!list_empty(&pstat->asoc_list)) { rtw_list_delete(&pstat->asoc_list); pstapriv->asoc_list_cnt--; } @@ -829,7 +829,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) } spin_lock_bh(&pstapriv->auth_list_lock); - if (rtw_is_list_empty(&pstat->auth_list)) { + if (list_empty(&pstat->auth_list)) { list_add_tail(&pstat->auth_list, &pstapriv->auth_list); pstapriv->auth_list_cnt++; } @@ -1407,14 +1407,14 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame pstat->state |= WIFI_FW_ASSOC_SUCCESS; spin_lock_bh(&pstapriv->auth_list_lock); - if (!rtw_is_list_empty(&pstat->auth_list)) { + if (!list_empty(&pstat->auth_list)) { rtw_list_delete(&pstat->auth_list); pstapriv->auth_list_cnt--; } spin_unlock_bh(&pstapriv->auth_list_lock); spin_lock_bh(&pstapriv->asoc_list_lock); - if (rtw_is_list_empty(&pstat->asoc_list)) { + if (list_empty(&pstat->asoc_list)) { pstat->expire_to = pstapriv->expire_to; list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list); pstapriv->asoc_list_cnt++; @@ -1600,7 +1600,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame) u8 updated = 0; spin_lock_bh(&pstapriv->asoc_list_lock); - if (!rtw_is_list_empty(&psta->asoc_list)) { + if (!list_empty(&psta->asoc_list)) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; updated = ap_free_sta(padapter, psta, false, reason); @@ -1664,7 +1664,7 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame u8 updated = 0; spin_lock_bh(&pstapriv->asoc_list_lock); - if (!rtw_is_list_empty(&psta->asoc_list)) { + if (!list_empty(&psta->asoc_list)) { rtw_list_delete(&psta->asoc_list); pstapriv->asoc_list_cnt--; updated = ap_free_sta(padapter, psta, false, reason); diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 8adfa7e..3371c7c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1810,7 +1810,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor /* Handling some condition for forced indicate case. */ if (bforced) { - if (rtw_is_list_empty(phead)) + if (list_empty(phead)) return true; prhdr = container_of(plist, struct re
[PATCH 17/42] staging: rtl8188eu:Remove rtw_zmalloc(), wrapper for kzalloc()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 124 ++--- drivers/staging/rtl8188eu/core/rtw_efuse.c|4 +- drivers/staging/rtl8188eu/core/rtw_mlme.c |8 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 28 ++--- drivers/staging/rtl8188eu/core/rtw_mp.c |2 +- drivers/staging/rtl8188eu/core/rtw_p2p.c |8 +- drivers/staging/rtl8188eu/core/rtw_wlan_util.c|2 +- drivers/staging/rtl8188eu/core/rtw_xmit.c |2 +- drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c |2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c|2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c |2 +- drivers/staging/rtl8188eu/include/osdep_service.h |2 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c| 24 ++-- drivers/staging/rtl8188eu/os_dep/osdep_service.c | 11 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c |4 +- drivers/staging/rtl8188eu/os_dep/xmit_linux.c |2 +- 16 files changed, 108 insertions(+), 119 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 29f45e8..3f37927 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -47,7 +47,7 @@ int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) pcmdpriv->cmd_seq = 1; - pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ); + pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, GFP_KERNEL); if (pcmdpriv->cmd_allocated_buf == NULL) { res = _FAIL; @@ -56,7 +56,7 @@ int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf + CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1)); - pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4); + pcmdpriv->rsp_allocated_buf = kzalloc(MAX_RSPSZ + 4, GFP_KERNEL); if (pcmdpriv->rsp_allocated_buf == NULL) { res = _FAIL; @@ -437,11 +437,11 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, if (check_fwstate(pmlmepriv, _FW_LINKED) == true) p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1); - ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (ph2c == NULL) return _FAIL; - psurveyPara = (struct sitesurvey_parm *)rtw_zmalloc(sizeof(struct sitesurvey_parm)); + psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_KERNEL); if (psurveyPara == NULL) { kfree(ph2c); return _FAIL; @@ -506,13 +506,13 @@ u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset) u8 res = _SUCCESS; - ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (ph2c == NULL) { res = _FAIL; goto exit; } - pbsetdataratepara = (struct setdatarate_parm *)rtw_zmalloc(sizeof(struct setdatarate_parm)); + pbsetdataratepara = kzalloc(sizeof(struct setdatarate_parm), GFP_KERNEL); if (pbsetdataratepara == NULL) { kfree(ph2c); res = _FAIL; @@ -537,12 +537,12 @@ u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset) u8 res = _SUCCESS; - ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (ph2c == NULL) { res = _FAIL; goto exit; } - pssetbasicratepara = (struct setbasicrate_parm *)rtw_zmalloc(sizeof(struct setbasicrate_parm)); + pssetbasicratepara = kzalloc(sizeof(struct setbasicrate_parm), GFP_KERNEL); if (pssetbasicratepara == NULL) { kfree(ph2c); @@ -577,12 +577,12 @@ u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch) u8 res = _SUCCESS; - ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (ph2c == NULL) { res = _FAIL; goto exit; } - psetphypara = (struct setphy_parm *)rtw_zmalloc(sizeof(struct setphy_parm)); + psetphypara = kzalloc(sizeof(struct setphy_parm), GFP_KERNEL); if (psetphypara == NULL) { kfree(ph2c); @@ -609,12 +609,12 @@ u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val) struct cmd_priv *pcmdpriv = &padapter->cmdpriv; u8 res = _SUCCESS; - ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj)); + ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); if (ph2c == NULL) {
[PATCH 20/42] staging: rtl8188eu: osdep_service.h: Remove unused macro, enum and variables
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h | 27 - 1 file changed, 27 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index e9d5309..294b234 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -163,30 +163,6 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev) extern int RTW_STATUS_CODE(int error_code); -/* flags used for rtw_update_mem_stat() */ -enum { - MEM_STAT_VIR_ALLOC_SUCCESS, - MEM_STAT_VIR_ALLOC_FAIL, - MEM_STAT_VIR_FREE, - MEM_STAT_PHY_ALLOC_SUCCESS, - MEM_STAT_PHY_ALLOC_FAIL, - MEM_STAT_PHY_FREE, - MEM_STAT_TX, /* used to distinguish TX/RX, asigned from caller */ - MEM_STAT_TX_ALLOC_SUCCESS, - MEM_STAT_TX_ALLOC_FAIL, - MEM_STAT_TX_FREE, - MEM_STAT_RX, /* used to distinguish TX/RX, asigned from caller */ - MEM_STAT_RX_ALLOC_SUCCESS, - MEM_STAT_RX_ALLOC_FAIL, - MEM_STAT_RX_FREE -}; - -extern unsigned char MCS_rate_2R[16]; -extern unsigned char MCS_rate_1R[16]; -extern unsigned char RTW_WPA_OUI[]; -extern unsigned char WPA_TKIP_CIPHER[4]; -extern unsigned char RSN_TKIP_CIPHER[4]; - #define rtw_update_mem_stat(flag, sz) do {} while (0) u8 *_rtw_malloc(u32 sz); void _rtw_mfree(u8 *pbuf, u32 sz); @@ -277,9 +253,6 @@ static inline u32 bitshift(u32 bitmask) return i; } -/* limitation of path length */ -#define PATH_LENGTH_MAX PATH_MAX - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/42] staging: rtl8188eu: Remove unused function rtw_get_time_interval_ms()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |5 - 2 files changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index bf9bf3c..e9d5309 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -207,7 +207,6 @@ u32 _rtw_queue_empty(struct __queue *pqueue); u32 rtw_systime_to_ms(u32 systime); u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); -s32 rtw_get_time_interval_ms(u32 start, u32 end); static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer) { diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index d63feea..76b02b5 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -98,11 +98,6 @@ inline s32 rtw_get_passing_time_ms(u32 start) return rtw_systime_to_ms(jiffies-start); } -inline s32 rtw_get_time_interval_ms(u32 start, u32 end) -{ - return rtw_systime_to_ms(end-start); -} - #define RTW_SUSPEND_LOCK_NAME "rtw_wifi" struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/42] staging: rtl8188eu: Remove unused function rtw_division64()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |6 -- 2 files changed, 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index acce3e6..bf9bf3c 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -305,7 +305,6 @@ void rtw_free_netdev(struct net_device *netdev); #define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1) u64 rtw_modular64(u64 x, u64 y); -u64 rtw_division64(u64 x, u64 y); /* Macros for handling unaligned memory accesses */ diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index fa31820..d63feea 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -225,12 +225,6 @@ u64 rtw_modular64(u64 x, u64 y) return do_div(x, y); } -u64 rtw_division64(u64 x, u64 y) -{ - do_div(x, y); - return x; -} - void rtw_buf_free(u8 **buf, u32 *buf_len) { *buf_len = 0; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/42] staging: rtl8188eu: Replace _cancel_workitem_sync() with cancel_work_sync()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |2 +- drivers/staging/rtl8188eu/core/rtw_led.c |2 +- drivers/staging/rtl8188eu/include/osdep_service.h |5 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 8d36e2c..a292c5d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -96,7 +96,7 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv) RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+rtw_free_evt_priv\n")); - _cancel_workitem_sync(&pevtpriv->c2h_wk); + cancel_work_sync(&pevtpriv->c2h_wk); while (pevtpriv->c2h_wk_alive) msleep(10); diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c index 87d6f06..a266f34 100644 --- a/drivers/staging/rtl8188eu/core/rtw_led.c +++ b/drivers/staging/rtl8188eu/core/rtw_led.c @@ -88,7 +88,7 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed) /* */ void DeInitLed871x(struct LED_871x *pLed) { - _cancel_workitem_sync(&(pLed->BlinkWorkItem)); + cancel_work_sync(&(pLed->BlinkWorkItem)); _cancel_timer_ex(&(pLed->BlinkTimer)); ResetLedStatus(pLed); } diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index a55b786..bc1ffd4 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -101,11 +101,6 @@ static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled) #define RTW_DECLARE_TIMER_HDL(name) \ void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS) -static inline void _cancel_workitem_sync(struct work_struct *pwork) -{ - cancel_work_sync(pwork); -} - static inline int rtw_netif_queue_stopped(struct net_device *pnetdev) { return netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 0)) && -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/42] staging: rtl8188eu: osdep_service.c: Remove unused macro
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/os_dep/osdep_service.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/os_dep/osdep_service.c b/drivers/staging/rtl8188eu/os_dep/osdep_service.c index 76b02b5..ff6ee5b 100644 --- a/drivers/staging/rtl8188eu/os_dep/osdep_service.c +++ b/drivers/staging/rtl8188eu/os_dep/osdep_service.c @@ -98,8 +98,6 @@ inline s32 rtw_get_passing_time_ms(u32 start) return rtw_systime_to_ms(jiffies-start); } -#define RTW_SUSPEND_LOCK_NAME "rtw_wifi" - struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv, void *old_priv) { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/42] staging: rtl8188eu: Replace _rtw_queue_empty() with list_empty()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c|2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c |6 +++--- drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_sta_mgt.c |2 +- drivers/staging/rtl8188eu/core/rtw_xmit.c | 16 drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/include/osdep_service.h |1 - drivers/staging/rtl8188eu/os_dep/osdep_service.c |5 - 8 files changed, 16 insertions(+), 22 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index 7426d00..a97da87 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c @@ -85,7 +85,7 @@ u8 rtw_do_join(struct adapter *padapter) pmlmepriv->to_join = true; - if (_rtw_queue_empty(queue)) { + if (list_empty(&queue->queue)) { spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 20b180a..c03442d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -149,7 +149,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue) spin_lock_bh(&queue->lock); - if (_rtw_queue_empty(queue)) { + if (list_empty(&queue->queue)) { pnetwork = NULL; } else { pnetwork = container_of((&queue->queue)->next, struct wlan_network, list); @@ -170,7 +170,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f spin_lock_bh(&free_queue->lock); - if (_rtw_queue_empty(free_queue) == true) { + if (list_empty(&free_queue->queue)) { pnetwork = NULL; goto exit; } @@ -535,7 +535,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t /* If we didn't find a match, then get a new network slot to initialize * with this beacon's information */ if (phead == plist) { - if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) { + if (list_empty(&(pmlmepriv->free_bss_pool.queue))) { /* If there are no more slots, expire the oldest */ pnetwork = oldest; diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index e2be938..56aa886 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -131,7 +131,7 @@ struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue) struct adapter *padapter; struct recv_priv *precvpriv; - if (_rtw_queue_empty(pfree_recv_queue)) { + if (list_empty(&pfree_recv_queue->queue)) { hdr = NULL; } else { phead = get_list_head(pfree_recv_queue); @@ -1563,7 +1563,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter, if (pdefrag_q != NULL) { if (fragnum == 0) { /* the first fragment */ - if (_rtw_queue_empty(pdefrag_q) == false) { + if (!list_empty(&pdefrag_q->queue)) { /* free current defrag_q */ rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue); } diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c index c6a249d..e1dc8fa 100644 --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c @@ -223,7 +223,7 @@ struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr) spin_lock_bh(&(pfree_sta_queue->lock)); - if (_rtw_queue_empty(pfree_sta_queue) == true) { + if (list_empty(&pfree_sta_queue->queue)) { spin_unlock_bh(&pfree_sta_queue->lock); psta = NULL; } else { diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index ddc712f..3a40b2a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -901,10 +901,10 @@ s32 rtw_txframes_pending(struct adapter *padapter) { struct xmit_priv *pxmitpriv = &padapter->xmitpriv; - return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) || -(_rtw_queue_empty(&pxmitpriv->bk_pending) == false) |
[PATCH 25/42] staging: rtl8188eu: Remove unused inline function _RND512()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index bc1ffd4..27a610f 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -222,14 +222,6 @@ static inline u32 _RND256(u32 sz) return val; } -static inline u32 _RND512(u32 sz) -{ - u32 val; - - val = ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9; - return val; -} - static inline u32 bitshift(u32 bitmask) { u32 i; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/42] staging: rtl8188eu: Replace rtw_list_delete() with list_del_init()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ap.c | 12 +++ drivers/staging/rtl8188eu/core/rtw_cmd.c |2 +- drivers/staging/rtl8188eu/core/rtw_mlme.c | 10 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 10 +++--- drivers/staging/rtl8188eu/core/rtw_recv.c | 14 drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 16 - drivers/staging/rtl8188eu/core/rtw_xmit.c | 36 ++--- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|4 +-- drivers/staging/rtl8188eu/include/osdep_service.h |7 drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|2 +- 10 files changed, 53 insertions(+), 60 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index c3c4649..1987185 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -295,7 +295,7 @@ voidexpire_timeout_chk(struct adapter *padapter) if (psta->expire_to > 0) { psta->expire_to--; if (psta->expire_to == 0) { - rtw_list_delete(&psta->auth_list); + list_del_init(&psta->auth_list); pstapriv->auth_list_cnt--; DBG_88E("auth expire %6ph\n", @@ -365,7 +365,7 @@ voidexpire_timeout_chk(struct adapter *padapter) continue; } - rtw_list_delete(&psta->asoc_list); + list_del_init(&psta->asoc_list); pstapriv->asoc_list_cnt--; DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state); @@ -421,7 +421,7 @@ voidexpire_timeout_chk(struct adapter *padapter) DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state); spin_lock_bh(&pstapriv->asoc_list_lock); - rtw_list_delete(&psta->asoc_list); + list_del_init(&psta->asoc_list); pstapriv->asoc_list_cnt--; updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING); spin_unlock_bh(&pstapriv->asoc_list_lock); @@ -1215,7 +1215,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) if (paclnode->valid) { paclnode->valid = false; - rtw_list_delete(&paclnode->list); + list_del_init(&paclnode->list); pacl_list->num--; } @@ -1818,7 +1818,7 @@ int rtw_sta_flush(struct adapter *padapter) plist = plist->next; - rtw_list_delete(&psta->asoc_list); + list_del_init(&psta->asoc_list); pstapriv->asoc_list_cnt--; ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING); @@ -1949,7 +1949,7 @@ void stop_ap_mode(struct adapter *padapter) if (paclnode->valid) { paclnode->valid = false; - rtw_list_delete(&paclnode->list); + list_del_init(&paclnode->list); pacl_list->num--; } diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 3f37927..8d36e2c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -159,7 +159,7 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) obj = NULL; } else { obj = container_of((&queue->queue)->next, struct cmd_obj, list); - rtw_list_delete(&obj->list); + list_del_init(&obj->list); } spin_unlock_irqrestore(&queue->lock, irqL); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index f619829..20b180a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -154,7 +154,7 @@ struct wlan_network *_rtw_dequeue_network(struct __queue *queue) } else { pnetwork = container_of((&queue->queue)->next, struct wlan_network, list); - rtw_list_delete(&(pnetwork->list)); + list_del_init(&(pnetwork->list)); } spin_unlock_bh(&queue->lock); @@ -178,7 +178,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
[PATCH 26/42] staging: rtl8188eu: Replace _cancel_timer_ex() with del_timer_sync()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_led.c | 50 ++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 37 --- drivers/staging/rtl8188eu/include/osdep_service.h |5 --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c|2 +- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 16 +++ 5 files changed, 52 insertions(+), 58 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_led.c b/drivers/staging/rtl8188eu/core/rtw_led.c index a266f34..384be22 100644 --- a/drivers/staging/rtl8188eu/core/rtw_led.c +++ b/drivers/staging/rtl8188eu/core/rtw_led.c @@ -89,7 +89,7 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed) void DeInitLed871x(struct LED_871x *pLed) { cancel_work_sync(&(pLed->BlinkWorkItem)); - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); ResetLedStatus(pLed); } @@ -251,11 +251,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedBlinkInProgress = false; } @@ -273,11 +273,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedNoLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedBlinkInProgress = false; } pLed->bLedLinkBlinkInProgress = true; @@ -296,15 +296,15 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct if (IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedNoLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedLinkBlinkInProgress = false; } if (pLed->bLedBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedBlinkInProgress = false; } pLed->bLedScanBlinkInProgress = true; @@ -323,11 +323,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed)) return; if (pLed->bLedNoLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedNoLinkBlinkInProgress = false; } if (pLed->bLedLinkBlinkInProgress) { - _cancel_timer_ex(&(pLed->BlinkTimer)); + del_timer_sync(&(pLed->BlinkTimer)); pLed->bLedLinkBlinkInProgress = false; } pLed->bLedBlinkInProgress = true; @@ -344,19 +344,19 @@ static void SwL
[PATCH 28/42] staging: rtl8188eu: Use cpu_to_be16() instead of RTW_PUT_BE16()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_p2p.c | 48 - drivers/staging/rtl8188eu/include/osdep_service.h |5 --- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index 5bc1937..c7bceae 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -82,8 +82,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf) *pcur = psta->dev_cap; pcur++; - /* u16*)(pcur) = cpu_to_be16(psta->config_methods); */ - RTW_PUT_BE16(pcur, psta->config_methods); + *((u16 *)(pcur)) = cpu_to_be16(psta->config_methods); pcur += 2; memcpy(pcur, psta->primary_dev_type, 8); @@ -96,12 +95,10 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf) pcur += psta->num_of_secdev_type*8; if (psta->dev_name_len > 0) { - /* u16*)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */ - RTW_PUT_BE16(pcur, WPS_ATTR_DEVICE_NAME); + *(u16 *)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); pcur += 2; - /* u16*)(pcur) = cpu_to_be16(psta->dev_name_len); */ - RTW_PUT_BE16(pcur, psta->dev_name_len); + *(u16 *)(pcur) = cpu_to_be16(psta->dev_name_len); pcur += 2; memcpy(pcur, psta->dev_name, psta->dev_name_len); @@ -315,15 +312,15 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, /* Config Method */ /* Type: */ - RTW_PUT_BE16(wpsie + wpsielen, WPS_ATTR_CONF_METHOD); + *(u16 *)(wpsie+wpsielen) = cpu_to_be16(WPS_ATTR_CONF_METHOD); wpsielen += 2; /* Length: */ - RTW_PUT_BE16(wpsie + wpsielen, 0x0002); + *(u16 *)(wpsie+wpsielen) = cpu_to_be16(0x0002); wpsielen += 2; /* Value: */ - RTW_PUT_BE16(wpsie + wpsielen, config_method); + *(u16 *)(wpsie+wpsielen) = cpu_to_be16(config_method); wpsielen += 2; pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *)wpsie, &pattrib->pktlen); @@ -558,14 +555,12 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Config Method */ /* This field should be big endian. Noted by P2P specification. */ - /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); */ - RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->supported_wps_cm); + *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); p2pielen += 2; /* Primary Device Type */ /* Category ID */ - /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); */ - RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA); + *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); p2pielen += 2; /* OUI */ @@ -573,8 +568,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pielen += 4; /* Sub Category ID */ - /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); */ - RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_MEDIA_SERVER); + *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); p2pielen += 2; /* Number of Secondary Device Types */ @@ -582,13 +576,11 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Device Name */ /* Type: */ - /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */ - RTW_PUT_BE16(p2pie + p2pielen, WPS_ATTR_DEVICE_NAME); + *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); p2pielen += 2; /* Length: */ - /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); */ - RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->device_name_len); + *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); p2pielen += 2; /* Value: */ @@ -666,19 +658,16 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 /* Config Method */ /* This field should be big endian. Noted by P2P specification. */ if (pwdinfo->ui_got_wps_info == P2P_GOT_WPSINFO_PBC) { - /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_PBC); */ - RTW_PUT_BE16(p2pie
[PATCH 27/42] staging: rtl8188eu: Use cpu_to_be32() instead of RTW_PUT_BE32()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_p2p.c |8 +++- drivers/staging/rtl8188eu/include/osdep_service.h | 10 -- 2 files changed, 3 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index 0840470..5bc1937 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -310,7 +310,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr, wpsielen = 0; /* WPS OUI */ - RTW_PUT_BE32(wpsie, WPSOUI); + *((u32 *)(wpsie+wpsielen)) = cpu_to_be32(WPSOUI); wpsielen += 4; /* Config Method */ @@ -569,8 +569,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pielen += 2; /* OUI */ - /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */ - RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); + *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI); p2pielen += 4; /* Sub Category ID */ @@ -683,8 +682,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pielen += 2; /* OUI */ - /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */ - RTW_PUT_BE32(p2pie + p2pielen, WPSOUI); + *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI); p2pielen += 4; /* Sub Category ID */ diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 64ef9bd..30613fc 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -155,9 +155,7 @@ extern int RTW_STATUS_CODE(int error_code); #define rtw_update_mem_stat(flag, sz) do {} while (0) u8 *_rtw_malloc(u32 sz); -void _rtw_mfree(u8 *pbuf, u32 sz); #define rtw_malloc(sz) _rtw_malloc((sz)) -#define rtw_mfree(pbuf, sz)_rtw_mfree((pbuf), (sz)) void *rtw_malloc2d(int h, int w, int size); @@ -271,14 +269,6 @@ u64 rtw_modular64(u64 x, u64 y); #define RTW_GET_BE24(a) u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \ ((u32) (a)[2])) -#define RTW_PUT_BE32(a, val) \ - do {\ - (a)[0] = (u8) u32) (val)) >> 24) & 0xff); \ - (a)[1] = (u8) u32) (val)) >> 16) & 0xff); \ - (a)[2] = (u8) u32) (val)) >> 8) & 0xff);\ - (a)[3] = (u8) (((u32) (val)) & 0xff); \ - } while (0) - void rtw_buf_free(u8 **buf, u32 *buf_len); void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/42] staging: rtl8188eu: Remove unused inline function bitshift()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h | 10 -- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index ca0957b..0b54856 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -215,16 +215,6 @@ static inline u32 _RND256(u32 sz) return val; } -static inline u32 bitshift(u32 bitmask) -{ - u32 i; - - for (i = 0; i <= 31; i++) - if (((bitmask>>i) & 0x1) == 1) - break; - return i; -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/42] staging: rtl8188eu: Use cpu_to_le16() insted of RTW_PUT_LE16()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c|7 +++--- drivers/staging/rtl8188eu/core/rtw_p2p.c | 24 +++-- drivers/staging/rtl8188eu/include/osdep_service.h |6 -- 3 files changed, 11 insertions(+), 26 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index d264847..54ebf34 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -206,8 +206,8 @@ inline u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl, ie_data[0] = ttl; ie_data[1] = flags; - RTW_PUT_LE16((u8 *)&ie_data[2], reason); - RTW_PUT_LE16((u8 *)&ie_data[4], precedence); + *(u16 *)(ie_data+2) = cpu_to_le16(reason); + *(u16 *)(ie_data+4) = cpu_to_le16(precedence); return rtw_set_ie(buf, 0x118, 6, ie_data, buf_len); } @@ -1310,8 +1310,7 @@ u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr) *pbuf = attr_id; - /* u16*)(pbuf + 1) = cpu_to_le16(attr_len); */ - RTW_PUT_LE16(pbuf + 1, attr_len); + *(u16 *)(pbuf + 1) = cpu_to_le16(attr_len); if (pdata_attr) memcpy(pbuf + 3, pdata_attr, attr_len); diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index c7bceae..6023a85 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -487,8 +487,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pie[p2pielen++] = P2P_ATTR_CAPABILITY; /* Length: */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */ - RTW_PUT_LE16(p2pie + p2pielen, 0x0002); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002); p2pielen += 2; /* Value: */ @@ -516,19 +515,16 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING; /* Length: */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0004); */ - RTW_PUT_LE16(p2pie + p2pielen, 0x0004); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0004); p2pielen += 2; /* Value: */ /* Availability Period */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x); */ - RTW_PUT_LE16(p2pie + p2pielen, 0x); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x); p2pielen += 2; /* Availability Interval */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x); */ - RTW_PUT_LE16(p2pie + p2pielen, 0x); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x); p2pielen += 2; @@ -544,8 +540,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf) /* Length: */ /* 21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */ /* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */ - RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); p2pielen += 2; /* Value: */ @@ -624,8 +619,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pie[p2pielen++] = P2P_ATTR_CAPABILITY; /* Length: */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */ - RTW_PUT_LE16(p2pie + p2pielen, 0x0002); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002); p2pielen += 2; /* Value: */ @@ -646,8 +640,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 /* Length: */ /* 21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */ /* + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */ - RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); p2pielen += 2; /* Value: */ @@ -703,8 +696,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 p2pie[p2pielen++] = P2P_ATTR_GROUP_ID; /* Length: */ - /* u16*) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen); */ - RTW_PUT_LE16(p2pie + p2pielen, ETH_ALEN + ussidlen); + *(u16 *) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen); p2pielen += 2;
[PATCH 31/42] staging: rtl8188eu: Use get_unaligned_le16() instead of RTW_GET_LE16()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ap.c |4 ++-- drivers/staging/rtl8188eu/core/rtw_ieee80211.c|8 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |6 +++--- drivers/staging/rtl8188eu/include/osdep_service.h |1 - 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c index 1987185..768a359 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ap.c +++ b/drivers/staging/rtl8188eu/core/rtw_ap.c @@ -900,10 +900,10 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len) /* beacon interval */ p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */ - pbss_network->Configuration.BeaconPeriod = RTW_GET_LE16(p); + pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(p); /* capability */ - cap = RTW_GET_LE16(ie); + cap = get_unaligned_le16(ie); /* SSID */ p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_)); diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index 9eb198a..d264847 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -551,7 +551,7 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis /* pairwise_cipher */ if (left >= 2) { - count = RTW_GET_LE16(pos); + count = get_unaligned_le16(pos); pos += 2; left -= 2; @@ -619,7 +619,7 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi /* pairwise_cipher */ if (left >= 2) { - count = RTW_GET_LE16(pos); + count = get_unaligned_le16(pos); pos += 2; left -= 2; @@ -1179,7 +1179,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len) pos += 6; while (pos-ie < ie_len) { id = *pos; - len = RTW_GET_LE16(pos+1); + len = get_unaligned_le16(pos+1); DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len); pos += (3+len); } @@ -1253,7 +1253,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att while (attr_ptr - p2p_ie < p2p_ielen) { /* 3 = 1(Attribute ID) + 2(Length) */ u8 attr_id = *attr_ptr; - u16 attr_data_len = RTW_GET_LE16(attr_ptr + 1); + u16 attr_data_len = get_unaligned_le16(attr_ptr + 1); u16 attr_len = attr_data_len + 3; if (attr_id == target_attr_id) { diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 1b855b4..dc194324 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -1053,7 +1053,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame goto asoc_class2_error; } - capab_info = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN); + capab_info = get_unaligned_le16(pframe + WLAN_HDR_A3_LEN); left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset); pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset); @@ -1788,7 +1788,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */ break; case RTW_WLAN_ACTION_ADDBA_RESP: /* ADDBA response */ - status = RTW_GET_LE16(&frame_body[3]); + status = get_unaligned_le16(&frame_body[3]); tid = ((frame_body[5] >> 2) & 0x7); if (status == 0) { /* successful */ DBG_88E("agg_enable for TID=%d\n", tid); @@ -1802,7 +1802,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr if ((frame_body[3] & BIT(3)) == 0) { psta->htpriv.agg_enable_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); psta->htpriv.candidate_tid_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf)); - reason_code = RTW_GET_LE16(&frame_body[4]); + reason_code = get_unaligned_le16(&frame_body[4]); } else if ((frame_body[3] & BIT(3)) == BIT(3)) { tid = (frame_body[3] >> 4) & 0x0F; pre
[PATCH 29/42] staging: rtl8188eu: Use get_unaligned_be16() instead of RTW_GET_BE16()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c|8 drivers/staging/rtl8188eu/core/rtw_recv.c |4 ++-- drivers/staging/rtl8188eu/include/osdep_service.h |2 -- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index ae8895e..9eb198a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -807,8 +807,8 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at while (attr_ptr - wps_ie < wps_ielen) { /* 4 = 2(Attribute ID) + 2(Length) */ - u16 attr_id = RTW_GET_BE16(attr_ptr); - u16 attr_data_len = RTW_GET_BE16(attr_ptr + 2); + u16 attr_id = get_unaligned_be16(attr_ptr); + u16 attr_data_len = get_unaligned_be16(attr_ptr + 2); u16 attr_len = attr_data_len + 4; if (attr_id == target_attr_id) { @@ -1156,8 +1156,8 @@ void dump_wps_ie(u8 *ie, u32 ie_len) pos += 6; while (pos-ie < ie_len) { - id = RTW_GET_BE16(pos); - len = RTW_GET_BE16(pos + 2); + id = get_unaligned_be16(pos); + len = get_unaligned_be16(pos + 2); DBG_88E("%s ID:0x%04x, LEN:%u\n", __func__, id, len); pos += (4+len); } diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index 56aa886..e0f0765 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -1644,7 +1644,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe) while (a_len > ETH_HLEN) { /* Offset 12 denote 2 mac address */ - nSubframe_Length = RTW_GET_BE16(pdata + 12); + nSubframe_Length = get_unaligned_be16(pdata + 12); if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) { DBG_88E("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length); @@ -1699,7 +1699,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe) for (i = 0; i < nr_subframes; i++) { sub_skb = subframes[i]; /* convert hdr + possible LLC headers into Ethernet header */ - eth_type = RTW_GET_BE16(&sub_skb->data[6]); + eth_type = get_unaligned_be16(&sub_skb->data[6]); if (sub_skb->len >= 8 && ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) && eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) || diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2a5cb20..ca0957b 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -252,8 +252,6 @@ u64 rtw_modular64(u64 x, u64 y); /* Macros for handling unaligned memory accesses */ -#define RTW_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1])) - #define RTW_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0])) #define RTW_PUT_LE16(a, val) \ do {\ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 39/42] staging: rtl8188eu: Use round_up() instead of RND4()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_security.c |6 +++--- drivers/staging/rtl8188eu/core/rtw_xmit.c |4 ++-- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/include/osdep_service.h |2 -- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_security.c b/drivers/staging/rtl8188eu/core/rtw_security.c index 1b64cb6..d78def5 100644 --- a/drivers/staging/rtl8188eu/core/rtw_security.c +++ b/drivers/staging/rtl8188eu/core/rtw_security.c @@ -189,7 +189,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe) arcfour_encrypt(&mycontext, payload+length, crc, 4); pframe += pxmitpriv->frag_len; - pframe = (u8 *)RND4((size_t)(pframe)); + pframe = (u8 *) round_up((size_t)(pframe), 4); } } } @@ -628,7 +628,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe) arcfour_encrypt(&mycontext, payload+length, crc, 4); pframe += pxmitpriv->frag_len; - pframe = (u8 *)RND4((size_t)(pframe)); + pframe = (u8 *) round_up((size_t)(pframe), 4); } } } else { @@ -1242,7 +1242,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe) aes_cipher(prwskey, pattrib->hdrlen, pframe, length); pframe += pxmitpriv->frag_len; - pframe = (u8 *)RND4((size_t)(pframe)); + pframe = (u8 *) round_up((size_t)(pframe), 8); } } } else{ diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 3a40b2a..95c508a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -692,7 +692,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr payload = pframe; for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) { - payload = (u8 *)RND4((size_t)(payload)); + payload = (u8 *) round_up((size_t)(payload), 4); RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("=== curfragnum=%d, pframe = 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n", curfragnum, *payload, *(payload+1), @@ -1099,7 +1099,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct addr = (size_t)(pframe); - mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset; + mem_start = (unsigned char *) round_up(addr, 4) + hw_hdr_offset; memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen); } diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index 902bbe0..7004e0b 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -401,7 +401,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe) mem_addr += w_sz; - mem_addr = (u8 *)RND4(((size_t)(mem_addr))); + mem_addr = (u8 *) round_up((size_t)mem_addr, 4); } rtw_free_xmitframe(pxmitpriv, pxmitframe); diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index e335471..6c3234b 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -175,8 +175,6 @@ static inline void flush_signals_thread(void) flush_signals(current); } -#define RND4(x)(((x >> 2) + (((x & 3) == 0) ? 0 : 1)) << 2) - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/42] staging: rtl8188eu: Remove unused inline function _RND256()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |8 1 file changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 0b3066c..1bf324c 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -205,14 +205,6 @@ static inline u32 _RND128(u32 sz) return val; } -static inline u32 _RND256(u32 sz) -{ - u32 val; - - val = ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8; - return val; -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/42] staging: rtl8188eu: Use round_up() instead of _RND128()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |8 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 1bf324c..2202570 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -197,14 +197,6 @@ static inline u32 _RND8(u32 sz) return val; } -static inline u32 _RND128(u32 sz) -{ - u32 val; - - val = ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7; - return val; -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index 8015c3a..eddff41 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -160,7 +160,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) switch (haldata->UsbRxAggMode) { case USB_RX_AGG_DMA: case USB_RX_AGG_MIX: - pkt_offset = (u16)_RND128(pkt_offset); + pkt_offset = (u16) round_up(pkt_offset, 128); break; case USB_RX_AGG_USB: pkt_offset = (u16)_RND4(pkt_offset); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 38/42] staging: rtl8188eu: osdep_service.h: Remove unused macros
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |4 1 file changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 913cbfe..e335471 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -109,9 +109,6 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev) netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3)); } -#ifndef BIT - #define BIT(x) (1 << (x)) -#endif #define BIT0 0x0001 #define BIT1 0x0002 @@ -178,7 +175,6 @@ static inline void flush_signals_thread(void) flush_signals(current); } -#define _RND(sz, r) sz)+((r)-1))/(r))*(r)) #define RND4(x)(((x >> 2) + (((x & 3) == 0) ? 0 : 1)) << 2) struct rtw_netdev_priv_indicator { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/42] staging: rtl8188eu: osdep_service.h: Remove unused function definations
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/osdep_service.h |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 1fb92c6..0b3066c 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -159,8 +159,6 @@ u8 *_rtw_malloc(u32 sz); void *rtw_malloc2d(int h, int w, int size); -void _rtw_memcpy(void *dec, void *sour, u32 sz); - u32 _rtw_down_sema(struct semaphore *sema); void _rtw_init_queue(struct __queue *pqueue); @@ -260,6 +258,5 @@ bool rtw_cbuf_empty(struct rtw_cbuf *cbuf); bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf); void *rtw_cbuf_pop(struct rtw_cbuf *cbuf); struct rtw_cbuf *rtw_cbuf_alloc(u32 size); -int wifirate2_ratetbl_inx(unsigned char rate); #endif -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 37/42] staging: rtl8188eu: Use round_up() instead of _RND4()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |2 +- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|4 ++-- drivers/staging/rtl8188eu/include/osdep_service.h |8 drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c |2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index a292c5d..343a6ca 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -324,7 +324,7 @@ _next: pcmdpriv->cmd_issued_cnt++; - pcmd->cmdsz = _RND4((pcmd->cmdsz));/* _RND4 */ + pcmd->cmdsz = round_up(pcmd->cmdsz, 4); memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index 8543847..902bbe0 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -544,7 +544,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp len = xmitframe_need_length(pxmitframe) + TXDESC_SIZE + (pxmitframe->pkt_offset*PACKET_OFFSET_SZ); - if (_RND8(pbuf + len) > MAX_XMITBUF_SZ) { + if (round_up(pbuf + len, 8) > MAX_XMITBUF_SZ) { pxmitframe->agg_num = 1; pxmitframe->pkt_offset = 1; break; @@ -567,7 +567,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp /* handle pointer and stop condition */ pbuf_tail = pbuf + len; - pbuf = _RND8(pbuf_tail); + pbuf = round_up(pbuf_tail, 8); pfirstframe->agg_num++; if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num) diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 927b30b..913cbfe 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -181,14 +181,6 @@ static inline void flush_signals_thread(void) #define _RND(sz, r) sz)+((r)-1))/(r))*(r)) #define RND4(x)(((x >> 2) + (((x & 3) == 0) ? 0 : 1)) << 2) -static inline u32 _RND4(u32 sz) -{ - u32 val; - - val = ((sz >> 2) + ((sz & 3) ? 1 : 0)) << 2; - return val; -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; diff --git a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c index eddff41..ba1e178 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c @@ -163,7 +163,7 @@ static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb) pkt_offset = (u16) round_up(pkt_offset, 128); break; case USB_RX_AGG_USB: - pkt_offset = (u16)_RND4(pkt_offset); + pkt_offset = (u16) round_up(pkt_offset, 4); break; case USB_RX_AGG_DISABLE: default: -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 36/42] staging: rtl8188eu: Use round_up() instead of _RND8()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c|2 +- drivers/staging/rtl8188eu/include/osdep_service.h |8 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c index ba8beb8..8543847 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c @@ -493,7 +493,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp pfirstframe = pxmitframe; len = xmitframe_need_length(pfirstframe) + TXDESC_SIZE + (pfirstframe->pkt_offset*PACKET_OFFSET_SZ); pbuf_tail = len; - pbuf = _RND8(pbuf_tail); + pbuf = round_up(pbuf_tail, 8); /* check pkt amount in one bulk */ desc_cnt = 0; diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2202570..927b30b 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -189,14 +189,6 @@ static inline u32 _RND4(u32 sz) return val; } -static inline u32 _RND8(u32 sz) -{ - u32 val; - - val = ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3; - return val; -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 40/42] staging: rtl8188eu: Remove function thread_enter()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |3 +-- drivers/staging/rtl8188eu/core/rtw_mp.c |2 +- drivers/staging/rtl8188eu/include/osdep_service.h |5 - 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 343a6ca..e65d8ef 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -285,8 +285,7 @@ int rtw_cmd_thread(void *context) struct adapter *padapter = (struct adapter *)context; struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); - - thread_enter("RTW_CMD_THREAD"); + allow_signal(SIGTERM); pcmdbuf = pcmdpriv->cmd_buf; diff --git a/drivers/staging/rtl8188eu/core/rtw_mp.c b/drivers/staging/rtl8188eu/core/rtw_mp.c index ca323db..919c4c2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mp.c +++ b/drivers/staging/rtl8188eu/core/rtw_mp.c @@ -597,7 +597,7 @@ static int mp_xmit_packet_thread(void *context) padapter = pmp_priv->papdater; pxmitpriv = &(padapter->xmitpriv); - thread_enter("RTW_MP_THREAD"); + allow_signal(SIGTERM); /* DBG_88E("%s:pkTx Start\n", __func__); */ while (1) { diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 6c3234b..e7bbc28 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -164,11 +164,6 @@ u32 rtw_systime_to_ms(u32 systime); u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); -static inline void thread_enter(char *name) -{ - allow_signal(SIGTERM); -} - static inline void flush_signals_thread(void) { if (signal_pending(current)) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 42/42] staging: rtl8188eu: Replace _cancel_timer() with del_timer_sync()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |3 +-- drivers/staging/rtl8188eu/core/rtw_mlme.c |8 ++-- drivers/staging/rtl8188eu/core/rtw_p2p.c |4 +--- drivers/staging/rtl8188eu/include/osdep_service.h |6 -- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 556d17d..aeaa873 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -2084,7 +2084,6 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) { - u8 timer_cancelled; struct sta_info *psta = NULL; struct wlan_network *pwlan = NULL; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; @@ -2097,7 +2096,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) _set_timer(&pmlmepriv->assoc_timer, 1); } - _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled); + del_timer_sync(&pmlmepriv->assoc_timer); spin_lock_bh(&pmlmepriv->lock); diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index c03442d..0cb9e15 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -725,10 +725,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_surveydone_event_callback: fw_state:%x\n\n", get_fwstate(pmlmepriv))); if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) { - u8 timer_cancelled; - - _cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled); - + del_timer_sync(&pmlmepriv->scan_to_timer); _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY); } else { RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv))); @@ -1103,7 +1100,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) { - u8 timer_cancelled; struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL; struct sta_priv *pstapriv = &adapter->stapriv; struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); @@ -1196,7 +1192,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) } /* s5. Cancle assoc_timer */ - _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled); + del_timer_sync(&pmlmepriv->assoc_timer); RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancle assoc_timer\n")); diff --git a/drivers/staging/rtl8188eu/core/rtw_p2p.c b/drivers/staging/rtl8188eu/core/rtw_p2p.c index 6023a85..e1fd198 100644 --- a/drivers/staging/rtl8188eu/core/rtw_p2p.c +++ b/drivers/staging/rtl8188eu/core/rtw_p2p.c @@ -1404,9 +1404,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr result = attr_content; if (attr_content == P2P_STATUS_SUCCESS) { - u8 bcancelled = 0; - - _cancel_timer(&pwdinfo->restore_p2p_state_timer, &bcancelled); + del_timer_sync(&pwdinfo->restore_p2p_state_timer); /* Commented by Albert 20100911 */ /* Todo: Need to handle the case which both Intents are the same. */ diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index 2d07dea..95131fe 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -90,12 +90,6 @@ static inline void _set_timer(struct timer_list *ptimer, u32 delay_time) mod_timer(ptimer , (jiffies+(delay_time*HZ/1000))); } -static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled) -{ - del_timer_sync(ptimer); - *bcancelled = true;/* true ==1; false==0 */ -} - #define RTW_TIMER_HDL_ARGS void *FunctionContext #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl #define RTW_DECLARE_TIMER_HDL(name) \ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 41/42] staging: rtl8188eu: Remove function flush_signals_thread()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |3 ++- drivers/staging/rtl8188eu/core/rtw_mp.c |3 ++- drivers/staging/rtl8188eu/include/osdep_service.h |6 -- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index e65d8ef..556d17d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -359,7 +359,8 @@ post_process: rtw_free_cmd_obj(pcmd); } - flush_signals_thread(); + if (signal_pending(current)) + flush_signals(current); goto _next; } diff --git a/drivers/staging/rtl8188eu/core/rtw_mp.c b/drivers/staging/rtl8188eu/core/rtw_mp.c index 919c4c2..d879948 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mp.c +++ b/drivers/staging/rtl8188eu/core/rtw_mp.c @@ -629,7 +629,8 @@ static int mp_xmit_packet_thread(void *context) (pmptx->count == pmptx->sended)) goto exit; - flush_signals_thread(); + if (signal_pending(current)) + flush_signals(current); } exit: diff --git a/drivers/staging/rtl8188eu/include/osdep_service.h b/drivers/staging/rtl8188eu/include/osdep_service.h index e7bbc28..2d07dea 100644 --- a/drivers/staging/rtl8188eu/include/osdep_service.h +++ b/drivers/staging/rtl8188eu/include/osdep_service.h @@ -164,12 +164,6 @@ u32 rtw_systime_to_ms(u32 systime); u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); -static inline void flush_signals_thread(void) -{ - if (signal_pending(current)) - flush_signals(current); -} - struct rtw_netdev_priv_indicator { void *priv; u32 sizeof_priv; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/5] Remove non-standard ioctls
Driver implements many WEXT_PRIV (non-standard) ioctl handlers to provide userspace interface for following functionalities. * WPS ( Not working ) * Debugging ( Setting/Getting register's value, dumping information) * P2P mode * Mesh point MP (Mode) I suggest we should remove all functionalities which are using non-standard ioctls, as a result of doing this the driver code complexity will reduce. And once the driver is switched to use mac80211 framework, we can reimplement functionalities mentioned above in a standard way. navin patidar (5): staging: rtl8188eu: Remove WEXT_PRIV private ioctl handlers staging: rtl8188eu: Remove files rtw_mp_ioctl.[c,h] staging: rtl8188eu: Remove usb_osintf.h header file. staging: rtl8188eu: Remove mp( mesh point) mode support staging: rtl8188eu: Remove P2P support drivers/staging/rtl8188eu/Makefile |4 - drivers/staging/rtl8188eu/core/rtw_ap.c |8 - drivers/staging/rtl8188eu/core/rtw_cmd.c | 66 - drivers/staging/rtl8188eu/core/rtw_ieee80211.c | 208 +- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c |2 - drivers/staging/rtl8188eu/core/rtw_mlme.c| 18 +- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c| 3157 +-- drivers/staging/rtl8188eu/core/rtw_mp.c | 995 drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c| 1430 - drivers/staging/rtl8188eu/core/rtw_p2p.c | 2015 --- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 37 +- drivers/staging/rtl8188eu/core/rtw_recv.c| 27 - drivers/staging/rtl8188eu/core/rtw_wlan_util.c |9 - drivers/staging/rtl8188eu/core/rtw_xmit.c|1 - drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c | 11 - drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 72 - drivers/staging/rtl8188eu/hal/rtl8188e_mp.c | 854 --- drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c |3 - drivers/staging/rtl8188eu/hal/usb_halinit.c | 60 +- drivers/staging/rtl8188eu/include/drv_types.h|8 - drivers/staging/rtl8188eu/include/ieee80211.h| 13 - drivers/staging/rtl8188eu/include/osdep_intf.h |5 +- drivers/staging/rtl8188eu/include/rtl8188e_cmd.h |4 - drivers/staging/rtl8188eu/include/rtl8188e_hal.h |4 - drivers/staging/rtl8188eu/include/rtw_cmd.h |3 - drivers/staging/rtl8188eu/include/rtw_mlme_ext.h | 12 - drivers/staging/rtl8188eu/include/rtw_mp.h | 495 -- drivers/staging/rtl8188eu/include/rtw_mp_ioctl.h | 340 -- drivers/staging/rtl8188eu/include/rtw_p2p.h | 135 - drivers/staging/rtl8188eu/include/sta_info.h | 15 - drivers/staging/rtl8188eu/include/usb_osintf.h | 38 - drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 6403 +++--- drivers/staging/rtl8188eu/os_dep/os_intfs.c | 37 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 23 +- drivers/staging/rtl8188eu/os_dep/xmit_linux.c|1 - 35 files changed, 941 insertions(+), 15572 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/core/rtw_mp.c delete mode 100644 drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c delete mode 100644 drivers/staging/rtl8188eu/core/rtw_p2p.c delete mode 100644 drivers/staging/rtl8188eu/hal/rtl8188e_mp.c delete mode 100644 drivers/staging/rtl8188eu/include/rtw_mp.h delete mode 100644 drivers/staging/rtl8188eu/include/rtw_mp_ioctl.h delete mode 100644 drivers/staging/rtl8188eu/include/rtw_p2p.h delete mode 100644 drivers/staging/rtl8188eu/include/usb_osintf.h -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 3/5] staging: rtl8188eu: Remove usb_osintf.h header file.
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_ieee80211.c |2 +- drivers/staging/rtl8188eu/core/rtw_ioctl_set.c |2 -- drivers/staging/rtl8188eu/core/rtw_mlme.c |1 - drivers/staging/rtl8188eu/core/rtw_pwrctrl.c |1 - drivers/staging/rtl8188eu/core/rtw_xmit.c |1 - drivers/staging/rtl8188eu/hal/usb_halinit.c|1 - drivers/staging/rtl8188eu/include/osdep_intf.h |5 +++- drivers/staging/rtl8188eu/include/usb_osintf.h | 38 drivers/staging/rtl8188eu/os_dep/os_intfs.c|1 - drivers/staging/rtl8188eu/os_dep/usb_intf.c| 19 ++-- drivers/staging/rtl8188eu/os_dep/xmit_linux.c |1 - 11 files changed, 14 insertions(+), 58 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/usb_osintf.h diff --git a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c index a375b75..24665d6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ieee80211.c +++ b/drivers/staging/rtl8188eu/core/rtw_ieee80211.c @@ -20,11 +20,11 @@ #define _IEEE80211_C #include +#include #include #include #include #include -#include u8 RTW_WPA_OUI_TYPE[] = { 0x00, 0x50, 0xf2, 1 }; u16 RTW_WPA_VERSION = 1; diff --git a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c index a97da87..39932cb 100644 --- a/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c +++ b/drivers/staging/rtl8188eu/core/rtw_ioctl_set.c @@ -25,8 +25,6 @@ #include #include -#include - extern void indicate_wx_scan_complete_event(struct adapter *padapter); #define IS_MAC_ADDRESS_BROADCAST(addr) \ diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme.c b/drivers/staging/rtl8188eu/core/rtw_mlme.c index 0cb9e15..45e2739 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme.c @@ -30,7 +30,6 @@ #include #include #include -#include #include extern unsigned char MCS_rate_2R[16]; diff --git a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c index 9b80c8a..5605d95 100644 --- a/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +++ b/drivers/staging/rtl8188eu/core/rtw_pwrctrl.c @@ -24,7 +24,6 @@ #include #include #include -#include static int rtw_hw_suspend(struct adapter *padapter) { diff --git a/drivers/staging/rtl8188eu/core/rtw_xmit.c b/drivers/staging/rtl8188eu/core/rtw_xmit.c index 95c508a..639ace0 100644 --- a/drivers/staging/rtl8188eu/core/rtw_xmit.c +++ b/drivers/staging/rtl8188eu/core/rtw_xmit.c @@ -23,7 +23,6 @@ #include #include #include -#include #include static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 }; diff --git a/drivers/staging/rtl8188eu/hal/usb_halinit.c b/drivers/staging/rtl8188eu/hal/usb_halinit.c index 19cf5f5..2bec1c3 100644 --- a/drivers/staging/rtl8188eu/hal/usb_halinit.c +++ b/drivers/staging/rtl8188eu/hal/usb_halinit.c @@ -27,7 +27,6 @@ #include #include #include -#include #defineHAL_MAC_ENABLE 1 #defineHAL_BB_ENABLE 1 diff --git a/drivers/staging/rtl8188eu/include/osdep_intf.h b/drivers/staging/rtl8188eu/include/osdep_intf.h index 523141a..efa7868 100644 --- a/drivers/staging/rtl8188eu/include/osdep_intf.h +++ b/drivers/staging/rtl8188eu/include/osdep_intf.h @@ -24,6 +24,9 @@ #include #include +extern char *rtw_initmac; +extern int rtw_mc2u_disable; + u8 rtw_init_drv_sw(struct adapter *padapter); u8 rtw_free_drv_sw(struct adapter *padapter); u8 rtw_reset_drv_sw(struct adapter *padapter); @@ -40,8 +43,8 @@ u16 rtw_recv_select_queue(struct sk_buff *skb); void rtw_proc_init_one(struct net_device *dev); void rtw_proc_remove_one(struct net_device *dev); +int pm_netdev_open(struct net_device *pnetdev, u8 bnormal); void rtw_ips_dev_unload(struct adapter *padapter); - int rtw_ips_pwr_up(struct adapter *padapter); void rtw_ips_pwr_down(struct adapter *padapter); diff --git a/drivers/staging/rtl8188eu/include/usb_osintf.h b/drivers/staging/rtl8188eu/include/usb_osintf.h deleted file mode 100644 index 85805ca..000 --- a/drivers/staging/rtl8188eu/include/usb_osintf.h +++ /dev/null @@ -1,38 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software
[PATCH 01/48] staging: rtl8188eu: Remove struct evt_priv and its uses
c2h_wk (work_struct) is naver scheduled to handle events, so no use of keeping event data. And also function rtw_hal_c2h_handler() responsible for handling c2h events, is a dummy function. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 86 - drivers/staging/rtl8188eu/core/rtw_mlme_ext.c |4 -- drivers/staging/rtl8188eu/include/cmd_osdep.h |1 - drivers/staging/rtl8188eu/include/drv_types.h |1 - drivers/staging/rtl8188eu/include/rtw_cmd.h | 14 drivers/staging/rtl8188eu/os_dep/os_intfs.c |8 --- 6 files changed, 114 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 310e916..293fda4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -72,43 +72,6 @@ exit: return res; } -static void c2h_wk_callback(struct work_struct *work); - -int _rtw_init_evt_priv(struct evt_priv *pevtpriv) -{ - int res = _SUCCESS; - - - /* allocate DMA-able/Non-Page memory for cmd_buf and rsp_buf */ - atomic_set(&pevtpriv->event_seq, 0); - pevtpriv->evt_done_cnt = 0; - - INIT_WORK(&pevtpriv->c2h_wk, c2h_wk_callback); - pevtpriv->c2h_wk_alive = false; - pevtpriv->c2h_queue = rtw_cbuf_alloc(C2H_QUEUE_MAX_LEN+1); - - - return res; -} - -void rtw_free_evt_priv(struct evt_priv *pevtpriv) -{ - - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+rtw_free_evt_priv\n")); - - cancel_work_sync(&pevtpriv->c2h_wk); - while (pevtpriv->c2h_wk_alive) - msleep(10); - - while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) { - void *c2h = rtw_cbuf_pop(pevtpriv->c2h_queue); - if (c2h != NULL && c2h != (void *)pevtpriv) - kfree(c2h); - } - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("-rtw_free_evt_priv\n")); - -} - void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { @@ -175,13 +138,6 @@ u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) return res; } -u32 rtw_init_evt_priv(struct evt_priv *pevtpriv) -{ - int res; - res = _rtw_init_evt_priv(pevtpriv); - return res; -} - void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("rtw_free_cmd_priv\n")); @@ -1877,48 +1833,6 @@ exit: return ret; } -static void c2h_wk_callback(struct work_struct *work) -{ - struct evt_priv *evtpriv = container_of(work, struct evt_priv, c2h_wk); - struct adapter *adapter = container_of(evtpriv, struct adapter, evtpriv); - struct c2h_evt_hdr *c2h_evt; - c2h_id_filter ccx_id_filter = rtw_hal_c2h_id_filter_ccx(adapter); - - evtpriv->c2h_wk_alive = true; - - while (!rtw_cbuf_empty(evtpriv->c2h_queue)) { - c2h_evt = (struct c2h_evt_hdr *) - rtw_cbuf_pop(evtpriv->c2h_queue); - if (c2h_evt != NULL) - /* This C2H event is read, clear it */ - c2h_evt_clear(adapter); - else { - c2h_evt = (struct c2h_evt_hdr *)rtw_malloc(16); - /* This C2H event is not read, read & clear now */ - if (c2h_evt != NULL && - c2h_evt_read(adapter, (u8 *)c2h_evt) != _SUCCESS) - continue; - } - - /* Special pointer to trigger c2h_evt_clear only */ - if ((void *)c2h_evt == (void *)evtpriv) - continue; - - if (!c2h_evt_exist(c2h_evt)) { - kfree(c2h_evt); - continue; - } - - if (ccx_id_filter(c2h_evt->id) == true) { - /* Handle CCX report here */ - rtw_hal_c2h_handler(adapter, c2h_evt); - kfree(c2h_evt); - } - } - - evtpriv->c2h_wk_alive = false; -} - u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) { struct drvextra_cmd_parm *pdrvextra_cmd; diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index c42d9fd..c4888b1 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -5461,7 +5461,6 @@ u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf) u16 evt_sz; uint*peventbuf; void (*event_callback)(struct adapter *dev, u8 *pbuf); - struct evt_priv *pevt_priv = &(padapter->evtpriv); peventbuf = (uint *)pbuf; evt_sz = (u16)(*peventbuf&0x); @@ -5482,15 +5481,12 @@ u8 mlme_evt_hdl(struct adapter *padapter, unsigned char *pbuf) goto _abo
[PATCH 03/48] staging: rtl8188eu: Remove unused function c2h_evt_read()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_com.c | 49 --- drivers/staging/rtl8188eu/include/hal_com.h |2 -- 2 files changed, 51 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_com.c b/drivers/staging/rtl8188eu/hal/hal_com.c index baefb46..c91a58c 100644 --- a/drivers/staging/rtl8188eu/hal/hal_com.c +++ b/drivers/staging/rtl8188eu/hal/hal_com.c @@ -330,52 +330,3 @@ void c2h_evt_clear(struct adapter *adapter) { usb_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE); } - -s32 c2h_evt_read(struct adapter *adapter, u8 *buf) -{ - s32 ret = _FAIL; - struct c2h_evt_hdr *c2h_evt; - int i; - u8 trigger; - - if (buf == NULL) - goto exit; - - trigger = usb_read8(adapter, REG_C2HEVT_CLEAR); - - if (trigger == C2H_EVT_HOST_CLOSE) - goto exit; /* Not ready */ - else if (trigger != C2H_EVT_FW_CLOSE) - goto clear_evt; /* Not a valid value */ - - c2h_evt = (struct c2h_evt_hdr *)buf; - - memset(c2h_evt, 0, 16); - - *buf = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL); - *(buf+1) = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1); - - RT_PRINT_DATA(_module_hal_init_c_, _drv_info_, "c2h_evt_read(): ", - &c2h_evt , sizeof(c2h_evt)); - - /* Read the content */ - for (i = 0; i < c2h_evt->plen; i++) - c2h_evt->payload[i] = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL + - sizeof(*c2h_evt) + i); - - RT_PRINT_DATA(_module_hal_init_c_, _drv_info_, - "c2h_evt_read(): Command Content:\n", - c2h_evt->payload, c2h_evt->plen); - - ret = _SUCCESS; - -clear_evt: - /* - * Clear event to notify FW we have read the command. - * If this field isn't clear, the FW won't update the next - * command message. - */ - c2h_evt_clear(adapter); -exit: - return ret; -} diff --git a/drivers/staging/rtl8188eu/include/hal_com.h b/drivers/staging/rtl8188eu/include/hal_com.h index 81c2709..1527efa 100644 --- a/drivers/staging/rtl8188eu/include/hal_com.h +++ b/drivers/staging/rtl8188eu/include/hal_com.h @@ -168,6 +168,4 @@ bool Hal_MappingOutPipe(struct adapter *pAdapter, u8 NumOutPipe); void hal_init_macaddr(struct adapter *adapter); void c2h_evt_clear(struct adapter *adapter); -s32 c2h_evt_read(struct adapter *adapter, u8 *buf); - #endif /* __HAL_COMMON_H__ */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 02/48] staging: rtl8188eu: Remove function c2h_evt_hdl()
c2h_evt_hdl() calls a dummy function rtw_hal_c2h_handler() to handle events, so no use of keeping it. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c | 28 1 file changed, 28 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 293fda4..a2b355c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1808,31 +1808,6 @@ exit: return res; } -static s32 c2h_evt_hdl(struct adapter *adapter, struct c2h_evt_hdr *c2h_evt, c2h_id_filter filter) -{ - s32 ret = _FAIL; - u8 buf[16]; - - if (!c2h_evt) { - /* No c2h event in cmd_obj, read c2h event before handling*/ - if (c2h_evt_read(adapter, buf) == _SUCCESS) { - c2h_evt = (struct c2h_evt_hdr *)buf; - - if (filter && filter(c2h_evt->id) == false) - goto exit; - - ret = rtw_hal_c2h_handler(adapter, c2h_evt); - } - } else { - if (filter && filter(c2h_evt->id) == false) - goto exit; - - ret = rtw_hal_c2h_handler(adapter, c2h_evt); - } -exit: - return ret; -} - u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) { struct drvextra_cmd_parm *pdrvextra_cmd; @@ -1863,9 +1838,6 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) rtw_chk_hi_queue_hdl(padapter); break; #endif /* CONFIG_88EU_AP_MODE */ - case C2H_WK_CID: - c2h_evt_hdl(padapter, (struct c2h_evt_hdr *)pdrvextra_cmd->pbuf, NULL); - break; default: break; } -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/48] staging: rtl8188eu: Remove unused function rtw_hal_c2h_id_filter_ccx()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/hal/hal_intf.c |5 - drivers/staging/rtl8188eu/include/hal_intf.h |4 2 files changed, 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/hal/hal_intf.c b/drivers/staging/rtl8188eu/hal/hal_intf.c index 279dd0b..2faa690 100644 --- a/drivers/staging/rtl8188eu/hal/hal_intf.c +++ b/drivers/staging/rtl8188eu/hal/hal_intf.c @@ -375,8 +375,3 @@ void rtw_hal_reset_security_engine(struct adapter *adapter) if (adapter->HalFunc.hal_reset_security_engine) adapter->HalFunc.hal_reset_security_engine(adapter); } - -c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter) -{ - return adapter->HalFunc.c2h_id_filter_ccx; -} diff --git a/drivers/staging/rtl8188eu/include/hal_intf.h b/drivers/staging/rtl8188eu/include/hal_intf.h index f7ce9de..56d5c50 100644 --- a/drivers/staging/rtl8188eu/include/hal_intf.h +++ b/drivers/staging/rtl8188eu/include/hal_intf.h @@ -144,8 +144,6 @@ enum hal_intf_ps_func { HAL_MAX_ID, }; -typedef s32 (*c2h_id_filter)(u8 id); - struct hal_ops { u32 (*hal_power_on)(struct adapter *padapter); u32 (*hal_init)(struct adapter *padapter); @@ -236,7 +234,6 @@ struct hal_ops { void (*hal_notch_filter)(struct adapter *adapter, bool enable); void (*hal_reset_security_engine)(struct adapter *adapter); - c2h_id_filter c2h_id_filter_ccx; }; enum rt_eeprom_type { @@ -340,7 +337,6 @@ int rtw_hal_iol_cmd(struct adapter *adapter, struct xmit_frame *xmit_frame, void rtw_hal_notch_filter(struct adapter *adapter, bool enable); void rtw_hal_reset_security_engine(struct adapter *adapter); -c2h_id_filter rtw_hal_c2h_id_filter_ccx(struct adapter *adapter); void indicate_wx_scan_complete_event(struct adapter *padapter); u8 rtw_do_join(struct adapter *padapter); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 09/48] staging: rtl8188eu: Remove unused function rtw_c2h_wk_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 33 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 -- 2 files changed, 35 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 294c9e2..ec0990f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1741,39 +1741,6 @@ exit: } #endif -u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt) -{ - struct cmd_obj *ph2c; - struct drvextra_cmd_parm *pdrvextra_cmd_parm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - - pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL); - if (pdrvextra_cmd_parm == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - pdrvextra_cmd_parm->ec_id = C2H_WK_CID; - pdrvextra_cmd_parm->type_size = c2h_evt ? 16 : 0; - pdrvextra_cmd_parm->pbuf = c2h_evt; - - init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra)); - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); - -exit: - - return res; -} - u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) { struct drvextra_cmd_parm *pdrvextra_cmd; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index bb1f8f0..ca17145 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -776,8 +776,6 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue); u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no); u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option); -u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt); - u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf); void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 11/48] staging: rtl8188eu: Remove unused function rtw_setphy_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 40 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 41 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index cc8b82c..ba325f8 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -482,46 +482,6 @@ exit: return res; } -/* -unsigned char rtw_setphy_cmd(unsigned char *adapter) - -1. be called only after rtw_update_registrypriv_dev_network(~) or mp testing program -2. for AdHoc/Ap mode or mp mode? - -*/ -u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch) -{ - struct cmd_obj *ph2c; - struct setphy_parm *psetphypara; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - psetphypara = kzalloc(sizeof(struct setphy_parm), GFP_KERNEL); - - if (psetphypara == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, psetphypara, _SetPhy_CMD_); - - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("CH =%d, modem =%d", ch, modem)); - - psetphypara->modem = modem; - psetphypara->rfchannel = ch; - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; -} - u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val) { struct cmd_obj *ph2c; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index fb999fc..9bae5541 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -733,7 +733,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, u8 rtw_createbss_cmd(struct adapter *padapter); u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned int sz); -u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch); u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key); u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/48] staging: rtl8188eu: Remove unused function rtw_setbasicrate_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 33 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 34 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index ec0990f..cc8b82c 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -482,39 +482,6 @@ exit: return res; } -u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset) -{ - struct cmd_obj *ph2c; - struct setbasicrate_parm *pssetbasicratepara; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - pssetbasicratepara = kzalloc(sizeof(struct setbasicrate_parm), GFP_KERNEL); - - if (pssetbasicratepara == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, pssetbasicratepara, _SetBasicRate_CMD_); - - memcpy(pssetbasicratepara->basicrates, rateset, NumRates); - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - - - return res; -} - - /* unsigned char rtw_setphy_cmd(unsigned char *adapter) diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index ca17145..fb999fc 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -743,7 +743,6 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); -u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset); u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val); u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val); u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 12/48] staging: rtl8188eu: Remove unused function rtw_setbbreg_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 30 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 31 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index ba325f8..4d78e23 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -482,36 +482,6 @@ exit: return res; } -u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val) -{ - struct cmd_obj *ph2c; - struct writeBB_parm *pwritebbparm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - pwritebbparm = kzalloc(sizeof(struct writeBB_parm), GFP_KERNEL); - - if (pwritebbparm == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, pwritebbparm, GEN_CMD_CODE(_SetBBReg)); - - pwritebbparm->offset = offset; - pwritebbparm->value = val; - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; -} - u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) { struct cmd_obj *ph2c; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 9bae5541..fe21838 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -742,7 +742,6 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); -u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val); u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val); u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/48] staging: rtl8188eu: Remove unused function rtw_[set, get]rfreg_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 67 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 - 2 files changed, 69 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 96e5946..c62db33 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -482,73 +482,6 @@ exit: return res; } -u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val) -{ - struct cmd_obj *ph2c; - struct writeRF_parm *pwriterfparm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - pwriterfparm = kzalloc(sizeof(struct writeRF_parm), GFP_KERNEL); - - if (pwriterfparm == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, pwriterfparm, GEN_CMD_CODE(_SetRFReg)); - - pwriterfparm->offset = offset; - pwriterfparm->value = val; - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; -} - -u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) -{ - struct cmd_obj *ph2c; - struct readRF_parm *prdrfparm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - - prdrfparm = kzalloc(sizeof(struct readRF_parm), GFP_KERNEL); - if (prdrfparm == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - INIT_LIST_HEAD(&ph2c->list); - ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg); - ph2c->parmbuf = (unsigned char *)prdrfparm; - ph2c->cmdsz = sizeof(struct readRF_parm); - ph2c->rsp = pval; - ph2c->rspsz = sizeof(struct readRF_rsp); - - prdrfparm->offset = offset; - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); - -exit: - - - return res; -} - void rtw_getbbrfreg_cmdrsp_callback(struct adapter *padapter, struct cmd_obj *pcmd) { diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index f2ddb8a..432fbd2 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -742,8 +742,6 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); -u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val); -u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode); u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_table); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/48] staging: rtl8188eu: Remove unused function rtw_getbbreg_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 33 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 34 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 4d78e23..96e5946 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -482,39 +482,6 @@ exit: return res; } -u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval) -{ - struct cmd_obj *ph2c; - struct readBB_parm *prdbbparm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - prdbbparm = kzalloc(sizeof(struct readBB_parm), GFP_KERNEL); - - if (prdbbparm == NULL) { - kfree(ph2c); - return _FAIL; - } - - INIT_LIST_HEAD(&ph2c->list); - ph2c->cmdcode = GEN_CMD_CODE(_GetBBReg); - ph2c->parmbuf = (unsigned char *)prdbbparm; - ph2c->cmdsz = sizeof(struct readBB_parm); - ph2c->rsp = pval; - ph2c->rspsz = sizeof(struct readBB_rsp); - - prdbbparm->offset = offset; - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; -} - u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val) { struct cmd_obj *ph2c; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index fe21838..f2ddb8a 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -743,7 +743,6 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); u8 rtw_setrfreg_cmd(struct adapter *padapter, u8 offset, u32 val); -u8 rtw_getbbreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); u8 rtw_getrfreg_cmd(struct adapter *padapter, u8 offset, u8 *pval); u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode); u8 rtw_setrttbl_cmd(struct adapter *padapter, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 15/48] staging: rtl8188eu: Remove unused function rtw_setrttbl_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 29 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |9 - 2 files changed, 38 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index c62db33..51f624d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -890,35 +890,6 @@ exit: return res; } -u8 rtw_setrttbl_cmd(struct adapter *padapter, struct setratable_parm *prate_table) -{ - struct cmd_obj *ph2c; - struct setratable_parm *psetrttblparm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - psetrttblparm = kzalloc(sizeof(struct setratable_parm), GFP_KERNEL); - - if (psetrttblparm == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, psetrttblparm, GEN_CMD_CODE(_SetRaTable)); - - memcpy(psetrttblparm, prate_table, sizeof(struct setratable_parm)); - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); -exit: - return res; -} - u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr) { struct cmd_priv *pcmdpriv = &padapter->cmdpriv; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 432fbd2..af18c75 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -590,13 +590,6 @@ struct getcountjudge_rsp { u8 count_judge[MAX_RATES_LENGTH]; }; -struct setratable_parm { - u8 ss_ForceUp[NumRates]; - u8 ss_ULevel[NumRates]; - u8 ss_DLevel[NumRates]; - u8 count_judge[NumRates]; -}; - struct getratable_parm { uint rsvd; }; @@ -743,8 +736,6 @@ u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode); -u8 rtw_setrttbl_cmd(struct adapter *padapter, - struct setratable_parm *prate_table); u8 rtw_gettssi_cmd(struct adapter *padapter, u8 offset, u8 *pval); u8 rtw_setfwdig_cmd(struct adapter *padapter, u8 type); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 20/48] staging: rtl8188eu: Remove unused function rtw_setstandby_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 34 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 35 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index bf7a81d..5fab194 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -339,40 +339,6 @@ post_process: complete_and_exit(NULL, 0); } -u8 rtw_setstandby_cmd(struct adapter *padapter, uint action) -{ - struct cmd_obj *ph2c; - struct usb_suspend_parm *psetusbsuspend; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - u8 ret = _SUCCESS; - - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - ret = _FAIL; - goto exit; - } - - psetusbsuspend = kzalloc(sizeof(struct usb_suspend_parm), GFP_KERNEL); - if (psetusbsuspend == NULL) { - kfree(ph2c); - ret = _FAIL; - goto exit; - } - - psetusbsuspend->action = action; - - init_h2fwcmd_w_parm_no_rsp(ph2c, psetusbsuspend, GEN_CMD_CODE(_SetUsbSuspend)); - - ret = rtw_enqueue_cmd(pcmdpriv, ph2c); - -exit: - - - return ret; -} - /* rtw_sitesurvey_cmd(~) ### NOTE: () diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 278208df..77981cd 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -718,7 +718,6 @@ Result: #define H2C_CMD_OVERFLOW 0x06 #define H2C_RESERVED 0x07 -u8 rtw_setstandby_cmd(struct adapter *padapter, uint action); u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 21/48] staging: rtl8188eu: Remove unused function rtw_createbss_cmd_ex()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 28 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 -- 2 files changed, 30 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 5fab194..ab3349f 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -499,34 +499,6 @@ exit: return res; } -u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, unsigned int sz) -{ - struct cmd_obj *pcmd; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - u8 res = _SUCCESS; - - - pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (pcmd == NULL) { - res = _FAIL; - goto exit; - } - - INIT_LIST_HEAD(&pcmd->list); - pcmd->cmdcode = GEN_CMD_CODE(_CreateBss); - pcmd->parmbuf = pbss; - pcmd->cmdsz = sz; - pcmd->rsp = NULL; - pcmd->rspsz = 0; - - res = rtw_enqueue_cmd(pcmdpriv, pcmd); - -exit: - - - return res; -} - u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) { u8 res = _SUCCESS; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 77981cd..d356cf4 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -722,8 +722,6 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, int ch_num); u8 rtw_createbss_cmd(struct adapter *padapter); -u8 rtw_createbss_cmd_ex(struct adapter *padapter, unsigned char *pbss, - unsigned int sz); u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key); u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 16/48] staging: rtl8188eu: Remove unused function rtw_set_ch_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 53 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 - 2 files changed, 55 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 51f624d..3762fa6 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1005,59 +1005,6 @@ exit: return res; } -u8 rtw_set_ch_cmd(struct adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 enqueue) -{ - struct cmd_obj *pcmdobj; - struct set_ch_parm *set_ch_parm; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - u8 res = _SUCCESS; - - - DBG_88E(FUNC_NDEV_FMT" ch:%u, bw:%u, ch_offset:%u\n", - FUNC_NDEV_ARG(padapter->pnetdev), ch, bw, ch_offset); - - /* check input parameter */ - - /* prepare cmd parameter */ - set_ch_parm = kzalloc(sizeof(*set_ch_parm), GFP_KERNEL); - if (set_ch_parm == NULL) { - res = _FAIL; - goto exit; - } - set_ch_parm->ch = ch; - set_ch_parm->bw = bw; - set_ch_parm->ch_offset = ch_offset; - - if (enqueue) { - /* need enqueue, prepare cmd_obj and enqueue */ - pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (pcmdobj == NULL) { - kfree(set_ch_parm); - res = _FAIL; - goto exit; - } - - init_h2fwcmd_w_parm_no_rsp(pcmdobj, set_ch_parm, GEN_CMD_CODE(_SetChannel)); - res = rtw_enqueue_cmd(pcmdpriv, pcmdobj); - } else { - /* no need to enqueue, do the cmd hdl directly and free cmd parameter */ - if (H2C_SUCCESS != set_ch_hdl(padapter, (u8 *)set_ch_parm)) - res = _FAIL; - - kfree(set_ch_parm); - } - - /* do something based on res... */ - -exit: - - DBG_88E(FUNC_NDEV_FMT" res:%u\n", FUNC_NDEV_ARG(padapter->pnetdev), res); - - - return res; -} - u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue) { struct cmd_obj *pcmdobj; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index af18c75..6ed4a90 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -755,8 +755,6 @@ u8 rtw_ps_cmd(struct adapter *padapter); u8 rtw_chk_hi_queue_cmd(struct adapter *padapter); #endif -u8 rtw_set_ch_cmd(struct adapter *padapter, u8 ch, u8 bw, u8 ch_offset, - u8 enqueue); u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue); u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no); u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 17/48] staging: rtl8188eu: Remove unused function rtw_set_csa_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 35 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 36 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 3762fa6..7141ab4 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1059,41 +1059,6 @@ exit: return res; } -u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no) -{ - struct cmd_obj *pcmdobj; - struct SetChannelSwitch_param *setChannelSwitch_param; - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - - u8 res = _SUCCESS; - - - RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n")); - - pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (pcmdobj == NULL) { - res = _FAIL; - goto exit; - } - - setChannelSwitch_param = kzalloc(sizeof(struct SetChannelSwitch_param), GFP_KERNEL); - if (setChannelSwitch_param == NULL) { - kfree(pcmdobj); - res = _FAIL; - goto exit; - } - - setChannelSwitch_param->new_ch_no = new_ch_no; - - init_h2fwcmd_w_parm_no_rsp(pcmdobj, setChannelSwitch_param, GEN_CMD_CODE(_SetChannelSwitch)); - res = rtw_enqueue_cmd(pcmdpriv, pcmdobj); - -exit: - - - return res; -} - u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option) { return _SUCCESS; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 6ed4a90..108cf30 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -756,7 +756,6 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter); #endif u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue); -u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no); u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option); u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 18/48] staging: rtl8188eu: Remove dummy function rtw_tdls_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|5 - drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 7141ab4..de62902 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1059,11 +1059,6 @@ exit: return res; } -u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option) -{ - return _SUCCESS; -} - static void traffic_status_watchdog(struct adapter *padapter) { u8 bEnterPS; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 108cf30..fa9d5f7 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -756,7 +756,6 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter); #endif u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue); -u8 rtw_tdls_cmd(struct adapter *padapter, u8 *addr, u8 option); u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 19/48] staging: rtl8188eu: Remove unused function rtw_setassocsta_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 44 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 45 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index de62902..bf7a81d 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -890,50 +890,6 @@ exit: return res; } -u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr) -{ - struct cmd_priv *pcmdpriv = &padapter->cmdpriv; - struct cmd_obj *ph2c; - struct set_assocsta_parm *psetassocsta_para; - struct set_stakey_rsp *psetassocsta_rsp = NULL; - - u8 res = _SUCCESS; - - - ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL); - if (ph2c == NULL) { - res = _FAIL; - goto exit; - } - - psetassocsta_para = kzalloc(sizeof(struct set_assocsta_parm), GFP_KERNEL); - if (psetassocsta_para == NULL) { - kfree(ph2c); - res = _FAIL; - goto exit; - } - - psetassocsta_rsp = kzalloc(sizeof(struct set_assocsta_rsp), GFP_KERNEL); - if (psetassocsta_rsp == NULL) { - kfree(ph2c); - kfree(psetassocsta_para); - return _FAIL; - } - - init_h2fwcmd_w_parm_no_rsp(ph2c, psetassocsta_para, _SetAssocSta_CMD_); - ph2c->rsp = (u8 *)psetassocsta_rsp; - ph2c->rspsz = sizeof(struct set_assocsta_rsp); - - ether_addr_copy(psetassocsta_para->addr, mac_addr); - - res = rtw_enqueue_cmd(pcmdpriv, ph2c); - -exit: - - - return res; -} - u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr) { struct cmd_priv *pcmdpriv = &padapter->cmdpriv; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index fa9d5f7..278208df 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -718,7 +718,6 @@ Result: #define H2C_CMD_OVERFLOW 0x06 #define H2C_RESERVED 0x07 -u8 rtw_setassocsta_cmd(struct adapter *padapter, u8 *mac_addr); u8 rtw_setstandby_cmd(struct adapter *padapter, uint action); u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 23/48] staging: rtl8188eu: rtw_cmd.h: Remove unused macros
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_cmd.h | 15 --- 1 file changed, 15 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 1e3161e..0803742 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -24,16 +24,11 @@ #include #include -#define C2H_MEM_SZ (16*1024) - #include #include /* */ -#define FREE_CMDOBJ_SZ 128 - #define MAX_CMDSZ 1024 #define MAX_RSPSZ 512 -#define MAX_EVTSZ 1024 #define CMDBUFF_ALIGN_SZ 512 @@ -707,16 +702,11 @@ Result: */ -#define H2C_RSP_OFFSET 512 - #define H2C_SUCCESS0x00 #define H2C_SUCCESS_RSP0x01 -#define H2C_DUPLICATED 0x02 #define H2C_DROPPED0x03 #define H2C_PARAMETERS_ERROR 0x04 #define H2C_REJECTED 0x05 -#define H2C_CMD_OVERFLOW 0x06 -#define H2C_RESERVED 0x07 u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, int ssid_num, struct rtw_ieee80211_channel *ch, @@ -841,11 +831,6 @@ enum rtw_h2c_cmd { MAX_H2CCMD }; -#define _GetBBReg_CMD_ _Read_BBREG_CMD_ -#define _SetBBReg_CMD_ _Write_BBREG_CMD_ -#define _GetRFReg_CMD_ _Read_RFREG_CMD_ -#define _SetRFReg_CMD_ _Write_RFREG_CMD_ - #ifdef _RTW_CMD_C_ static struct _cmd_callbackrtw_cmd_callback[] = { {GEN_CMD_CODE(_Read_MACREG), NULL}, /*0*/ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 22/48] staging: rtl8188eu: rtw_cmd.h: Remove unused function declaration
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_cmd.h |6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index d356cf4..1e3161e 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -731,11 +731,6 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, u8 rtw_setopmode_cmd(struct adapter *padapter, enum ndis_802_11_network_infra networktype); u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset); -u8 rtw_setrfintfs_cmd(struct adapter *padapter, u8 mode); - -u8 rtw_gettssi_cmd(struct adapter *padapter, u8 offset, u8 *pval); -u8 rtw_setfwdig_cmd(struct adapter *padapter, u8 type); -u8 rtw_setfwra_cmd(struct adapter *padapter, u8 type); u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr); @@ -752,7 +747,6 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter); #endif u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue); - u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf); void rtw_survey_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 25/48] staging: rtl8188eu: Remove unused function rtw_cmd_clr_isr()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|6 -- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 -- 2 files changed, 8 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index ab3349f..651d809 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -205,12 +205,6 @@ struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv) return cmd_obj; } -void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv) -{ - pcmdpriv->cmd_done_cnt++; - /* up(&(pcmdpriv->cmd_done_sema)); */ -} - void rtw_free_cmd_obj(struct cmd_obj *pcmd) { diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index b8adc05..bfd7eaf 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -78,8 +78,6 @@ int rtw_cmd_thread(void *context); u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); -void rtw_cmd_clr_isr(struct cmd_priv *pcmdpriv); - enum rtw_drvextra_cmd_id { NONE_WK_CID, DYNAMIC_CHK_WK_CID, -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 29/48] staging: rtl8188eu: Remove wrapper function power_saving_wk_hdl()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 5a1ee87..b9c61e3 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -1191,11 +1191,6 @@ exit: return res; } -static void power_saving_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz) -{ -rtw_ps_processor(padapter); -} - u8 rtw_ps_cmd(struct adapter *padapter) { struct cmd_obj *ppscmd; @@ -1317,7 +1312,7 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) dynamic_chk_wk_hdl(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->type_size); break; case POWER_SAVING_CTRL_WK_CID: - power_saving_wk_hdl(padapter, pdrvextra_cmd->pbuf, pdrvextra_cmd->type_size); + rtw_ps_processor(padapter); break; case LPS_CTRL_WK_CID: lps_ctrl_wk_hdl(padapter, (u8)pdrvextra_cmd->type_size); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 27/48] staging: rtl8188eu: rtw_cmd.h: Remove struct Tx_Beacon_param
struct Tx_Beacon_param has only one member. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c| 12 ++-- drivers/staging/rtl8188eu/include/rtw_cmd.h |4 drivers/staging/rtl8188eu/include/rtw_mlme_ext.h |2 +- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 3bd3962..b4dd14e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -5416,7 +5416,7 @@ u8 add_ba_hdl(struct adapter *padapter, unsigned char *pbuf) u8 set_tx_beacon_cmd(struct adapter *padapter) { struct cmd_obj *ph2c; - struct Tx_Beacon_param *ptxBeacon_parm; + struct wlan_bssid_ex*ptxBeacon_parm; struct cmd_priv *pcmdpriv = &(padapter->cmdpriv); struct mlme_ext_priv*pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); @@ -5430,19 +5430,19 @@ u8 set_tx_beacon_cmd(struct adapter *padapter) goto exit; } - ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_KERNEL); + ptxBeacon_parm = kzalloc(sizeof(struct wlan_bssid_ex), GFP_KERNEL); if (ptxBeacon_parm == NULL) { kfree(ph2c); res = _FAIL; goto exit; } - memcpy(&(ptxBeacon_parm->network), &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex)); + memcpy(ptxBeacon_parm, &(pmlmeinfo->network), sizeof(struct wlan_bssid_ex)); - len_diff = update_hidden_ssid(ptxBeacon_parm->network.IEs+_BEACON_IE_OFFSET_, - ptxBeacon_parm->network.IELength-_BEACON_IE_OFFSET_, + len_diff = update_hidden_ssid(ptxBeacon_parm->IEs+_BEACON_IE_OFFSET_, + ptxBeacon_parm->IELength-_BEACON_IE_OFFSET_, pmlmeinfo->hidden_ssid_mode); - ptxBeacon_parm->network.IELength += len_diff; + ptxBeacon_parm->IELength += len_diff; init_h2fwcmd_w_parm_no_rsp(ph2c, ptxBeacon_parm, GEN_CMD_CODE(_TX_Beacon)); diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 6ff500c..d6b8724 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -353,10 +353,6 @@ struct getphy_parm { }; -struct Tx_Beacon_param { - struct wlan_bssid_ex network; -}; - /* Notes: This command is used for H2C/C2H loopback testing diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index 1fdd1f8..2a32caa 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h @@ -764,7 +764,7 @@ static struct cmd_hdl wlancmds[] = { GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) - GEN_MLME_EXT_HANDLER(sizeof(struct Tx_Beacon_param), + GEN_MLME_EXT_HANDLER(sizeof(struct wlan_bssid_ex), tx_beacon_hdl) /*55*/ GEN_MLME_EXT_HANDLER(0, mlme_evt_hdl) /*56*/ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 26/48] staging: rtl8188eu: rtw_cmd.h: Remove struct [join, create]bss_parm
These two structures have only one member. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c| 10 +- drivers/staging/rtl8188eu/include/rtw_cmd.h | 23 -- drivers/staging/rtl8188eu/include/rtw_mlme_ext.h |4 ++-- 3 files changed, 7 insertions(+), 30 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index c4888b1..3bd3962 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -4959,11 +4959,11 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf) struct mlme_ext_priv*pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network)); - struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; + struct wlan_bssid_ex *pparm = (struct wlan_bssid_ex *)pbuf; /* u32 initialgain; */ - if (pparm->network.InfrastructureMode == Ndis802_11APMode) { + if (pparm->InfrastructureMode == Ndis802_11APMode) { #ifdef CONFIG_88EU_AP_MODE if (pmlmeinfo->state == WIFI_FW_AP_STATE) { @@ -4974,7 +4974,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf) } /* below is for ad-hoc master */ - if (pparm->network.InfrastructureMode == Ndis802_11IBSS) { + if (pparm->InfrastructureMode == Ndis802_11IBSS) { rtw_joinbss_reset(padapter); pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_20; @@ -5023,7 +5023,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf) struct mlme_ext_priv*pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info*pmlmeinfo = &(pmlmeext->mlmext_info); struct wlan_bssid_ex *pnetwork = (struct wlan_bssid_ex *)(&(pmlmeinfo->network)); - struct joinbss_parm *pparm = (struct joinbss_parm *)pbuf; + struct wlan_bssid_ex *pparm = (struct wlan_bssid_ex *)pbuf; u32 i; /* check already connecting to AP or not */ @@ -5045,7 +5045,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf) rtw_hal_set_hwreg(padapter, HW_VAR_MLME_DISCONNECT, NULL); } - rtw_antenna_select_cmd(padapter, pparm->network.PhyInfo.Optimum_antenna, false); + rtw_antenna_select_cmd(padapter, pparm->PhyInfo.Optimum_antenna, false); rtw_joinbss_reset(padapter); diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index bfd7eaf..6ff500c 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -111,18 +111,6 @@ enum RFINTFS { }; /* -Caller Mode: Infra, Ad-Hoc - -Notes: To join the specified bss - -Command Event Mode - -*/ -struct joinbss_parm { - struct wlan_bssid_ex network; -}; - -/* Caller Mode: Infra, Ad-HoC(C) Notes: To disconnect the current associated BSS @@ -134,17 +122,6 @@ struct disconnect_parm { u32 deauth_timeout_ms; }; -/* -Caller Mode: AP, Ad-HoC(M) - -Notes: To create a BSS - -Command Mode -*/ -struct createbss_parm { - struct wlan_bssid_ex network; -}; - struct setopmode_parm { u8 mode; u8 rsvd[3]; diff --git a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h index 17c680f..1fdd1f8 100644 --- a/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h +++ b/drivers/staging/rtl8188eu/include/rtw_mlme_ext.h @@ -722,9 +722,9 @@ static struct cmd_hdl wlancmds[] = { GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) GEN_MLME_EXT_HANDLER(0, NULL) - GEN_MLME_EXT_HANDLER(sizeof (struct joinbss_parm), join_cmd_hdl) /*14*/ + GEN_MLME_EXT_HANDLER(sizeof (struct wlan_bssid_ex), join_cmd_hdl) /*14*/ GEN_MLME_EXT_HANDLER(sizeof (struct disconnect_parm), disconnect_hdl) - GEN_MLME_EXT_HANDLER(sizeof (struct createbss_parm), createbss_hdl) + GEN_MLME_EXT_HANDLER(sizeof (struct wlan_bssid_ex), createbss_hdl) GEN_MLME_EXT_HANDLER(sizeof (struct setopmode_parm), setopmode_hdl) GEN_MLME_EXT_HANDLER(sizeof (struct sitesurvey_parm), sitesurvey_cmd_hdl) /*18*/ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 28/48] staging: rtl8188eu: Remove header file cmd_osdep.h
cmd_osdep.h is not required. Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |1 - drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c |1 - drivers/staging/rtl8188eu/include/cmd_osdep.h | 31 - 3 files changed, 33 deletions(-) delete mode 100644 drivers/staging/rtl8188eu/include/cmd_osdep.h diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 651d809..5a1ee87 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 6ad3bd4..023a3d8 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include diff --git a/drivers/staging/rtl8188eu/include/cmd_osdep.h b/drivers/staging/rtl8188eu/include/cmd_osdep.h deleted file mode 100644 index 7a93e1d..000 --- a/drivers/staging/rtl8188eu/include/cmd_osdep.h +++ /dev/null @@ -1,31 +0,0 @@ -/** - * - * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA - * - * - **/ -#ifndef __CMD_OSDEP_H_ -#define __CMD_OSDEP_H_ - -#include -#include - -extern int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); -extern void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); -extern int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj); -extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue); - -#endif -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 24/48] staging: rtl8188eu: rtw_cmd.h: Remove unused structures
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/include/rtw_cmd.h | 216 --- 1 file changed, 216 deletions(-) diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 0803742..b8adc05 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -113,27 +113,6 @@ enum RFINTFS { }; /* -Caller Mode: Infra, Ad-HoC(C) - -Notes: To enter USB suspend mode - -Command Mode - -*/ -struct usb_suspend_parm { - u32 action;/* 1: sleep, 0:resume */ -}; - -/* -Caller Mode: Infra, Ad-HoC - -Notes: To join a known BSS. - -Command-Event Mode - -*/ - -/* Caller Mode: Infra, Ad-Hoc Notes: To join the specified bss @@ -321,10 +300,6 @@ struct getbasicrate_parm { u32 rsvd; }; -struct getbasicrate_rsp { - u8 basicrates[NumRates]; -}; - /* Caller Mode: Any @@ -376,11 +351,6 @@ struct getphyinfo_parm { u32 rsvd; }; -struct getphyinfo_rsp { - struct regulatory_class class_sets[NUM_REGULATORYS]; - u8 status; -}; - /* Caller Mode: Any @@ -407,45 +377,6 @@ struct getphy_parm { u32 rsvd; }; -struct getphy_rsp { - u8 rfchannel; - u8 modem; -}; - -struct readBB_parm { - u8 offset; -}; -struct readBB_rsp { - u8 value; -}; - -struct readTSSI_parm { - u8 offset; -}; -struct readTSSI_rsp { - u8 value; -}; - -struct writeBB_parm { - u8 offset; - u8 value; -}; - -struct readRF_parm { - u8 offset; -}; -struct readRF_rsp { - u32 value; -}; - -struct writeRF_parm { - u32 offset; - u32 value; -}; - -struct getrfintfs_parm { - u8 rfintfs; -}; struct Tx_Beacon_param { struct wlan_bssid_ex network; @@ -509,153 +440,6 @@ struct drvextra_cmd_parm { unsigned char *pbuf; }; -/*--- Below are used for RF/BB tunning -*/ - -struct setantenna_parm { - u8 tx_antset; - u8 rx_antset; - u8 tx_antenna; - u8 rx_antenna; -}; - -struct enrateadaptive_parm { - u32 en; -}; - -struct settxagctbl_parm { - u32 txagc[MAX_RATES_LENGTH]; -}; - -struct gettxagctbl_parm { - u32 rsvd; -}; -struct gettxagctbl_rsp { - u32 txagc[MAX_RATES_LENGTH]; -}; - -struct setagcctrl_parm { - u32 agcctrl;/* 0: pure hw, 1: fw */ -}; - -struct setssup_parm{ - u32 ss_ForceUp[MAX_RATES_LENGTH]; -}; - -struct getssup_parm{ - u32 rsvd; -}; - -struct getssup_rsp { - u8 ss_ForceUp[MAX_RATES_LENGTH]; -}; - -struct setssdlevel_parm{ - u8 ss_DLevel[MAX_RATES_LENGTH]; -}; - -struct getssdlevel_parm{ - u32 rsvd; -}; - -struct getssdlevel_rsp { - u8 ss_DLevel[MAX_RATES_LENGTH]; -}; - -struct setssulevel_parm{ - u8 ss_ULevel[MAX_RATES_LENGTH]; -}; - -struct getssulevel_parm{ - u32 rsvd; -}; - -struct getssulevel_rsp { - u8 ss_ULevel[MAX_RATES_LENGTH]; -}; - -struct setcountjudge_parm { - u8 count_judge[MAX_RATES_LENGTH]; -}; - -struct getcountjudge_parm { - u32 rsvd; -}; - -struct getcountjudge_rsp { - u8 count_judge[MAX_RATES_LENGTH]; -}; - -struct getratable_parm { - uint rsvd; -}; - -/* to get TX,RX retry count */ - -struct gettxretrycnt_parm { - unsigned int rsvd; -}; - -struct gettxretrycnt_rsp { - unsigned long tx_retrycnt; -}; - -struct getrxretrycnt_parm { - unsigned int rsvd; -}; - -struct getrxretrycnt_rsp { - unsigned long rx_retrycnt; -}; - -/* to get BCNOK,BCNERR count */ -struct getbcnokcnt_parm { - unsigned int rsvd; -}; - -struct getbcnokcnt_rsp { - unsigned long bcnokcnt; -}; - -struct getbcnerrcnt_parm { - unsigned int rsvd; -}; - -struct getbcnerrcnt_rsp { - unsigned long bcnerrcnt; -}; - -/* to get current TX power level */ -struct getcurtxpwrlevel_parm { - unsigned int rsvd; -}; -struct getcurtxpwrlevel_rspi { - unsigned short tx_power; -}; - -struct setprobereqextraie_parm { - unsigned char e_id; - unsigned char ie_len; - unsigned char ie[0]; -}; - -struct setassocreqextraie_parm { - unsigned char e_id; - unsigned char ie_len; - unsigned char ie[0]; -}; - -struct setproberspextraie_parm { - unsigned char e_id; - unsigned char ie_len; - unsigned char ie[0]; -}; - -struct setassocrspextraie_parm { - unsigned char e_id; - unsigned char ie_len; - unsigned char ie[0]; -}; - struct addBaReq_parm { unsigned int tid; u8 addr[ETH_ALEN]; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 34/48] staging: rtl8188eu: Remove unused member cmd_issued_cnt from struct cmd_priv
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|3 --- drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 4 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index ef5f507..4696713 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -64,7 +64,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((size_t)(pcmdpriv->rsp_allocated_buf) & 3); - pcmdpriv->cmd_issued_cnt = 0; pcmdpriv->cmd_done_cnt = 0; exit: return res; @@ -246,8 +245,6 @@ _next: goto post_process; } - pcmdpriv->cmd_issued_cnt++; - pcmd->cmdsz = round_up(pcmd->cmdsz, 4); memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz); diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index 60f953b..b4ee2c8 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -52,7 +52,6 @@ struct cmd_priv { u8 *cmd_allocated_buf; u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */ u8 *rsp_allocated_buf; - u32 cmd_issued_cnt; u32 cmd_done_cnt; u8 cmdthd_running; struct adapter *padapter; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 32/48] staging: rtl8188eu: Rename _rtw_dequeue_cmd() to rtw_dequeue_cmd()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c| 16 +++- drivers/staging/rtl8188eu/include/rtw_cmd.h |2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 81f4b94..1e6e52e 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -110,7 +110,7 @@ exit: return _SUCCESS; } -struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) +struct cmd_obj * rtw_dequeue_cmd(struct __queue *queue) { unsigned long irqL; struct cmd_obj *obj; @@ -181,16 +181,6 @@ exit: return res; } -struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv) -{ - struct cmd_obj *cmd_obj; - - - cmd_obj = _rtw_dequeue_cmd(&pcmdpriv->cmd_queue); - - return cmd_obj; -} - void rtw_free_cmd_obj(struct cmd_obj *pcmd) { @@ -248,7 +238,7 @@ _next: break; } - pcmd = rtw_dequeue_cmd(pcmdpriv); + pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue); if (!pcmd) continue; @@ -304,7 +294,7 @@ post_process: /* free all cmd_obj resources */ do { - pcmd = rtw_dequeue_cmd(pcmdpriv); + pcmd = rtw_dequeue_cmd(&pcmdpriv->cmd_queue); if (pcmd == NULL) break; diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index cc75c7d..b3529da 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -70,7 +70,7 @@ do {\ } while (0) u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *obj); -struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv); +struct cmd_obj *rtw_dequeue_cmd(struct __queue *queue); void rtw_free_cmd_obj(struct cmd_obj *pcmd); int rtw_cmd_thread(void *context); -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 31/48] staging: rtl8188eu: Rename _rtw_free_cmd_priv() to rtw_free_cmd_priv()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c |8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index e26a582..81f4b94 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -71,7 +71,7 @@ exit: return res; } -void _rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) +void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { if (pcmdpriv) { @@ -130,12 +130,6 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) return obj; } -void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) -{ - RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("rtw_free_cmd_priv\n")); - _rtw_free_cmd_priv(pcmdpriv); -} - static int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj) { u8 bAllow = false; /* set to true to allow enqueuing cmd when hw_init_completed is false */ -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 33/48] staging: rtl8188eu: Remove unused member rsp_cnt from struct cmd_priv
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|1 - drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 1e6e52e..ef5f507 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -66,7 +66,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) pcmdpriv->cmd_issued_cnt = 0; pcmdpriv->cmd_done_cnt = 0; - pcmdpriv->rsp_cnt = 0; exit: return res; } diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index b3529da..60f953b 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -54,7 +54,6 @@ struct cmd_priv { u8 *rsp_allocated_buf; u32 cmd_issued_cnt; u32 cmd_done_cnt; - u32 rsp_cnt; u8 cmdthd_running; struct adapter *padapter; }; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 30/48] staging: rtl8188eu: Rename _rtw_init_cmd_priv() to rtw_init_cmd_priv()
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|9 + drivers/staging/rtl8188eu/include/rtw_cmd.h |2 +- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index b9c61e3..e26a582 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -30,7 +30,7 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock. No irqsave is necessary. */ -int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) +int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) { int res = _SUCCESS; @@ -130,13 +130,6 @@ struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue) return obj; } -u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) -{ - u32 res; - res = _rtw_init_cmd_priv(pcmdpriv); - return res; -} - void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv) { RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("rtw_free_cmd_priv\n")); diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index d6b8724..cc75c7d 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -75,7 +75,7 @@ void rtw_free_cmd_obj(struct cmd_obj *pcmd); int rtw_cmd_thread(void *context); -u32 rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); +int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv); void rtw_free_cmd_priv(struct cmd_priv *pcmdpriv); enum rtw_drvextra_cmd_id { -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 35/48] staging: rtl8188eu: Remove unused member cmd_done_cnt from struct cmd_priv
Signed-off-by: navin patidar --- drivers/staging/rtl8188eu/core/rtw_cmd.c|1 - drivers/staging/rtl8188eu/include/rtw_cmd.h |1 - 2 files changed, 2 deletions(-) diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c index 4696713..4c1abdd 100644 --- a/drivers/staging/rtl8188eu/core/rtw_cmd.c +++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c @@ -64,7 +64,6 @@ int rtw_init_cmd_priv(struct cmd_priv *pcmdpriv) pcmdpriv->rsp_buf = pcmdpriv->rsp_allocated_buf + 4 - ((size_t)(pcmdpriv->rsp_allocated_buf) & 3); - pcmdpriv->cmd_done_cnt = 0; exit: return res; } diff --git a/drivers/staging/rtl8188eu/include/rtw_cmd.h b/drivers/staging/rtl8188eu/include/rtw_cmd.h index b4ee2c8..ca69511 100644 --- a/drivers/staging/rtl8188eu/include/rtw_cmd.h +++ b/drivers/staging/rtl8188eu/include/rtw_cmd.h @@ -52,7 +52,6 @@ struct cmd_priv { u8 *cmd_allocated_buf; u8 *rsp_buf; /* shall be non-paged, and 4 bytes aligned */ u8 *rsp_allocated_buf; - u32 cmd_done_cnt; u8 cmdthd_running; struct adapter *padapter; }; -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel