From patchwork Wed Sep 30 02:59:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glen Lee X-Patchwork-Id: 7292361 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E2F7EBEEA4 for ; Wed, 30 Sep 2015 02:57:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 837B12069B for ; Wed, 30 Sep 2015 02:57:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EFBB120693 for ; Wed, 30 Sep 2015 02:57:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752877AbbI3C5A (ORCPT ); Tue, 29 Sep 2015 22:57:00 -0400 Received: from eusmtp01.atmel.com ([212.144.249.243]:33790 "EHLO eusmtp01.atmel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752561AbbI3C46 (ORCPT ); Tue, 29 Sep 2015 22:56:58 -0400 Received: from glen-ubuntu.corp.atmel.com (10.161.101.13) by eusmtp01.atmel.com (10.161.101.31) with Microsoft SMTP Server id 14.3.235.1; Wed, 30 Sep 2015 04:56:51 +0200 From: Glen Lee To: CC: , , , , , , , , , , , Subject: [PATCH RESEND 1/2] staging: wilc1000: remove define WILC_PARSE_SCAN_IN_HOST Date: Wed, 30 Sep 2015 11:59:23 +0900 Message-ID: <1443581964-31505-1-git-send-email-glen.lee@atmel.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The define WILC_PARSE_SCAN_IN_HOST is always used in the driver, so just delete ifdef WILC_PARSE_SCAN_IN_HOST line, ifndef WILC_PARSE_SCAN_IN_HOST line and it's related codes. Finally, remove define in Makefile. Signed-off-by: Glen Lee --- drivers/staging/wilc1000/Makefile | 1 - drivers/staging/wilc1000/host_interface.c | 62 ------------------------------- drivers/staging/wilc1000/wilc_wlan_if.h | 3 +- 3 files changed, 1 insertion(+), 65 deletions(-) diff --git a/drivers/staging/wilc1000/Makefile b/drivers/staging/wilc1000/Makefile index afae7d6..ac15e5a 100644 --- a/drivers/staging/wilc1000/Makefile +++ b/drivers/staging/wilc1000/Makefile @@ -10,7 +10,6 @@ ccflags-y += -DSTA_FIRMWARE=\"atmel/wilc1000_fw.bin\" \ ccflags-y += -I$(src)/ -D__CHECK_ENDIAN__ -DWILC_ASIC_A0 \ -DPLL_WORKAROUND -DCONNECT_DIRECT -DAGING_ALG \ - -DWILC_PARSE_SCAN_IN_HOST \ -Wno-unused-function -DWILC_DEBUGFS #ccflags-y += -DTCP_ACK_FILTER diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 99de804..ab16bf6 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -463,7 +463,6 @@ typedef struct _tstrWidJoinReqExt { } tstrWidJoinReqExt; #endif -#ifdef WILC_PARSE_SCAN_IN_HOST /*Struct containg joinParam of each AP*/ typedef struct _tstrJoinBssParam { BSSTYPE_T bss_type; @@ -500,7 +499,6 @@ typedef struct _tstrBssTable { tstrJoinBssParam *head; tstrJoinBssParam *tail; } tstrBssTable; -#endif /*WILC_PARSE_SCAN_IN_HOST*/ typedef enum { SCAN_TIMER = 0, @@ -560,9 +558,7 @@ tstrWILC_WFIDrv *gu8FlushedJoinReqDrvHandler; #define FLUSHED_JOIN_REQ 1 #define FLUSHED_BYTE_POS 79 /* Position the byte indicating flushing in the flushed request */ -#ifdef WILC_PARSE_SCAN_IN_HOST static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo); -#endif /*WILC_PARSE_SCAN_IN_HOST*/ extern void chip_sleep_manually(u32 u32SleepTime); extern int linux_wlan_get_num_conn_ifcs(void); @@ -1517,10 +1513,7 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, wid_site_survey_reslts_s *pstrSurveyResults = NULL; #else u8 *pu8CurrByte = NULL; - #ifdef WILC_PARSE_SCAN_IN_HOST tstrJoinBssParam *ptstrJoinBssParam; - #endif /*WILC_PARSE_SCAN_IN_HOST*/ - #endif PRINT_D(GENERIC_DBG, "Handling connect request\n"); @@ -1692,14 +1685,12 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, PRINT_INFO(HOSTINF_DBG, "Saving connection parameters in global structure\n"); - #ifdef WILC_PARSE_SCAN_IN_HOST ptstrJoinBssParam = (tstrJoinBssParam *)pstrHostIFconnectAttr->pJoinParams; if (ptstrJoinBssParam == NULL) { PRINT_ER("Required BSSID not found\n"); s32Error = -ENOENT; goto ERRORHANDLER; } - #endif /*WILC_PARSE_SCAN_IN_HOST*/ if (pstrHostIFconnectAttr->pu8bssid != NULL) { pstrWFIDrv->strWILC_UsrConnReq.pu8bssid = kmalloc(6, GFP_KERNEL); @@ -1795,40 +1786,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, PRINT_D(HOSTINF_DBG, "Connecting to network of SSID %s on channel %d\n", pstrWFIDrv->strWILC_UsrConnReq.pu8ssid, pstrHostIFconnectAttr->u8channel); - -#ifndef WILC_PARSE_SCAN_IN_HOST - strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; - strWIDList[u32WidsCount].enuWIDtype = WID_STR; - strWIDList[u32WidsCount].s32ValueSize = MAX_SSID_LEN + 7; - strWIDList[u32WidsCount].ps8WidVal = kmalloc(strWIDList[u32WidsCount].s32ValueSize, GFP_KERNEL); - - if (strWIDList[u32WidsCount].ps8WidVal == NULL) { - s32Error = -EFAULT; - goto ERRORHANDLER; - } - - pu8CurrByte = strWIDList[u32WidsCount].ps8WidVal; - - if (pstrHostIFconnectAttr->pu8ssid != NULL) { - memcpy(pu8CurrByte, pstrHostIFconnectAttr->pu8ssid, pstrHostIFconnectAttr->ssidLen); - pu8CurrByte[pstrHostIFconnectAttr->ssidLen] = '\0'; - } - pu8CurrByte += MAX_SSID_LEN; - if ((pstrHostIFconnectAttr->u8channel >= 1) && (pstrHostIFconnectAttr->u8channel <= 14)) { - *(pu8CurrByte++) = pstrHostIFconnectAttr->u8channel; - } else { - PRINT_ER("Channel out of range\n"); - *(pu8CurrByte++) = 0xFF; - } - if (pstrHostIFconnectAttr->pu8bssid != NULL) - memcpy(pu8CurrByte, pstrHostIFconnectAttr->pu8bssid, 6); - pu8CurrByte += 6; - - /* keep the buffer at the start of the allocated pointer to use it with the free*/ - pu8CurrByte = strWIDList[u32WidsCount].ps8WidVal; - - #else - strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; @@ -1958,9 +1915,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, /* keep the buffer at the start of the allocated pointer to use it with the free*/ pu8CurrByte = strWIDList[u32WidsCount].ps8WidVal; - - - #endif /* #ifdef WILC_PARSE_SCAN_IN_HOST*/ u32WidsCount++; /* A temporary workaround to avoid handling the misleading MAC_DISCONNECTED raised from the @@ -2100,8 +2054,6 @@ static s32 Handle_FlushConnect(tstrWILC_WFIDrv *drvHandler) strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&gu8FlushedAuthType); u32WidsCount++; - - #ifdef WILC_PARSE_SCAN_IN_HOST strWIDList[u32WidsCount].u16WIDid = (u16)WID_JOIN_REQ_EXTENDED; strWIDList[u32WidsCount].enuWIDtype = WID_STR; strWIDList[u32WidsCount].s32ValueSize = gu32FlushedJoinReqSize; @@ -2113,8 +2065,6 @@ static s32 Handle_FlushConnect(tstrWILC_WFIDrv *drvHandler) u32WidsCount++; - #endif - s32Error = send_config_pkt(SET_CFG, strWIDList, u32WidsCount, false, get_id_from_handler(gu8FlushedJoinReqDrvHandler)); if (s32Error) { @@ -2314,9 +2264,7 @@ static s32 Handle_RcvdNtwrkInfo(tstrWILC_WFIDrv *drvHandler, pstrNetworkInfo->bNewNetwork = true; /* add new BSS to JoinBssTable */ - #ifdef WILC_PARSE_SCAN_IN_HOST pJoinParams = host_int_ParseJoinBssParam(pstrNetworkInfo); - #endif /*WILC_PARSE_SCAN_IN_HOST*/ pstrWFIDrv->strWILC_UsrScanReq.pfUserScanResult(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, pstrWFIDrv->strWILC_UsrScanReq.u32UserScanPvoid, @@ -2530,12 +2478,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler, mod_timer(&hDuringIpTimer, jiffies + msecs_to_jiffies(10000)); - #ifdef WILC_PARSE_SCAN_IN_HOST /* open a BA session if possible */ /* if(pstrWFIDrv->strWILC_UsrConnReq.IsHTCapable) */ - - #endif - /* host_int_addBASession(pstrWFIDrv->strWILC_UsrConnReq.pu8bssid,0, */ /* BA_SESSION_DEFAULT_BUFFER_SIZE,BA_SESSION_DEFAULT_TIMEOUT); */ } else { @@ -7219,10 +7163,6 @@ s32 host_int_setup_multicast_filter(tstrWILC_WFIDrv *hWFIDrv, bool bIsEnabled, u return s32Error; } - - -#ifdef WILC_PARSE_SCAN_IN_HOST - /** * @brief host_int_ParseJoinBssParam * @details Parse Needed Join Parameters and save it in a new JoinBssParam entry @@ -7440,8 +7380,6 @@ void host_int_freeJoinParams(void *pJoinParams) else PRINT_ER("Unable to FREE null pointer\n"); } -#endif /*WILC_PARSE_SCAN_IN_HOST*/ - /** * @brief host_int_addBASession diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 2d6e0ce..19a23d3 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -147,7 +147,6 @@ typedef struct { #define INFINITE_SLEEP_TIME ((u32)0xFFFFFFFF) -#ifdef WILC_PARSE_SCAN_IN_HOST typedef enum { SUPP_RATES_IE = 1, EXT_SUPP_RATES_IE = 50, @@ -157,7 +156,7 @@ typedef enum { WMM_IE = 221, P2P_IE = 221, } BEACON_IE; -#endif + typedef enum { INFRASTRUCTURE = 0, INDEPENDENT,