staging: wilc1000: wilc_wlan.c: use BIT(x) macro
PATCH 1/10 staging: wilc1000: wilc_wlan.c: use BIT(x) macro
Remove bit shift macro that is custom defined, then replace BIT(x) macro.
--- drivers/staging/wilc1000/wilc_wlan.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wlan.c +2 -3
@@ -2177,7 +2177,6 @@ _fail_: } -#define BIT31 (1 << 31)u16 Set_machw_change_vir_if (bool bValue) {u16 ret;
@@ -2191,9 +2190,9 @@ u16 Set_machw_change_vir_if(bool bValue) }if (bValue) - reg |= (BIT31 ); + reg |=BIT (31 );else - reg &= ~(BIT31 ); + reg &= ~BIT (31 ); ret = (&g_wlan)->hif_func.hif_write_reg (WILC_CHANGING_VIR_IF , reg);
Signature · 1 line
2.5.1
PATCH 2/10 staging: wilc1000: replace INLINE with static inline
INLINE macro is defined as static __inline so that it is replaced by static inline.
--- drivers/staging/wilc1000/coreconfigurator.c | 30 ++++++++++++++--------------- drivers/staging/wilc1000/wilc_wlan.c | 16 +++++++-------- 2 files changed, 23 insertions(+), 23 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +15 -15
@@ -301,7 +301,7 @@ u16 g_num_total_switches = (sizeof(gastrWIDs) / sizeof(tstrWID));/* This function extracts the beacon period field from the beacon or probe */ /* response frame. */ -INLINE u16 get_beacon_period(u8 *data) +static inline u16 get_beacon_period (u8 *data) {u16 bcn_per =0 ;
@@ -311,7 +311,7 @@ INLINE u16 get_beacon_period(u8 *data)return bcn_per; } -INLINE u32 get_beacon_timestamp_lo(u8 *data) +static inline u32 get_beacon_timestamp_lo (u8 *data) {u32 time_stamp =0 ;u32 index =MAC_HDR_LEN ;
@@ -324,7 +324,7 @@ INLINE u32 get_beacon_timestamp_lo(u8 *data)return time_stamp; } -INLINE u32 get_beacon_timestamp_hi(u8 *data) +static inline u32 get_beacon_timestamp_hi (u8 *data) {u32 time_stamp =0 ;u32 index = (MAC_HDR_LEN +4 );
@@ -340,7 +340,7 @@ INLINE u32 get_beacon_timestamp_hi(u8 *data)/* This function extracts the 'frame type and sub type' bits from the MAC */ /* header of the input frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE tenuFrmSubtype get_sub_type(u8 *header) +static inline tenuFrmSubtype get_sub_type (u8 *header) {return ((tenuFrmSubtype)(header[0 ] &0xFC )); }
@@ -348,7 +348,7 @@ INLINE tenuFrmSubtype get_sub_type(u8 *header)/* This function extracts the 'to ds' bit from the MAC header of the input */ /* frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE u8 get_to_ds(u8 *header) +static inline u8 get_to_ds (u8 *header) {return (header[1 ] &0x01 ); }
@@ -356,28 +356,28 @@ INLINE u8 get_to_ds(u8 *header)/* This function extracts the 'from ds' bit from the MAC header of the input */ /* frame. */ /* Returns the value in the LSB of the returned value. */ -INLINE u8 get_from_ds(u8 *header) +static inline u8 get_from_ds (u8 *header) {return ((header[1 ] &0x02 ) >>1 ); }/* This function extracts the MAC Address in 'address1' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address1(u8 *pu8msa, u8 *addr) +static inline void get_address1 (u8 *pu8msa,u8 *addr) {memcpy (addr, pu8msa +4 ,6 ); }/* This function extracts the MAC Address in 'address2' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address2(u8 *pu8msa, u8 *addr) +static inline void get_address2 (u8 *pu8msa,u8 *addr) {memcpy (addr, pu8msa +10 ,6 ); }/* This function extracts the MAC Address in 'address3' field of the MAC */ /* header and updates the MAC Address in the allocated 'addr' variable. */ -INLINE void get_address3(u8 *pu8msa, u8 *addr) +static inline void get_address3 (u8 *pu8msa,u8 *addr) {memcpy (addr, pu8msa +16 ,6 ); }
@@ -385,7 +385,7 @@ INLINE void get_address3(u8 *pu8msa, u8 *addr)/* This function extracts the BSSID from the incoming WLAN packet based on */ /* the 'from ds' bit, and updates the MAC Address in the allocated 'addr' */ /* variable. */ -INLINE void get_BSSID(u8 *data, u8 *bssid) +static inline void get_BSSID (u8 *data,u8 *bssid) {if (get_from_ds (data) ==1 )get_address2 (data, bssid);
@@ -396,7 +396,7 @@ INLINE void get_BSSID(u8 *data, u8 *bssid) }/* This function extracts the SSID from a beacon/probe response frame */ -INLINE void get_ssid(u8 *data, u8 *ssid, u8 *p_ssid_len) +static inline void get_ssid (u8 *data,u8 *ssid,u8 *p_ssid_len) {u8 len =0 ;u8 i =0 ;
@@ -422,7 +422,7 @@ INLINE void get_ssid(u8 *data, u8 *ssid, u8 *p_ssid_len)/* This function extracts the capability info field from the beacon or probe */ /* response frame. */ -INLINE u16 get_cap_info(u8 *data) +static inline u16 get_cap_info (u8 *data) {u16 cap_info =0 ;u16 index =MAC_HDR_LEN ;
@@ -443,7 +443,7 @@ INLINE u16 get_cap_info(u8 *data)/* This function extracts the capability info field from the Association */ /* response frame. */ -INLINE u16 get_assoc_resp_cap_info(u8 *data) +static inline u16 get_assoc_resp_cap_info (u8 *data) {u16 cap_info =0 ;
@@ -455,7 +455,7 @@ INLINE u16 get_assoc_resp_cap_info(u8 *data)/* This funcion extracts the association status code from the incoming */ /* association response frame and returns association status code */ -INLINE u16 get_asoc_status(u8 *data) +static inline u16 get_asoc_status (u8 *data) {u16 asoc_status =0 ;
@@ -467,7 +467,7 @@ INLINE u16 get_asoc_status(u8 *data)/* This function extracts association ID from the incoming association */ /* response frame */ -INLINE u16 get_asoc_id(u8 *data) +static inline u16 get_asoc_id (u8 *data) {u16 asoc_id =0 ;
drivers/staging/wilc1000/wilc_wlan.c +8 -8
@@ -98,8 +98,8 @@ typedef struct {static wilc_wlan_dev_t g_wlan; -INLINE void chip_allow_sleep(void); -INLINE void chip_wakeup(void); +static inline void chip_allow_sleep (void ); +static inline void chip_wakeup (void );/******************************************** * * Debug
@@ -126,10 +126,10 @@ static void wilc_debug(u32 flag, char *fmt, ...)static CHIP_PS_STATE_T genuChipPSstate =CHIP_WAKEDUP ;/*BugID_5213*/ -/*acquire_bus() and release_bus() are made INLINE functions*/ +/*acquire_bus() and release_bus() are made static inline functions*/ /*as a temporary workaround to fix a problem of receiving*/ /*unknown interrupt from FW*/ -INLINE void acquire_bus(BUS_ACQUIRE_T acquire) +static inline void acquire_bus (BUS_ACQUIRE_T acquire) {mutex_lock (g_wlan.hif_lock);
@@ -142,7 +142,7 @@ INLINE void acquire_bus(BUS_ACQUIRE_T acquire) } } -INLINE void release_bus(BUS_RELEASE_T release) +static inline void release_bus (BUS_RELEASE_T release) {#ifdef WILC_OPTIMIZE_SLEEP_INT if (release ==RELEASE_ALLOW_SLEEP )
@@ -678,7 +678,7 @@ static struct rxq_entry_t *wilc_wlan_rxq_remove(void)#ifdef WILC_OPTIMIZE_SLEEP_INT -INLINE void chip_allow_sleep(void) +static inline void chip_allow_sleep (void ) {u32 reg =0 ;
@@ -688,7 +688,7 @@ INLINE void chip_allow_sleep(void) g_wlan.hif_func.hif_write_reg (0xf0 , reg & ~(1 <<0 )); } -INLINE void chip_wakeup(void) +static inline void chip_wakeup (void ) {u32 reg, clk_status_reg, trials =0 ;u32 sleep_time;
@@ -767,7 +767,7 @@ INLINE void chip_wakeup(void) genuChipPSstate = CHIP_WAKEDUP; }#else -INLINE void chip_wakeup(void) +static inline void chip_wakeup (void ) {u32 reg, trials =0 ;
Signature · 1 line
2.5.1
PATCH 3/10 staging: wilc1000: remove INLINE macro
In reply to Chaehyun LimThis patch removes INLINE macro that is used anymore.
--- drivers/staging/wilc1000/coreconfigurator.c | 1 - drivers/staging/wilc1000/wilc_wlan.c | 1 - 2 files changed, 2 deletions(-)
drivers/staging/wilc1000/coreconfigurator.c +0 -1
@@ -16,7 +16,6 @@/*****************************************************************************/ /* Constants */ /*****************************************************************************/ -#define INLINE static __inline#define PHY_802_11n#define MAX_CFG_PKTLEN 1450#define MSG_HEADER_LEN 4
drivers/staging/wilc1000/wilc_wlan.c +0 -1
@@ -9,7 +9,6 @@#include "wilc_wlan_if.h" #include "wilc_wlan.h" -#define INLINE static __inline/******************************************** *
Signature · 1 line
2.5.1
Greg KH
maintainerRe: [PATCH 03/10] staging: wilc1000: remove INLINE macro
Quoted 7 lines · Chaehyun Lim
This patch removes INLINE macro that is used anymore.
Signed-off-by Chaehyun Lim <[email protected]>--- drivers/staging/wilc1000/coreconfigurator.c | 1 - drivers/staging/wilc1000/wilc_wlan.c | 1 - 2 files changed, 2 deletions(-)
This doesn't apply to my tree anymore, can you refresh it and resend this and the rest of this series?
thanks,
greg k-h
PATCH 4/10 staging: wilc1000: replace __inline with inline
In reply to Chaehyun LimThis patch replaces __inline with inline. plain inline is more preferred than __inline.
--- drivers/staging/wilc1000/wilc_wlan.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_wlan.c +6 -6
@@ -317,13 +317,13 @@ u32 Pending_Acks; -static __inlineint Init_TCP_tracking (void ) +static inline int Init_TCP_tracking (void ) {return 0 ; } -static __inlineint add_TCP_track_session (u32 src_prt,u32 dst_prt,u32 seq) +static inline int add_TCP_track_session (u32 src_prt,u32 dst_prt,u32 seq) { Acks_keep_track_info[Opened_TCP_session].Ack_seq_num = seq; Acks_keep_track_info[Opened_TCP_session].Bigger_Ack_num =0 ;
@@ -335,7 +335,7 @@ static __inline int add_TCP_track_session(u32 src_prt, u32 dst_prt, u32 seq)return 0 ; } -static __inlineint Update_TCP_track_session (u32 index,u32 Ack) +static inline int Update_TCP_track_session (u32 index,u32 Ack) {if (Ack > Acks_keep_track_info[index].Bigger_Ack_num) {
@@ -344,7 +344,7 @@ static __inline int Update_TCP_track_session(u32 index, u32 Ack)return 0 ; } -static __inlineint add_TCP_Pending_Ack (u32 Ack,u32 Session_index,struct txq_entry_t *txqe) +static inline int add_TCP_Pending_Ack (u32 Ack,u32 Session_index,struct txq_entry_t *txqe) { Statisitcs_totalAcks++;if (Pending_Acks <MAX_PENDING_ACKS ) {
@@ -359,7 +359,7 @@ static __inline int add_TCP_Pending_Ack(u32 Ack, u32 Session_index, struct txq_e }return 0 ; } -static __inlineint remove_TCP_related (void ) +static inline int remove_TCP_related (void ) {wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;unsigned long flags;
@@ -370,7 +370,7 @@ static __inline int remove_TCP_related(void)return 0 ; } -static __inlineint tcp_process (struct txq_entry_t *tqe) +static inline int tcp_process (struct txq_entry_t *tqe) {int ret;u8 *eth_hdr_ptr;
Signature · 1 line
2.5.1
PATCH 5/10 staging: wilc1000: replace int8_t with int
In reply to Chaehyun LimThis patch replaces int8_t with int. just use return type as int.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -3
@@ -275,9 +275,9 @@ static void clear_duringIP(unsigned long arg) }#endif -int8_t is_network_in_shadow (tstrNetworkInfo *pstrNetworkInfo,void *pUserVoid) +int is_network_in_shadow (tstrNetworkInfo *pstrNetworkInfo,void *pUserVoid) { -int8_t state =-1 ; +int state =-1 ;int i;if (u32LastScannedNtwrksCountShadow ==0 ) {
@@ -300,7 +300,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)void add_network_to_shadow (tstrNetworkInfo *pstrNetworkInfo,void *pUserVoid,void *pJoinParams) { -int8_t ap_found =is_network_in_shadow (pstrNetworkInfo, pUserVoid); +int ap_found =is_network_in_shadow (pstrNetworkInfo, pUserVoid);u32 ap_index =0 ;u8 rssi_index =0 ;
Signature · 1 line
2.5.1
PATCH 6/10 staging: wilc1000: linux_wlan_spi.c: fix kzalloc error check
In reply to Chaehyun LimThis patch fixs error check of kzalloc.
If kzalloc is failed, return type is used as -ENOMEM.
--- drivers/staging/wilc1000/linux_wlan_spi.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)
drivers/staging/wilc1000/linux_wlan_spi.c +8 -14
@@ -125,10 +125,8 @@ int linux_spi_write(u8 *b, u32 len)int remainder = len %TXRX_PHASE_SIZE ;char *r_buffer =kzalloc (TXRX_PHASE_SIZE ,GFP_KERNEL ); - -if (!r_buffer) { -PRINT_ER ("Failed to allocate memory for r_buffer\n" ); - } +if (!r_buffer) +return -ENOMEM ;if (blk) {while (i < blk) {
@@ -208,10 +206,9 @@ int linux_spi_write(u8 *b, u32 len) .delay_usecs = 0, };char *r_buffer =kzalloc (len,GFP_KERNEL ); +if (!r_buffer) +return -ENOMEM ; -if (!r_buffer) { -PRINT_ER ("Failed to allocate memory for r_buffer\n" ); - } tr.rx_buf = r_buffer;PRINT_D (BUS_DBG ,"Request writing %d bytes\n" , len);
@@ -257,10 +254,8 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen)int remainder = rlen %TXRX_PHASE_SIZE ;char *t_buffer =kzalloc (TXRX_PHASE_SIZE ,GFP_KERNEL ); - -if (!t_buffer) { -PRINT_ER ("Failed to allocate memory for t_buffer\n" ); - } +if (!t_buffer) +return -ENOMEM ;if (blk) {while (i < blk) {
@@ -337,10 +332,9 @@ int linux_spi_read(unsigned char *rb, unsigned long rlen) };char *t_buffer =kzalloc (rlen,GFP_KERNEL ); +if (!t_buffer) +return -ENOMEM ; -if (!t_buffer) { -PRINT_ER ("Failed to allocate memory for t_buffer\n" ); - } tr.tx_buf = t_buffer;memset (&msg,0 ,sizeof (msg));
Signature · 1 line
2.5.1
PATCH 7/10 staging: wilc1000: remove unused defines
In reply to Chaehyun LimThis patch removes unused defines.
--- drivers/staging/wilc1000/wilc_platform.h | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/wilc1000/wilc_platform.h +0 -4
@@ -41,8 +41,4 @@ typedef time_t WILC_Time;* others ********************************************************************/ -/* Generic printf function */ -#define __WILC_FILE__ __FILE__ -#define __WILC_FUNCTION__ __func__ -#define __WILC_LINE__ __LINE__#endif
Signature · 1 line
2.5.1
PATCH 8/10 staging: wilc1000: remove WILC_TIME typedef
In reply to Chaehyun LimThis patch removes WILC_TIME typedef that is not used anymore.
--- drivers/staging/wilc1000/wilc_platform.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/wilc_platform.h +0 -2
@@ -33,8 +33,6 @@ typedef struct __MessageQueue_struct { -/*Time represented in 64 bit format*/ -typedef time_t WILC_Time ;/*******************************************************************
Signature · 1 line
2.5.1
PATCH 9/10 staging: wilc1000: remove useless comment
In reply to Chaehyun LimThis patch removes useless comment that is included "BugID_xxxx"
--- drivers/staging/wilc1000/host_interface.c | 36 ------------------- drivers/staging/wilc1000/host_interface.h | 4 --- drivers/staging/wilc1000/linux_wlan.c | 8 ----- drivers/staging/wilc1000/linux_wlan_common.h | 1 - drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 42 ----------------------- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - drivers/staging/wilc1000/wilc_wlan.c | 26 ++------------ drivers/staging/wilc1000/wilc_wlan.h | 1 - drivers/staging/wilc1000/wilc_wlan_if.h | 9 ----- 9 files changed, 2 insertions(+), 126 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -36
@@ -7,7 +7,6 @@ extern u8 connecting;extern struct timer_list hDuringIpTimer;#endif -/*BugID_5137*/ extern u8 g_wilc_initialized;/*****************************************************************************/ /* Macros */
@@ -173,7 +172,6 @@ typedef struct _tstrHostIFscanAttr {size_t IEsLen;tWILCpfScanResult pfScanResult;void *pvUserArg; -/*BugID_4189*/ tstrHiddenNetwork strHiddenNetwork; } tstrHostIFscanAttr;
@@ -569,7 +567,6 @@ static u8 gu8DelBcn;#endif static u32 gu32WidConnRstHack; -/*BugID_5137*/ u8 *gu8FlushedJoinReq;u8 *gu8FlushedInfoElemAsoc;u8 gu8Flushed11iMode;
@@ -920,7 +917,6 @@ static s32 Handle_SetMacAddress(tstrWILC_WFIDrv *drvHandler, tstrHostIfSetMacAdd } -/*BugID_5213*/ /** * @brief Handle_GetMacAddress * @details Getting mac address
@@ -1331,7 +1327,6 @@ static s32 Handle_Scan(tstrWILC_WFIDrv *drvHandler, tstrHostIFscanAttr *pstrHost pstrWFIDrv->strWILC_UsrScanReq.u32RcvdChCount =0 ; -/*BugID_4189*/ strWIDList[u32WidsCount].u16WIDid = (u16 )WID_SSID_PROBE_REQ ; strWIDList[u32WidsCount].enuWIDtype =WID_STR ;
@@ -1477,7 +1472,6 @@ static s32 Handle_ScanDone(tstrWILC_WFIDrv *drvHandler, tenuScanEvent enuEvent)PRINT_D (HOSTINF_DBG ,"in Handle_ScanDone()\n" ); -/*BugID_4978*/ /*Ask FW to abort the running scan, if any*/ if (enuEvent ==SCAN_EVENT_ABORTED ) {PRINT_D (GENERIC_DBG ,"Abort running scan\n" );
@@ -1774,7 +1768,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps strWIDList[u32WidsCount].s32ValueSize = pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen; u32WidsCount++; -/*BugID_5137*/ if (memcmp ("DIRECT-" , pstrHostIFconnectAttr->pu8ssid,7 )) { gu32FlushedInfoElemAsocSize = pstrWFIDrv->strWILC_UsrConnReq.ConnReqIEsLen;
@@ -1789,7 +1782,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&(pstrWFIDrv->strWILC_UsrConnReq.u8security)); u32WidsCount++; -/*BugID_5137*/ if (memcmp ("DIRECT-" , pstrHostIFconnectAttr->pu8ssid,7 )) gu8Flushed11iMode = pstrWFIDrv->strWILC_UsrConnReq.u8security;
@@ -1802,7 +1794,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps strWIDList[u32WidsCount].ps8WidVal = (s8 *)(&pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type); u32WidsCount++; -/*BugID_5137*/ if (memcmp ("DIRECT-" , pstrHostIFconnectAttr->pu8ssid,7 )) gu8FlushedAuthType = (u8 )pstrWFIDrv->strWILC_UsrConnReq.tenuAuth_type;
@@ -1857,7 +1848,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps strWIDList[u32WidsCount].s32ValueSize =112 ;/* 79; */ strWIDList[u32WidsCount].ps8WidVal =kmalloc (strWIDList[u32WidsCount].s32ValueSize,GFP_KERNEL ); -/*BugID_5137*/ if (memcmp ("DIRECT-" , pstrHostIFconnectAttr->pu8ssid,7 )) { gu32FlushedJoinReqSize = strWIDList[u32WidsCount].s32ValueSize; gu8FlushedJoinReq =kmalloc (gu32FlushedJoinReqSize,GFP_KERNEL );
@@ -1941,7 +1931,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *psmemcpy (pu8CurrByte, ptstrJoinBssParam->rsn_cap,sizeof (ptstrJoinBssParam->rsn_cap)); pu8CurrByte +=sizeof (ptstrJoinBssParam->rsn_cap); -/*BugID_5137*/ *(pu8CurrByte++) =REAL_JOIN_REQ ;#ifdef WILC_P2P
@@ -1994,7 +1983,6 @@ static s32 Handle_Connect(tstrWILC_WFIDrv *drvHandler, tstrHostIFconnectAttr *ps gu32WidConnRstHack =0 ;/* ////////////////////// */ -/*BugID_5137*/ if (memcmp ("DIRECT-" , pstrHostIFconnectAttr->pu8ssid,7 )) {memcpy (gu8FlushedJoinReq, pu8CurrByte, gu32FlushedJoinReqSize); gu8FlushedJoinReqDrvHandler = pstrWFIDrv;
@@ -2249,7 +2237,6 @@ static s32 Handle_ConnectTimeout(tstrWILC_WFIDrv *drvHandler) }memset (u8ConnectedSSID,0 ,ETH_ALEN ); -/*BugID_5213*/ /*Freeing flushed join request params on connect timeout*/ if (gu8FlushedJoinReq !=NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {kfree (gu8FlushedJoinReq);
@@ -2674,7 +2661,6 @@ static s32 Handle_RcvdGnrlAsyncInfo(tstrWILC_WFIDrv *drvHandler, tstrRcvdGnrlAsy pstrWFIDrv->strWILC_UsrConnReq.pu8ConnReqIEs =NULL ; } -/*BugID_5213*/ /*Freeing flushed join request params on receiving*/ /*MAC_DISCONNECTED while connected*/ if (gu8FlushedJoinReq !=NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {
@@ -3147,7 +3133,6 @@ static void Handle_Disconnect(tstrWILC_WFIDrv *drvHandler)if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult !=NULL ) { -/*BugID_5193*/ /*Stop connect timer, if connection in progress*/ if (pstrWFIDrv->enuHostIFstate ==HOST_IF_WAITING_CONN_RESP ) {PRINT_D (HOSTINF_DBG ,"Upper layer requested termination of connection\n" );
@@ -3186,7 +3171,6 @@ static void Handle_Disconnect(tstrWILC_WFIDrv *drvHandler) } -/*BugID_5137*/ if (gu8FlushedJoinReq !=NULL && gu8FlushedJoinReqDrvHandler == drvHandler) {kfree (gu8FlushedJoinReq); gu8FlushedJoinReq =NULL ;
@@ -4020,7 +4004,6 @@ static u32 Handle_ListenStateExpired(tstrWILC_WFIDrv *drvHandler, tstrHostIfRemaPRINT_D (HOSTINF_DBG ,"CANCEL REMAIN ON CHAN\n" ); -/*BugID_5477*/ /*Make sure we are already in listen state*/ /*This is to handle duplicate expiry messages (listen timer fired and supplicant called cancel_remain_on_channel())*/ if (P2P_LISTEN_STATE ) {
@@ -4190,7 +4173,6 @@ static void Handle_SetMulticastFilter(tstrWILC_WFIDrv *drvHandler, tstrHostIFSet } -/*BugID_5222*/ /** * @brief Handle_AddBASession * @details Add block ack session
@@ -4280,7 +4262,6 @@ static s32 Handle_AddBASession(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASessionI } -/*BugID_5222*/ /** * @brief Handle_DelBASession * @details Delete block ack session
@@ -4345,7 +4326,6 @@ static s32 Handle_DelBASession(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASessionIif (strWID.ps8WidVal !=NULL )kfree (strWID.ps8WidVal); -/*BugID_5222*/ up (&hWaitResponse);return s32Error;
@@ -4400,7 +4380,6 @@ static s32 Handle_DelAllRxBASessions(tstrWILC_WFIDrv *drvHandler, tstrHostIfBASeif (strWID.ps8WidVal !=NULL )kfree (strWID.ps8WidVal); -/*BugID_5222*/ up (&hWaitResponse);return s32Error;
@@ -4461,7 +4440,6 @@ static int hostIFthread(void *pvArg)Handle_Connect (strHostIFmsg.drvHandler, &strHostIFmsg.uniHostIFmsgBody.strHostIFconnectAttr);break ; -/*BugID_5137*/ case HOST_IF_MSG_FLUSH_CONNECT :Handle_FlushConnect (strHostIFmsg.drvHandler);break ;
@@ -4495,7 +4473,6 @@ static int hostIFthread(void *pvArg)del_timer (&pstrWFIDrv->hScanTimer);PRINT_D (HOSTINF_DBG ,"scan completed successfully\n" ); -/*BugID_5213*/ /*Allow chip sleep, only if both interfaces are not connected*/ if (!linux_wlan_get_num_conn_ifcs ())chip_sleep_manually (INFINITE_SLEEP_TIME );
@@ -4585,12 +4562,10 @@ static int hostIFthread(void *pvArg)Handle_get_IPAddress (strHostIFmsg.drvHandler, strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.au8IPAddr, strHostIFmsg.uniHostIFmsgBody.strHostIfSetIP.idx);break ; -/*BugID_5077*/ case HOST_IF_MSG_SET_MAC_ADDRESS :Handle_SetMacAddress (strHostIFmsg.drvHandler, &strHostIFmsg.uniHostIFmsgBody.strHostIfSetMacAddress);break ; -/*BugID_5213*/ case HOST_IF_MSG_GET_MAC_ADDRESS :Handle_GetMacAddress (strHostIFmsg.drvHandler, &strHostIFmsg.uniHostIFmsgBody.strHostIfGetMacAddress);break ;
@@ -4616,7 +4591,6 @@ static int hostIFthread(void *pvArg)Handle_SetMulticastFilter (strHostIFmsg.drvHandler, &strHostIFmsg.uniHostIFmsgBody.strHostIfSetMulti);break ; -/*BugID_5222*/ case HOST_IF_MSG_ADD_BA_SESSION :Handle_AddBASession (strHostIFmsg.drvHandler, &strHostIFmsg.uniHostIFmsgBody.strHostIfBASessionInfo);break ;
@@ -6618,7 +6592,6 @@ s32 host_int_init(tstrWILC_WFIDrv **phWFIDrv)if (clients_count ==0 ) {sema_init (&hSemHostIFthrdEnd,0 );sema_init (&hSemDeinitDrvHandle,0 ); -/*BugID_5348*/ sema_init (&hSemHostIntDeinit,1 ); }
@@ -6750,7 +6723,6 @@ s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv)* return 0; * }*/ -/*BugID_5348*/ if (pstrWFIDrv ==NULL ) {PRINT_ER ("pstrWFIDrv = NULL\n" );
@@ -6762,7 +6734,6 @@ s32 host_int_deinit(tstrWILC_WFIDrv *hWFIDrv) terminated_handle = pstrWFIDrv;PRINT_D (HOSTINF_DBG ,"De-initializing host interface for client %d\n" , clients_count); -/*BugID_5348*/ /*Destroy all timers before acquiring hSemDeinitDrvHandle*/ /*to guarantee handling all messages befor proceeding*/ if (del_timer_sync (&pstrWFIDrv->hScanTimer)) {
@@ -6911,7 +6882,6 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)int id;tstrWILC_WFIDrv *pstrWFIDrv =NULL ; -/*BugID_5348*/ down (&hSemHostIntDeinit); id = ((pu8Buffer[u32Length -4 ]) | (pu8Buffer[u32Length -3 ] <<8 ) | (pu8Buffer[u32Length -2 ] <<16 ) | (pu8Buffer[u32Length -1 ] <<24 ));
@@ -6921,7 +6891,6 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)if (pstrWFIDrv ==NULL || pstrWFIDrv == terminated_handle) {PRINT_D (HOSTINF_DBG ,"Wifi driver handler is equal to NULL\n" ); -/*BugID_5348*/ up (&hSemHostIntDeinit);return ; }
@@ -6929,7 +6898,6 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)if (pstrWFIDrv->strWILC_UsrConnReq.pfUserConnectResult ==NULL ) {/* received mac status is not needed when there is no current Connect Request */ PRINT_ER ("Received mac status is not needed when there is no current Connect Reques\n" ); -/*BugID_5348*/ up (&hSemHostIntDeinit);return ; }
@@ -6952,7 +6920,6 @@ void GnrlAsyncInfoReceived(u8 *pu8Buffer, u32 u32Length)if (s32Error)PRINT_ER ("Error in sending message queue asynchronous message info: Error(%d)\n" , s32Error); -/*BugID_5348*/ up (&hSemHostIntDeinit); }
@@ -7335,7 +7302,6 @@ s32 host_int_del_station(tstrWILC_WFIDrv *hWFIDrv, const u8 *pu8MacAddr) strHostIFmsg.u16MsgId =HOST_IF_MSG_DEL_STATION ; strHostIFmsg.drvHandler = hWFIDrv; -/*BugID_4795: Handling situation of deleting all stations*/ if (pu8MacAddr ==NULL )memset (pstrDelStationMsg->au8MacAddr,255 ,ETH_ALEN );else
@@ -7825,7 +7791,6 @@ s32 host_int_delBASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char TID) } -/*BugID_5222*/ down (&hWaitResponse);return s32Error;
@@ -7858,7 +7823,6 @@ s32 host_int_del_All_Rx_BASession(tstrWILC_WFIDrv *hWFIDrv, char *pBSSID, char T } -/*BugID_5222*/ down (&hWaitResponse);return s32Error;
drivers/staging/wilc1000/host_interface.h +0 -4
@@ -218,7 +218,6 @@ typedef struct _tstrRcvdNetworkInfo {u32 u32Length; } tstrRcvdNetworkInfo; -/*BugID_4156*/ typedef struct _tstrHiddenNetworkInfo { u8 *pu8ssid; u8 u8ssidlen;
@@ -266,17 +265,14 @@ typedef struct {u32 u32Mode; } tstrHostIfSetOperationMode; -/*BugID_5077*/ typedef struct {u8 u8MacAddress[ETH_ALEN ]; }tstrHostIfSetMacAddress ; -/*BugID_5213*/ typedef struct {u8 *u8MacAddress; }tstrHostIfGetMacAddress ; -/*BugID_5222*/ typedef struct { u8 au8Bssid[ETH_ALEN]; u8 u8Ted;
drivers/staging/wilc1000/linux_wlan.c +0 -8
@@ -576,7 +576,6 @@ int linux_wlan_set_bssid(struct net_device *wilc_netdev, u8 *pBSSID)return ret; } -/*BugID_5213*/ /*Function to get number of connected interfaces*/ int linux_wlan_get_num_conn_ifcs (void ) {
@@ -709,7 +708,6 @@ int linux_wlan_get_firmware(perInterface_wlan_t *p_nic)else if (nic->iftype ==STATION_MODE ) firmware =STA_FIRMWARE ; -/*BugID_5137*/ else {PRINT_D (INIT_DBG ,"Get P2P_CONCURRENCY_FIRMWARE\n" ); firmware =P2P_CONCURRENCY_FIRMWARE ;
@@ -830,7 +828,6 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_nunsigned char c_val[64 ];unsigned char mac_add[] = {0x00 ,0x80 ,0xC2 ,0x5E ,0xa2 ,0xff }; -/*BugID_5077*/ struct wilc_priv *priv;tstrWILC_WFIDrv *pstrWFIDrv;
@@ -1181,7 +1178,6 @@ int wlan_init_locks(linux_wlan_t *p_nic)mutex_init (&g_linux_wlan->rxq_cs);mutex_init (&g_linux_wlan->txq_cs); -/*Added by Amr - BugID_4720*/ spin_lock_init (&g_linux_wlan->txq_spinlock);sema_init (&g_linux_wlan->txq_add_to_head_cs,1 );
@@ -1226,10 +1222,8 @@ void linux_to_wlan(wilc_wlan_inp_t *nwi, linux_wlan_t *nic) nwi->os_context.tx_buffer_size =LINUX_TX_SIZE ; nwi->os_context.txq_critical_section = (void *)&g_linux_wlan->txq_cs; -/*Added by Amr - BugID_4720*/ nwi->os_context.txq_add_to_head_critical_section = (void *)&g_linux_wlan->txq_add_to_head_cs; -/*Added by Amr - BugID_4720*/ nwi->os_context.txq_spin_lock = (void *)&g_linux_wlan->txq_spinlock; nwi->os_context.txq_wait_event = (void *)&g_linux_wlan->txq_event;
@@ -1623,7 +1617,6 @@ int mac_open(struct net_device *ndev) {perInterface_wlan_t *nic; -/*BugID_5213*/ /*No need for setting mac address here anymore,*/ /*Just set it in init_test_config()*/ unsigned char mac_add[ETH_ALEN ] = {0 };
@@ -2053,7 +2046,6 @@ void WILC_WFI_mgmt_rx(u8 *buff, u32 size)int i =0 ;perInterface_wlan_t *nic; -/*BugID_5450*/ /*Pass the frame on the monitor interface, if any.*/ /*Otherwise, pass it on p2p0 netdev, if registered on it*/ for (i =0 ; i < g_linux_wlan->u8NoIfcs; i++) {
drivers/staging/wilc1000/linux_wlan_common.h +0 -1
@@ -12,7 +12,6 @@ enum debug_region { RX_debug, Lock_debug, Tcp_enhance, -/*Added by amr - BugID_4720*/ Spin_debug, Init_debug,
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -42
239 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wfi_netdevice.h +0 -1
@@ -189,7 +189,6 @@ typedef struct {u8 open_ifcs;struct mutex txq_cs; -/*Added by Amr - BugID_4720*/ struct semaphore txq_add_to_head_cs;spinlock_t txq_spinlock;
drivers/staging/wilc1000/wilc_wlan.c +2 -24
@@ -71,7 +71,6 @@ typedef struct {**/ void *txq_lock; -/*Added by Amr - BugID_4720*/ struct semaphore *txq_add_to_head_lock;void *txq_spinlock;unsigned long txq_spinlock_flags;
@@ -124,7 +123,6 @@ static void wilc_debug(u32 flag, char *fmt, ...)static CHIP_PS_STATE_T genuChipPSstate =CHIP_WAKEDUP ; -/*BugID_5213*/ /*acquire_bus() and release_bus() are made static inline functions*/ /*as a temporary workaround to fix a problem of receiving*/ /*unknown interrupt from FW*/
@@ -194,7 +192,6 @@ static struct txq_entry_t *wilc_wlan_txq_remove_from_head(void) } p->txq_entries -=1 ; -/*Added by Amr - BugID_4720*/
@@ -209,7 +206,6 @@ static void wilc_wlan_txq_add_to_tail(struct txq_entry_t *tqe) {wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;unsigned long flags; -/*Added by Amr - BugID_4720*/ spin_lock_irqsave (p->txq_spinlock, flags);if (p->txq_head ==NULL ) {
@@ -226,7 +222,6 @@ static void wilc_wlan_txq_add_to_tail(struct txq_entry_t *tqe) p->txq_entries +=1 ;PRINT_D (TX_DBG ,"Number of entries in TxQ = %d\n" , p->txq_entries); -/*Added by Amr - BugID_4720*/ spin_unlock_irqrestore (p->txq_spinlock, flags);/**
@@ -241,7 +236,6 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe) {wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;unsigned long flags; -/*Added by Amr - BugID_4720*/ if (p->os_func.os_wait (p->txq_add_to_head_lock,CFG_PKTS_TIMEOUT ))return -1 ;
@@ -261,7 +255,6 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe) p->txq_entries +=1 ;PRINT_D (TX_DBG ,"Number of entries in TxQ = %d\n" , p->txq_entries); -/*Added by Amr - BugID_4720*/ spin_unlock_irqrestore (p->txq_spinlock, flags);up (p->txq_add_to_head_lock);
@@ -272,7 +265,6 @@ static int wilc_wlan_txq_add_to_head(struct txq_entry_t *tqe)up (p->txq_wait);PRINT_D (TX_DBG ,"Wake up the txq_handler\n" ); -/*Added by Amr - BugID_4720*/ return 0 ; }
@@ -524,7 +516,6 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)**/ PRINT_D (TX_DBG ,"Adding the config packet at the Queue tail\n" ); -/*Edited by Amr - BugID_4720*/ if (wilc_wlan_txq_add_to_head (tqe))return 0 ;return 1 ;
@@ -594,12 +585,10 @@ static struct txq_entry_t *wilc_wlan_txq_get_first(void)struct txq_entry_t *tqe;unsigned long flags; -/*Added by Amr - BugID_4720*/ spin_lock_irqsave (p->txq_spinlock, flags); tqe = p->txq_head; -/*Added by Amr - BugID_4720*/ spin_unlock_irqrestore (p->txq_spinlock, flags);
@@ -610,11 +599,9 @@ static struct txq_entry_t *wilc_wlan_txq_get_next(struct txq_entry_t *tqe) {wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;unsigned long flags; -/*Added by Amr - BugID_4720*/ spin_lock_irqsave (p->txq_spinlock, flags); tqe = tqe->next; -/*Added by Amr - BugID_4720*/ spin_unlock_irqrestore (p->txq_spinlock, flags);
@@ -869,7 +856,6 @@ static int wilc_wlan_handle_txq(u32 *pu32TxqCount)if (p->quit)break ; -/*Added by Amr - BugID_4720*/ p->os_func.os_wait (p->txq_add_to_head_lock,CFG_PKTS_TIMEOUT );#ifdef TCP_ACK_FILTER wilc_wlan_txq_filter_dup_tcp_ack ();
@@ -1151,7 +1137,6 @@ _end_:if (ret !=1 )break ; }while (0 ); -/*Added by Amr - BugID_4720*/ up (p->txq_add_to_head_lock); p->txq_exit =1 ;
@@ -1595,13 +1580,11 @@ static int wilc_wlan_start(void) reg |=WILC_HAVE_LEGACY_RF_SETTINGS ; -/*BugID_5257*/ /*Set oscillator frequency*/ #ifdef XTAL_24 reg |=WILC_HAVE_XTAL_24 ;#endif -/*BugID_5271*/ /*Enable/Disable GPIO configuration for FW logs*/ #ifdef DISABLE_WILC_UART reg |=WILC_HAVE_DISABLE_WILC_UART ;
@@ -1826,7 +1809,6 @@ static int wilc_wlan_cfg_commit(int type, u32 drvHandler)* Add to TX queue **/ -/*Edited by Amr - BugID_4720*/ if (!wilc_wlan_txq_add_cfg_pkt (&cfg->wid_header[0 ], total_len))return -1 ;
@@ -1856,9 +1838,8 @@ static int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size, inPRINT_D (RX_DBG ,"Processing cfg_set()\n" ); p->cfg_frame_in_use =1 ; -/*Edited by Amr - BugID_4720*/ if (wilc_wlan_cfg_commit (WILC_CFG_SET , drvHandler)) - ret_size =0 ;/* BugID_5213 */ + ret_size =0 ;if (p->os_func.os_wait (p->cfg_wait,CFG_PKTS_TIMEOUT )) {PRINT_D (TX_DBG ,"Set Timed Out\n" );
@@ -1893,9 +1874,8 @@ static int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler)if (commit) { p->cfg_frame_in_use =1 ; -/*Edited by Amr - BugID_4720*/ if (wilc_wlan_cfg_commit (WILC_CFG_QUERY , drvHandler)) - ret_size =0 ;/* BugID_5213 */ + ret_size =0 ;if (p->os_func.os_wait (p->cfg_wait,CFG_PKTS_TIMEOUT )) {
@@ -2052,10 +2032,8 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup) g_wlan.hif_lock = inp->os_context.hif_critical_section; g_wlan.txq_lock = inp->os_context.txq_critical_section; -/*Added by Amr - BugID_4720*/ g_wlan.txq_add_to_head_lock = inp->os_context.txq_add_to_head_critical_section; -/*Added by Amr - BugID_4720*/ g_wlan.txq_spinlock = inp->os_context.txq_spin_lock; g_wlan.rxq_lock = inp->os_context.rxq_critical_section;
drivers/staging/wilc1000/wilc_wlan.h +0 -1
@@ -54,7 +54,6 @@* ********************************************/ #define WILC_PERIPH_REG_BASE 0x1000 -/*BugID_5137*/ #define WILC_CHANGING_VIR_IF (0x108c)#define WILC_CHIPID (WILC_PERIPH_REG_BASE)#define WILC_GLB_RESET_0 (WILC_PERIPH_REG_BASE + 0x400)
drivers/staging/wilc1000/wilc_wlan_if.h +0 -9
@@ -130,7 +130,6 @@ typedef struct {u32 tx_buffer_size;void *txq_critical_section; -/*Added by Amr - BugID_4720*/ void *txq_add_to_head_critical_section;void *txq_spin_lock;
@@ -635,7 +634,6 @@ typedef enum {/* -------------------------------------------------------------------- */ WID_LINK_LOSS_THRESHOLD =0x0037 , -/*BugID_4978*/ WID_ABORT_RUNNING_SCAN = 0x003E,/* NMAC Character WID list */
@@ -890,12 +888,9 @@ typedef enum {#ifdef WILC_P2P WID_REMAIN_ON_CHAN =0x3996 , #endif -/*BugID_4156*/ WID_SSID_PROBE_REQ =0x3997 , -/*BugID_4124 WID to trigger modified Join Request using SSID and BSSID instead of bssListIdx (used by WID_JOIN_REQ)*/ WID_JOIN_REQ_EXTENDED =0x3998 , -/* BugID 4951: WID toset IP address in firmware */ WID_IP_ADDRESS = 0x3999,
@@ -915,19 +910,15 @@ typedef enum {WID_11N_AUTORATE_TABLE =0x4080 , -/*Added here by Amr - BugID 4134*/ WID_SCAN_CHANNEL_LIST =0x4084 , -/*BugID_3746 WID to add IE to be added in next probe request*/ WID_INFO_ELEMENT_PROBE =0x4085 , -/*BugID_3746 WID to add IE to be added in next associate request*/ WID_INFO_ELEMENT_ASSOCIATE =0x4086 ,WID_ADD_STA =0X4087 ,WID_REMOVE_STA =0X4088 ,WID_EDIT_STA =0X4089 ,WID_ADD_BEACON =0x408a , -/* BugID 5108 */ WID_SETUP_MULTICAST_FILTER =0x408b , /* Miscellaneous WIDs */
Signature · 1 line
2.5.1
PATCH 10/10 staging: wilc1000: remove declaration of wilc_get_chipid
In reply to Chaehyun LimThis patch removes the declaration of wilc_get_chipid function. It is included wilc_wlan_if.h that has declaration of wilc_get_chipid.
--- drivers/staging/wilc1000/host_interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -1,5 +1,6 @@#include "host_interface.h" #include "coreconfigurator.h" +#include "wilc_wlan_if.h" extern u8 connecting;
@@ -7424,7 +7425,6 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrSt return s32Error; }#endif /*WILC_AP_EXTERNAL_MLME*/ -u32 wilc_get_chipid (u8 );s32 host_int_set_power_mgmt (tstrWILC_WFIDrv *hWFIDrv,bool bIsEnabled,u32 u32Timeout) {
Signature · 1 line
2.5.1