staging: wilc1000: remove duplicated include
PATCH 1/18 staging: wilc1000: remove duplicated include
wilc_wfi_cfgoperations.h and linux_wlan_common.h are included as duplicated in linux_wlan.c.
--- drivers/staging/wilc1000/linux_wlan.c | 3 --- 1 file changed, 3 deletions(-)
drivers/staging/wilc1000/linux_wlan.c +0 -3
@@ -2,9 +2,6 @@#include "linux_wlan_common.h" #include "wilc_wlan_if.h" #include "wilc_wlan.h" -#include "wilc_wfi_cfgoperations.h" - -#include "linux_wlan_common.h" #include <linux/slab.h> #include <linux/sched.h>
Signature · 1 line
2.5.1
PATCH 2/18 staging: wilc1000: rename WILC_WFI_cfg80211_ops
This patch replaces WILC_WFI_cfg80211_ops with wilc_cfg80211_ops to avoid CamelCase.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -2
@@ -3556,7 +3556,7 @@ int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) /* ton#endif /*WILC_AP_EXTERNAL_MLME*/ -static struct cfg80211_ops WILC_WFI_cfg80211_ops = { +static struct cfg80211_ops wilc_cfg80211_ops = { .set_monitor_channel = set_channel, .scan = scan,
@@ -3669,7 +3669,7 @@ struct wireless_dev *WILC_WFI_CfgAlloc(void) }/*Creating a new wiphy, linking wireless structure with the wiphy structure*/ - wdev->wiphy =wiphy_new (&WILC_WFI_cfg80211_ops,sizeof (struct WILC_WFI_priv )); + wdev->wiphy =wiphy_new (&wilc_cfg80211_ops,sizeof (struct WILC_WFI_priv ));if (!wdev->wiphy) {PRINT_ER ("Cannot allocate wiphy\n" ); goto _fail_mem_;
Signature · 1 line
2.5.1
PATCH 3/18 staging: wilc1000: rename WILC_WFI_priv
In reply to Chaehyun LimThis patch replaces WILC_WFI_priv with wilc_priv to avoid CamelCase.
--- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 12 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 90 +++++++++++------------ drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +- 4 files changed, 53 insertions(+), 53 deletions(-)
drivers/staging/wilc1000/linux_mon.c +1 -1
@@ -63,7 +63,7 @@ void WILC_WFI_monitor_rx(uint8_t *buff, uint32_t size)PRINT_INFO (HOSTAPD_DBG ,"In monitor interface receive function\n" ); -/* struct WILC_WFI_priv *priv = netdev_priv(dev); */ +/* struct wilc_priv *priv = netdev_priv(dev); */ /* priv = wiphy_priv(priv->dev->ieee80211_ptr->wiphy); */
drivers/staging/wilc1000/linux_wlan.c +6 -6
@@ -200,7 +200,7 @@ static int DebuggingThreadTask(void *vp)static int dev_state_ev_handler (struct notifier_block *this,unsigned long event,void *ptr) {struct in_ifaddr *dev_iface = (struct in_ifaddr *)ptr; -struct WILC_WFI_priv *priv; +struct wilc_priv *priv;tstrWILC_WFIDrv *pstrWFIDrv;struct net_device *dev;u8 *pIP_Add_buff;
@@ -831,7 +831,7 @@ static int linux_wlan_init_test_config(struct net_device *dev, linux_wlan_t *p_nunsigned char mac_add[] = {0x00 ,0x80 ,0xC2 ,0x5E ,0xa2 ,0xff };/*BugID_5077*/ -struct WILC_WFI_priv *priv; +struct wilc_priv *priv;tstrWILC_WFIDrv *pstrWFIDrv;PRINT_D (TX_DBG ,"Start configuring Firmware\n" );
@@ -1629,7 +1629,7 @@ int mac_open(struct net_device *ndev)unsigned char mac_add[ETH_ALEN ] = {0 };int ret =0 ;int i =0 ; -struct WILC_WFI_priv *priv; +struct wilc_priv *priv; nic =netdev_priv (ndev); priv =wiphy_priv (nic->wilc_netdev->ieee80211_ptr->wiphy);
@@ -1701,7 +1701,7 @@ static void wilc_set_multicast_list(struct net_device *dev) {struct netdev_hw_addr *ha; -struct WILC_WFI_priv *priv; +struct wilc_priv *priv;tstrWILC_WFIDrv *pstrWFIDrv;int i =0 ;
@@ -1834,7 +1834,7 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)int mac_close (struct net_device *ndev) { -struct WILC_WFI_priv *priv; +struct wilc_priv *priv;perInterface_wlan_t *nic;tstrWILC_WFIDrv *pstrWFIDrv;
@@ -1902,7 +1902,7 @@ int mac_ioctl(struct net_device *ndev, struct ifreq *req, int cmd)s8 rssi;u32 size =0 , length =0 ;perInterface_wlan_t *nic; -struct WILC_WFI_priv *priv; +struct wilc_priv *priv;s32 s32Error =WILC_SUCCESS ;/* struct iwreq *wrq = (struct iwreq *) req; // tony moved to case SIOCSIWPRIV */
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +45 -45
349 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wfi_netdevice.h +1 -1
@@ -116,7 +116,7 @@ struct wilc_wfi_p2pListenParams {#endif /*WILC_P2P*/ -struct WILC_WFI_priv { +struct wilc_priv {struct wireless_dev *wdev;struct cfg80211_scan_request *pstrScanReq;
Signature · 1 line
2.5.1
PATCH 4/18 staging: wilc1000: use u8 instead of uint8_t
In reply to Chaehyun LimThis patch replaces uint8_t with u8 that is a preferred kernel type.
--- drivers/staging/wilc1000/host_interface.c | 2 +- drivers/staging/wilc1000/linux_mon.c | 2 +- drivers/staging/wilc1000/linux_wlan.c | 30 ++-- drivers/staging/wilc1000/linux_wlan_spi.c | 4 +- drivers/staging/wilc1000/linux_wlan_spi.h | 4 +- drivers/staging/wilc1000/wilc_sdio.c | 24 +-- drivers/staging/wilc1000/wilc_spi.c | 178 +++++++++++----------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 14 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 10 +- drivers/staging/wilc1000/wilc_wlan.c | 58 +++---- drivers/staging/wilc1000/wilc_wlan.h | 32 ++-- drivers/staging/wilc1000/wilc_wlan_cfg.c | 118 +++++++------- drivers/staging/wilc1000/wilc_wlan_cfg.h | 2 +- drivers/staging/wilc1000/wilc_wlan_if.h | 26 ++-- 15 files changed, 253 insertions(+), 253 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -1
@@ -7460,7 +7460,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrSt return s32Error; }#endif /*WILC_AP_EXTERNAL_MLME*/ -uint32_t wilc_get_chipid (uint8_t ); +uint32_t wilc_get_chipid (u8 );s32 host_int_set_power_mgmt (tstrWILC_WFIDrv *hWFIDrv,bool bIsEnabled,u32 u32Timeout) {
drivers/staging/wilc1000/linux_mon.c +1 -1
@@ -54,7 +54,7 @@ u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};#define IS_MGMT_STATUS_SUCCES 0x040#define GET_PKT_OFFSET (a) (((a) >> 22) & 0x1ff) -void WILC_WFI_monitor_rx (uint8_t *buff,uint32_t size) +void WILC_WFI_monitor_rx (u8 *buff,uint32_t size) {uint32_t header, pkt_offset;struct sk_buff *skb =NULL ;
drivers/staging/wilc1000/linux_wlan.c +15 -15
@@ -110,11 +110,11 @@ static struct semaphore close_exit_sync;static int wlan_deinit_locks (linux_wlan_t *nic);static void wlan_deinitialize_threads (linux_wlan_t *nic); -extern void WILC_WFI_monitor_rx (uint8_t *buff,uint32_t size); -extern void WILC_WFI_p2p_rx (struct net_device *dev,uint8_t *buff,uint32_t size); +extern void WILC_WFI_monitor_rx (u8 *buff,uint32_t size); +extern void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,uint32_t size);static void linux_wlan_tx_complete (void *priv,int status); -void frmw_to_linux (uint8_t *buff,uint32_t size,uint32_t pkt_offset); +void frmw_to_linux (u8 *buff,uint32_t size,uint32_t pkt_offset);static int mac_init_fn (struct net_device *ndev);int mac_xmit (struct sk_buff *skb,struct net_device *dev);int mac_open (struct net_device *ndev);
@@ -485,7 +485,7 @@ static void deinit_irq(linux_wlan_t *nic)/* * OS functions */ -static void linux_wlan_dbg (uint8_t *buff) +static void linux_wlan_dbg (u8 *buff) {PRINT_D (INIT_DBG ,"%d\n" , *buff); }
@@ -529,9 +529,9 @@ static void linux_wlan_mac_indicate(int flag) } -struct net_device *GetIfHandler (uint8_t *pMacHeader) +struct net_device *GetIfHandler (u8 *pMacHeader) { -uint8_t *Bssid, *Bssid1; +u8 *Bssid, *Bssid1;int i =0 ; Bssid = pMacHeader +10 ;
@@ -559,7 +559,7 @@ struct net_device *GetIfHandler(uint8_t *pMacHeader)return NULL ; } -int linux_wlan_set_bssid (struct net_device *wilc_netdev,uint8_t *pBSSID) +int linux_wlan_set_bssid (struct net_device *wilc_netdev,u8 *pBSSID) {int i =0 ;int ret =-1 ;
@@ -580,9 +580,9 @@ int linux_wlan_set_bssid(struct net_device *wilc_netdev, uint8_t *pBSSID)/*Function to get number of connected interfaces*/ int linux_wlan_get_num_conn_ifcs (void ) { -uint8_t i =0 ; -uint8_t null_bssid[6 ] = {0 }; -uint8_t ret_val =0 ; +u8 i =0 ; +u8 null_bssid[6 ] = {0 }; +u8 ret_val =0 ;for (i =0 ; i < g_linux_wlan->u8NoIfcs; i++) {if (memcmp (g_linux_wlan->strInterfaceInfo[i].aBSSID, null_bssid,6 ))
@@ -1380,13 +1380,13 @@ static void wlan_deinitialize_threads(linux_wlan_t *nic)#ifdef COMPLEMENT_BOOT extern volatile int probe; -extern uint8_t core_11b_ready (void ); +extern u8 core_11b_ready (void );#define READY_CHECK_THRESHOLD 30extern void wilc_wlan_global_reset (void ); -uint8_t wilc1000_prepare_11b_core (wilc_wlan_inp_t *nwi,wilc_wlan_oup_t *nwo,linux_wlan_t *nic) +u8 wilc1000_prepare_11b_core (wilc_wlan_inp_t *nwi,wilc_wlan_oup_t *nwo,linux_wlan_t *nic) { -uint8_t trials =0 ; +u8 trials =0 ;while ((core_11b_ready () && (READY_CHECK_THRESHOLD > (trials++)))) {PRINT_D (INIT_DBG ,"11b core not ready yet: %u\n" , trials);
@@ -1963,7 +1963,7 @@ done:return s32Error; } -void frmw_to_linux (uint8_t *buff,uint32_t size,uint32_t pkt_offset) +void frmw_to_linux (u8 *buff,uint32_t size,uint32_t pkt_offset) {unsigned int frame_len =0 ;
@@ -2042,7 +2042,7 @@ void frmw_to_linux(uint8_t *buff, uint32_t size, uint32_t pkt_offset)#endif } -void WILC_WFI_mgmt_rx (uint8_t *buff,uint32_t size) +void WILC_WFI_mgmt_rx (u8 *buff,uint32_t size) {int i =0 ;perInterface_wlan_t *nic;
drivers/staging/wilc1000/linux_wlan_spi.c +2 -2
@@ -115,7 +115,7 @@ int linux_spi_init(void *vp)#if defined(TXRX_PHASE_SIZE ) -int linux_spi_write (uint8_t *b,uint32_t len) +int linux_spi_write (u8 *b,uint32_t len) {int ret;
@@ -194,7 +194,7 @@ int linux_spi_write(uint8_t *b, uint32_t len) }#else -int linux_spi_write (uint8_t *b,uint32_t len) +int linux_spi_write (u8 *b,uint32_t len) {int ret;
drivers/staging/wilc1000/linux_wlan_spi.h +2 -2
@@ -7,8 +7,8 @@ extern struct spi_driver wilc_bus;int linux_spi_init (void *vp);void linux_spi_deinit (void *vp); -int linux_spi_write (uint8_t *b,uint32_t len); -int linux_spi_read (uint8_t *rb,uint32_t rlen); +int linux_spi_write (u8 *b,uint32_t len); +int linux_spi_read (u8 *rb,uint32_t rlen);int linux_spi_write_read (unsigned char *wb,unsigned char *rb,unsigned int rlen);int linux_spi_set_max_speed (void );#endif
drivers/staging/wilc1000/wilc_sdio.c +12 -12
@@ -50,21 +50,21 @@ static int sdio_set_func0_csa_address(uint32_t adr) cmd.function =0 ; cmd.raw =0 ; cmd.address =0x10c ; - cmd.data = (uint8_t )adr; + cmd.data = (u8 )adr;if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x10c data...\n" ); goto _fail_; } cmd.address =0x10d ; - cmd.data = (uint8_t )(adr >>8 ); + cmd.data = (u8)(adr >>8 );if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x10d data...\n" ); goto _fail_; } cmd.address =0x10e ; - cmd.data = (uint8_t )(adr >>16 ); + cmd.data = (u8)(adr >>16 );if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x10e data...\n" ); goto _fail_;
@@ -86,7 +86,7 @@ static int sdio_set_func0_csa_address_byte0(uint32_t adr) cmd.function =0 ; cmd.raw =0 ; cmd.address =0x10c ; - cmd.data = (uint8_t )adr; + cmd.data = (u8 )adr;if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x10c data...\n" ); goto _fail_;
@@ -105,14 +105,14 @@ static int sdio_set_func0_block_size(uint32_t block_size) cmd.function =0 ; cmd.raw =0 ; cmd.address =0x10 ; - cmd.data = (uint8_t )block_size; + cmd.data = (u8 )block_size;if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x10 data...\n" ); goto _fail_; } cmd.address =0x11 ; - cmd.data = (uint8_t )(block_size >>8 ); + cmd.data = (u8)(block_size >>8 );if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x11 data...\n" ); goto _fail_;
@@ -137,13 +137,13 @@ static int sdio_set_func1_block_size(uint32_t block_size) cmd.function =0 ; cmd.raw =0 ; cmd.address =0x110 ; - cmd.data = (uint8_t )block_size; + cmd.data = (u8 )block_size;if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x110 data...\n" ); goto _fail_; } cmd.address =0x111 ; - cmd.data = (uint8_t )(block_size >>8 ); + cmd.data = (u8)(block_size >>8 );if (!g_sdio.sdio_cmd52 (&cmd)) { g_sdio.dPrint (N_ERR ,"[wilc sdio]: Failed cmd52, set 0x111 data...\n" ); goto _fail_;
@@ -276,7 +276,7 @@ static int sdio_write_reg(uint32_t addr, uint32_t data) cmd.block_mode =0 ; cmd.increment =1 ; cmd.count =4 ; - cmd.buffer = (uint8_t *)&data; + cmd.buffer = (u8 *)&data; cmd.block_size = g_sdio.block_size;/* johnny : prevent it from setting unexpected value */ if (!g_sdio.sdio_cmd53 (&cmd)) {
@@ -292,7 +292,7 @@ _fail_:return 0 ; } -static int sdio_write (uint32_t addr,uint8_t *buf,uint32_t size) +static int sdio_write (uint32_t addr,u8 *buf,uint32_t size) {uint32_t block_size = g_sdio.block_size;sdio_cmd53_t cmd;
@@ -402,7 +402,7 @@ static int sdio_read_reg(uint32_t addr, uint32_t *data) cmd.block_mode =0 ; cmd.increment =1 ; cmd.count =4 ; - cmd.buffer = (uint8_t *)data; + cmd.buffer = (u8 *)data; cmd.block_size = g_sdio.block_size;/* johnny : prevent it from setting unexpected value */
@@ -423,7 +423,7 @@ _fail_:return 0 ; } -static int sdio_read (uint32_t addr,uint8_t *buf,uint32_t size) +static int sdio_read (uint32_t addr,u8 *buf,uint32_t size) {uint32_t block_size = g_sdio.block_size;sdio_cmd53_t cmd;
drivers/staging/wilc1000/wilc_spi.c +89 -89
394 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +7 -7
@@ -164,9 +164,9 @@ void clear_shadow_scan(void *pUserVoid)uint32_t get_rssi_avg (tstrNetworkInfo *pstrNetworkInfo) { -uint8_t i; +u8 i;int rssi_v =0 ; -uint8_t num_rssi = (pstrNetworkInfo->strRssi.u8Full) ?NUM_RSSI : (pstrNetworkInfo->strRssi.u8Index); +u8 num_rssi = (pstrNetworkInfo->strRssi.u8Full) ?NUM_RSSI : (pstrNetworkInfo->strRssi.u8Index);for (i =0 ; i < num_rssi; i++) rssi_v += pstrNetworkInfo->strRssi.as8RSSI[i];
@@ -175,7 +175,7 @@ uint32_t get_rssi_avg(tstrNetworkInfo *pstrNetworkInfo)return rssi_v; } -void refresh_scan (void *pUserVoid,uint8_t all,bool bDirectScan) +void refresh_scan (void *pUserVoid,u8 all,bool bDirectScan) {struct wilc_priv *priv;struct wiphy *wiphy;
@@ -302,7 +302,7 @@ void add_network_to_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid, vo {int8_t ap_found =is_network_in_shadow (pstrNetworkInfo, pUserVoid);uint32_t ap_index =0 ; -uint8_t rssi_index =0 ; +u8 rssi_index =0 ;if (u32LastScannedNtwrksCountShadow >=MAX_NUM_SCANNED_NETWORKS_SHADOW ) {PRINT_D (CFG80211_DBG ,"Shadow network reached its maximum limit\n" );
@@ -525,7 +525,7 @@ int WILC_WFI_Set_PMKSA(u8 *bssid, struct wilc_priv *priv) } -int linux_wlan_set_bssid (struct net_device *wilc_netdev,uint8_t *pBSSID); +int linux_wlan_set_bssid (struct net_device *wilc_netdev,u8 *pBSSID);/**
@@ -1079,7 +1079,7 @@ static int disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_co#ifdef WILC_P2P tstrWILC_WFIDrv *pstrWFIDrv;#endif -uint8_t NullBssid[ETH_ALEN ] = {0 }; +u8 NullBssid[ETH_ALEN ] = {0 }; connecting =0 ; priv =wiphy_priv (wiphy);
@@ -2198,7 +2198,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)* @version 1.0 */ -void WILC_WFI_p2p_rx (struct net_device *dev,uint8_t *buff,uint32_t size) +void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,uint32_t size) {struct wilc_priv *priv;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -111,7 +111,7 @@ void WILC_WFI_WiphyFree(struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed);int WILC_WFI_DeInitHostInt (struct net_device *net);int WILC_WFI_InitHostInt (struct net_device *net); -void WILC_WFI_monitor_rx (uint8_t *buff,uint32_t size); +void WILC_WFI_monitor_rx (u8 *buff,uint32_t size);int WILC_WFI_deinit_mon_interface (void );struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev);
drivers/staging/wilc1000/wilc_wfi_netdevice.h +5 -5
@@ -171,8 +171,8 @@ typedef struct { } struct_frame_reg;typedef struct { -uint8_t aSrcAddress[ETH_ALEN ]; -uint8_t aBSSID[ETH_ALEN ]; +u8 aSrcAddress[ETH_ALEN ]; +u8 aBSSID[ETH_ALEN ];tstrWILC_WFIDrv *drvHandler;struct net_device *wilc_netdev; }tstrInterfaceInfo ;
@@ -184,9 +184,9 @@ typedef struct {#endif wilc_wlan_oup_t oup;int close; -uint8_t u8NoIfcs; +u8 u8NoIfcs;tstrInterfaceInfo strInterfaceInfo[NUM_CONCURRENT_IFC ]; -uint8_t open_ifcs; +u8 open_ifcs;struct mutex txq_cs;/*Added by Amr - BugID_4720*/
@@ -229,7 +229,7 @@ typedef struct { } linux_wlan_t; typedef struct { - uint8_t u8IfIdx; + u8 u8IfIdx; u8 iftype; int monitor_flag; int mac_opened;
drivers/staging/wilc1000/wilc_wlan.c +29 -29
182 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wlan.h +16 -16
@@ -240,7 +240,7 @@ struct txq_entry_t {struct txq_entry_t *prev;int type;int tcp_PendingAck_index; -uint8_t *buffer; +u8 *buffer;int buffer_size;void *priv;int status;
@@ -249,7 +249,7 @@ struct txq_entry_t {struct rxq_entry_t {struct rxq_entry_t *next; -uint8_t *buffer; +u8 *buffer;int buffer_size; };
@@ -264,15 +264,15 @@ typedef struct {int (*hif_deinit)(void *);int (*hif_read_reg)(uint32_t ,uint32_t *);int (*hif_write_reg)(uint32_t ,uint32_t ); -int (*hif_block_rx)(uint32_t ,uint8_t *,uint32_t ); -int (*hif_block_tx)(uint32_t ,uint8_t *,uint32_t ); +int (*hif_block_rx)(uint32_t ,u8 *,uint32_t ); +int (*hif_block_tx)(uint32_t ,u8 *,uint32_t );int (*hif_sync)(void );int (*hif_clear_int)(void );int (*hif_read_int)(uint32_t *);int (*hif_clear_int_ext)(uint32_t );int (*hif_read_size)(uint32_t *); -int (*hif_block_tx_ext)(uint32_t ,uint8_t *,uint32_t ); -int (*hif_block_rx_ext)(uint32_t ,uint8_t *,uint32_t ); +int (*hif_block_tx_ext)(uint32_t ,u8 *,uint32_t ); +int (*hif_block_rx_ext)(uint32_t ,u8 *,uint32_t );int (*hif_sync_ext)(int );void (*hif_set_max_bus_speed)(void );void (*hif_set_default_bus_speed)(void );
@@ -287,15 +287,15 @@ typedef struct {#define MAX_CFG_FRAME_SIZE 1468typedef struct { -uint8_t ether_header[14 ]; -uint8_t ip_header[20 ]; -uint8_t udp_header[8 ]; -uint8_t wid_header[8 ]; -uint8_t frame[MAX_CFG_FRAME_SIZE ]; +u8 ether_header[14 ]; +u8 ip_header[20 ]; +u8 udp_header[8 ]; +u8 wid_header[8 ]; +u8 frame[MAX_CFG_FRAME_SIZE ]; }wilc_cfg_frame_t ;typedef struct { -int (*wlan_tx)(uint8_t *,uint32_t ,wilc_tx_complete_func_t ); +int (*wlan_tx)(u8 *,uint32_t ,wilc_tx_complete_func_t ); }wilc_wlan_cfg_func_t ; typedef struct {
@@ -304,10 +304,10 @@ typedef struct { } wilc_cfg_rsp_t;typedef struct { -int (*cfg_wid_set)(uint8_t *,uint32_t ,uint16_t ,uint8_t *,int ); -int (*cfg_wid_get)(uint8_t *,uint32_t ,uint16_t ); -int (*cfg_wid_get_val)(uint16_t ,uint8_t *,uint32_t ); -int (*rx_indicate)(uint8_t *,int ,wilc_cfg_rsp_t *); +int (*cfg_wid_set)(u8 *,uint32_t ,uint16_t ,u8 *,int ); +int (*cfg_wid_get)(u8 *,uint32_t ,uint16_t ); +int (*cfg_wid_get_val)(uint16_t ,u8 *,uint32_t ); +int (*rx_indicate)(u8 *,int ,wilc_cfg_rsp_t *);int (*cfg_init)(wilc_debug_func ); }wilc_cfg_func_t ;
drivers/staging/wilc1000/wilc_wlan_cfg.c +59 -59
230 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wlan_cfg.h +1 -1
@@ -27,7 +27,7 @@ typedef struct {typedef struct {uint32_t id; -uint8_t *str; +u8 *str; }wilc_cfg_str_t ;#endif
drivers/staging/wilc1000/wilc_wlan_if.h +13 -13
@@ -78,12 +78,12 @@ typedef struct { uint32_t address: 17; uint32_t count: 9;/* } bit; */ -uint8_t *buffer; +u8 *buffer;uint32_t block_size; } sdio_cmd53_t;typedef struct { -void (*os_debug)(uint8_t *); +void (*os_debug)(u8 *);int (*os_wait)(void *,u32 ); }wilc_wlan_os_func_t ;
@@ -100,15 +100,15 @@ typedef struct { } sdio;struct {int (*spi_max_speed)(void ); -int (*spi_tx)(uint8_t *,uint32_t ); -int (*spi_rx)(uint8_t *,uint32_t ); -int (*spi_trx)(uint8_t *,uint8_t *,uint32_t ); +int (*spi_tx)(u8 *,uint32_t ); +int (*spi_rx)(u8 *,uint32_t ); +int (*spi_trx)(u8 *,u8 *,uint32_t ); } spi; } u; } wilc_wlan_io_func_t;typedef struct { -void (*rx_indicate)(uint8_t *,uint32_t ,uint32_t ); +void (*rx_indicate)(u8 *,uint32_t ,uint32_t );void (*rx_complete)(void ); }wilc_wlan_net_func_t ;
@@ -156,7 +156,7 @@ typedef struct {struct tx_complete_data {int size;void *buff; -uint8_t *pBssid; +u8 *pBssid;struct sk_buff *skb; };
@@ -166,20 +166,20 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);#define WILC_TX_ERR_NO_BUF (-2)typedef struct { -int (*wlan_firmware_download)(const uint8_t *,uint32_t ); +int (*wlan_firmware_download)(const u8 *,uint32_t );int (*wlan_start)(void );int (*wlan_stop)(void ); -int (*wlan_add_to_tx_que)(void *,uint8_t *,uint32_t ,wilc_tx_complete_func_t ); +int (*wlan_add_to_tx_que)(void *,u8 *,uint32_t ,wilc_tx_complete_func_t );int (*wlan_handle_tx_que)(uint32_t *);void (*wlan_handle_rx_que)(void );void (*wlan_handle_rx_isr)(void );void (*wlan_cleanup)(void ); -int (*wlan_cfg_set)(int ,uint32_t ,uint8_t *,uint32_t ,int ,uint32_t ); +int (*wlan_cfg_set)(int ,uint32_t ,u8 *,uint32_t ,int ,uint32_t );int (*wlan_cfg_get)(int ,uint32_t ,int ,uint32_t ); -int (*wlan_cfg_get_value)(uint32_t ,uint8_t *,uint32_t ); +int (*wlan_cfg_get_value)(uint32_t ,u8 *,uint32_t );/*Bug3959: transmitting mgmt frames received from host*/ #if defined(WILC_AP_EXTERNAL_MLME ) || defined(WILC_P2P ) -int (*wlan_add_mgmt_to_tx_que)(void *,uint8_t *,uint32_t ,wilc_tx_complete_func_t ); +int (*wlan_add_mgmt_to_tx_que)(void *,u8 *,uint32_t ,wilc_tx_complete_func_t );#endif }wilc_wlan_oup_t ;
@@ -939,7 +939,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup);void wilc_bus_set_max_speed (void );void wilc_bus_set_default_speed (void ); -uint32_t wilc_get_chipid (uint8_t update); +uint32_t wilc_get_chipid (u8 update);#endif
Signature · 1 line
2.5.1
PATCH 5/18 staging: wilc1000: use u16 instead of uint16_t
In reply to Chaehyun LimThis patch replaces uint16_t with u16 that is preferred kernel type.
--- drivers/staging/wilc1000/wilc_spi.c | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 12 ++++++------ drivers/staging/wilc1000/wilc_wlan.h | 6 +++--- drivers/staging/wilc1000/wilc_wlan_cfg.c | 18 +++++++++--------- drivers/staging/wilc1000/wilc_wlan_cfg.h | 8 ++++---- 5 files changed, 23 insertions(+), 23 deletions(-)
drivers/staging/wilc1000/wilc_spi.c +1 -1
@@ -453,7 +453,7 @@ static int spi_cmd_complete(u8 cmd, uint32_t adr, u8 *b, uint32_t sz, u8 clockleif ((cmd ==CMD_INTERNAL_READ ) || (cmd ==CMD_SINGLE_READ ) || (cmd ==CMD_DMA_READ ) || (cmd ==CMD_DMA_EXT_READ )) {int retry; -/* uint16_t crc1, crc2; */ +/* u16 crc1, crc2; */ u8 crc[2 ];/** * Data Respnose header
drivers/staging/wilc1000/wilc_wlan.c +6 -6
@@ -285,9 +285,9 @@ struct Ack_session_info;struct Ack_session_info {uint32_t Ack_seq_num;uint32_t Bigger_Ack_num; -uint16_t src_port; -uint16_t dst_port; -uint16_t status; +u16 src_port; +u16 dst_port; +u16 status; }; typedef struct {
@@ -1848,7 +1848,7 @@ static int wilc_wlan_cfg_set(int start, uint32_t wid, u8 *buffer, uint32_t buffe p->cfg_frame_offset =0 ; offset = p->cfg_frame_offset; - ret_size = p->cif_func.cfg_wid_set (p->cfg_frame.frame, offset, (uint16_t )wid, buffer, buffer_size); + ret_size = p->cif_func.cfg_wid_set (p->cfg_frame.frame, offset, (u16 )wid, buffer, buffer_size); offset += ret_size; p->cfg_frame_offset = offset;
@@ -1887,7 +1887,7 @@ static int wilc_wlan_cfg_get(int start, uint32_t wid, int commit, uint32_t drvHa p->cfg_frame_offset =0 ; offset = p->cfg_frame_offset; - ret_size = p->cif_func.cfg_wid_get (p->cfg_frame.frame, offset, (uint16_t )wid); + ret_size = p->cif_func.cfg_wid_get (p->cfg_frame.frame, offset, (u16 )wid); offset += ret_size; p->cfg_frame_offset = offset;
@@ -1917,7 +1917,7 @@ static int wilc_wlan_cfg_get_val(uint32_t wid, u8 *buffer, uint32_t buffer_size)wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;int ret; - ret = p->cif_func.cfg_wid_get_val ((uint16_t )wid, buffer, buffer_size); + ret = p->cif_func.cfg_wid_get_val ((u16 )wid, buffer, buffer_size);return ret; }
drivers/staging/wilc1000/wilc_wlan.h +3 -3
@@ -304,9 +304,9 @@ typedef struct { } wilc_cfg_rsp_t;typedef struct { -int (*cfg_wid_set)(u8 *,uint32_t ,uint16_t ,u8 *,int ); -int (*cfg_wid_get)(u8 *,uint32_t ,uint16_t ); -int (*cfg_wid_get_val)(uint16_t ,u8 *,uint32_t ); +int (*cfg_wid_set)(u8 *,uint32_t ,u16 ,u8 *,int ); +int (*cfg_wid_get)(u8 *,uint32_t ,u16 ); +int (*cfg_wid_get_val)(u16 ,u8 *,uint32_t );int (*rx_indicate)(u8 *,int ,wilc_cfg_rsp_t *);int (*cfg_init)(wilc_debug_func ); }wilc_cfg_func_t ;
drivers/staging/wilc1000/wilc_wlan_cfg.c +9 -9
@@ -160,7 +160,7 @@ static wilc_cfg_str_t g_cfg_str[] = {* ********************************************/ -static int wilc_wlan_cfg_set_byte (u8 *frame,uint32_t offset,uint16_t id,u8 val8) +static int wilc_wlan_cfg_set_byte (u8 *frame,uint32_t offset,u16 id,u8 val8) {u8 *buf;
@@ -176,7 +176,7 @@ static int wilc_wlan_cfg_set_byte(u8 *frame, uint32_t offset, uint16_t id, u8 vareturn 4 ; } -static int wilc_wlan_cfg_set_hword (u8 *frame,uint32_t offset,uint16_t id,uint16_t val16) +static int wilc_wlan_cfg_set_hword (u8 *frame,uint32_t offset,u16 id,u16 val16) {u8 *buf;
@@ -194,7 +194,7 @@ static int wilc_wlan_cfg_set_hword(u8 *frame, uint32_t offset, uint16_t id, uintreturn 5 ; } -static int wilc_wlan_cfg_set_word (u8 *frame,uint32_t offset,uint16_t id,uint32_t val32) +static int wilc_wlan_cfg_set_word (u8 *frame,uint32_t offset,u16 id,uint32_t val32) {u8 *buf;
@@ -214,7 +214,7 @@ static int wilc_wlan_cfg_set_word(u8 *frame, uint32_t offset, uint16_t id, uint3return 7 ; } -static int wilc_wlan_cfg_set_str (u8 *frame,uint32_t offset,uint16_t id,u8 *str,uint32_t size) +static int wilc_wlan_cfg_set_str (u8 *frame,uint32_t offset,u16 id,u8 *str,uint32_t size) {u8 *buf;
@@ -233,7 +233,7 @@ static int wilc_wlan_cfg_set_str(u8 *frame, uint32_t offset, uint16_t id, u8 *streturn (size +3 ); } -static int wilc_wlan_cfg_set_bin (u8 *frame,uint32_t offset,uint16_t id,u8 *b,uint32_t size) +static int wilc_wlan_cfg_set_bin (u8 *frame,uint32_t offset,u16 id,u8 *b,uint32_t size) {u8 *buf;uint32_t i;
@@ -385,7 +385,7 @@ static int wilc_wlan_parse_info_frame(u8 *info, int size)* ********************************************/ -static int wilc_wlan_cfg_set_wid (u8 *frame,uint32_t offset,uint16_t id,u8 *buf,int size) +static int wilc_wlan_cfg_set_wid (u8 *frame,uint32_t offset,u16 id,u8 *buf,int size) {u8 type = (id >>12 ) &0xf ;int ret =0 ;
@@ -395,7 +395,7 @@ static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, uint16_t id, u8 *bu ret =wilc_wlan_cfg_set_byte (frame, offset, id, *buf); }else if (type ==1 ) {/* half word command */ if (size >=2 ) - ret =wilc_wlan_cfg_set_hword (frame, offset, id, *((uint16_t *)buf)); + ret =wilc_wlan_cfg_set_hword (frame, offset, id, *((u16 *)buf)); }else if (type ==2 ) {/* word command */ if (size >=4 ) ret =wilc_wlan_cfg_set_word (frame, offset, id, *((uint32_t *)buf));
@@ -410,7 +410,7 @@ static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, uint16_t id, u8 *bureturn ret; } -static int wilc_wlan_cfg_get_wid (u8 *frame,uint32_t offset,uint16_t id) +static int wilc_wlan_cfg_get_wid (u8 *frame,uint32_t offset,u16 id) {u8 *buf;
@@ -425,7 +425,7 @@ static int wilc_wlan_cfg_get_wid(u8 *frame, uint32_t offset, uint16_t id)return 2 ; } -static int wilc_wlan_cfg_get_wid_value (uint16_t wid,u8 *buffer,uint32_t buffer_size) +static int wilc_wlan_cfg_get_wid_value (u16 wid,u8 *buffer,uint32_t buffer_size) {uint32_t type = (wid >>12 ) &0xf ;int i, ret =0 ;
drivers/staging/wilc1000/wilc_wlan_cfg.h +4 -4
@@ -11,13 +11,13 @@#define WILC_WLAN_CFG_H typedef struct { -uint16_t id; -uint16_t val; +u16 id; +u16 val; }wilc_cfg_byte_t ;typedef struct { -uint16_t id; -uint16_t val; +u16 id; +u16 val; }wilc_cfg_hword_t ; typedef struct {
Signature · 1 line
2.5.1
PATCH 6/18 staging: wilc1000: use u32 instead of uint32_t
In reply to Chaehyun LimThis patch replaces uint32_t with u32 that is a preferred kernel type.
--- drivers/staging/wilc1000/host_interface.c | 4 +- drivers/staging/wilc1000/linux_mon.c | 4 +- drivers/staging/wilc1000/linux_wlan.c | 10 +- drivers/staging/wilc1000/linux_wlan_spi.c | 6 +- drivers/staging/wilc1000/linux_wlan_spi.h | 4 +- drivers/staging/wilc1000/wilc_sdio.c | 64 +++++----- drivers/staging/wilc1000/wilc_spi.c | 66 +++++----- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 2 +- drivers/staging/wilc1000/wilc_wlan.c | 148 +++++++++++----------- drivers/staging/wilc1000/wilc_wlan.h | 30 ++--- drivers/staging/wilc1000/wilc_wlan_cfg.c | 30 ++--- drivers/staging/wilc1000/wilc_wlan_cfg.h | 6 +- drivers/staging/wilc1000/wilc_wlan_if.h | 52 ++++---- 14 files changed, 216 insertions(+), 216 deletions(-)
drivers/staging/wilc1000/host_interface.c +2 -2
@@ -3380,7 +3380,7 @@ static void Handle_GetLinkspeed(tstrWILC_WFIDrv *drvHandler)s32 Handle_GetStatistics (tstrWILC_WFIDrv *drvHandler,tstrStatistics *pstrStatistics) {tstrWID strWIDList[5 ]; -uint32_t u32WidsCount =0 , s32Error =0 ; +u32 u32WidsCount =0 , s32Error =0 ; strWIDList[u32WidsCount].u16WIDid =WID_LINKSPEED ; strWIDList[u32WidsCount].enuWIDtype =WID_CHAR ;
@@ -7460,7 +7460,7 @@ s32 host_int_edit_station(tstrWILC_WFIDrv *hWFIDrv, tstrWILC_AddStaParam *pstrSt return s32Error; }#endif /*WILC_AP_EXTERNAL_MLME*/ -uint32_t wilc_get_chipid (u8 ); +u32 wilc_get_chipid (u8 );s32 host_int_set_power_mgmt (tstrWILC_WFIDrv *hWFIDrv,bool bIsEnabled,u32 u32Timeout) {
drivers/staging/wilc1000/linux_mon.c +2 -2
@@ -54,9 +54,9 @@ u8 broadcast[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};#define IS_MGMT_STATUS_SUCCES 0x040#define GET_PKT_OFFSET (a) (((a) >> 22) & 0x1ff) -void WILC_WFI_monitor_rx (u8 *buff,uint32_t size) +void WILC_WFI_monitor_rx (u8 *buff,u32 size) { -uint32_t header, pkt_offset; +u32 header, pkt_offset;struct sk_buff *skb =NULL ;struct wilc_wfi_radiotap_hdr *hdr;struct wilc_wfi_radiotap_cb_hdr *cb_hdr;
drivers/staging/wilc1000/linux_wlan.c +5 -5
@@ -110,11 +110,11 @@ static struct semaphore close_exit_sync;static int wlan_deinit_locks (linux_wlan_t *nic);static void wlan_deinitialize_threads (linux_wlan_t *nic); -extern void WILC_WFI_monitor_rx (u8 *buff,uint32_t size); -extern void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,uint32_t size); +extern void WILC_WFI_monitor_rx (u8 *buff,u32 size); +extern void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,u32 size);static void linux_wlan_tx_complete (void *priv,int status); -void frmw_to_linux (u8 *buff,uint32_t size,uint32_t pkt_offset); +void frmw_to_linux (u8 *buff,u32 size,u32 pkt_offset);static int mac_init_fn (struct net_device *ndev);int mac_xmit (struct sk_buff *skb,struct net_device *dev);int mac_open (struct net_device *ndev);
@@ -1963,7 +1963,7 @@ done:return s32Error; } -void frmw_to_linux (u8 *buff,uint32_t size,uint32_t pkt_offset) +void frmw_to_linux (u8 *buff,u32 size,u32 pkt_offset) {unsigned int frame_len =0 ;
@@ -2042,7 +2042,7 @@ void frmw_to_linux(u8 *buff, uint32_t size, uint32_t pkt_offset)#endif } -void WILC_WFI_mgmt_rx (u8 *buff,uint32_t size) +void WILC_WFI_mgmt_rx (u8 *buff,u32 size) {int i =0 ;perInterface_wlan_t *nic;
drivers/staging/wilc1000/linux_wlan_spi.c +3 -3
@@ -38,7 +38,7 @@#define MAX_SPEED 6000000#endif /* WILC_ASIC_A0 */ -static uint32_t SPEED =MIN_SPEED ; +static u32 SPEED =MIN_SPEED ;struct spi_device *wilc_spi_dev;void linux_spi_deinit (void *vp);
@@ -115,7 +115,7 @@ int linux_spi_init(void *vp)#if defined(TXRX_PHASE_SIZE ) -int linux_spi_write (u8 *b,uint32_t len) +int linux_spi_write (u8 *b,u32 len) {int ret;
@@ -194,7 +194,7 @@ int linux_spi_write(u8 *b, uint32_t len) }#else -int linux_spi_write (u8 *b,uint32_t len) +int linux_spi_write (u8 *b,u32 len) {int ret;
drivers/staging/wilc1000/linux_wlan_spi.h +2 -2
@@ -7,8 +7,8 @@ extern struct spi_driver wilc_bus;int linux_spi_init (void *vp);void linux_spi_deinit (void *vp); -int linux_spi_write (u8 *b,uint32_t len); -int linux_spi_read (u8 *rb,uint32_t rlen); +int linux_spi_write (u8 *b,u32 len); +int linux_spi_read (u8 *rb,u32 rlen);int linux_spi_write_read (unsigned char *wb,unsigned char *rb,unsigned int rlen);int linux_spi_set_max_speed (void );#endif
drivers/staging/wilc1000/wilc_sdio.c +32 -32
222 lines not on this page · raw message
drivers/staging/wilc1000/wilc_spi.c +33 -33
225 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +3 -3
@@ -162,7 +162,7 @@ void clear_shadow_scan(void *pUserVoid) } -uint32_t get_rssi_avg (tstrNetworkInfo *pstrNetworkInfo) +u32 get_rssi_avg (tstrNetworkInfo *pstrNetworkInfo) {u8 i;int rssi_v =0 ;
@@ -301,7 +301,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); -uint32_t ap_index =0 ; +u32 ap_index =0 ;u8 rssi_index =0 ;if (u32LastScannedNtwrksCountShadow >=MAX_NUM_SCANNED_NETWORKS_SHADOW ) {
@@ -2198,7 +2198,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)* @version 1.0 */ -void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,uint32_t size) +void WILC_WFI_p2p_rx (struct net_device *dev,u8 *buff,u32 size) {struct wilc_priv *priv;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +1 -1
@@ -111,7 +111,7 @@ void WILC_WFI_WiphyFree(struct net_device *net);int WILC_WFI_update_stats (struct wiphy *wiphy,u32 pktlen,u8 changed);int WILC_WFI_DeInitHostInt (struct net_device *net);int WILC_WFI_InitHostInt (struct net_device *net); -void WILC_WFI_monitor_rx (u8 *buff,uint32_t size); +void WILC_WFI_monitor_rx (u8 *buff,u32 size);int WILC_WFI_deinit_mon_interface (void );struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev);
drivers/staging/wilc1000/wilc_wlan.c +74 -74
424 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wlan.h +15 -15
@@ -227,7 +227,7 @@* Debug Type * ********************************************/ -typedef void (*wilc_debug_func )(uint32_t ,char *, ...); +typedef void (*wilc_debug_func )(u32 ,char *, ...);/******************************************** *
@@ -262,17 +262,17 @@ struct rxq_entry_t { typedef struct { int (*hif_init)(wilc_wlan_inp_t *, wilc_debug_func); int (*hif_deinit)(void *); - int (*hif_read_reg)(uint32_t, uint32_t *); - int (*hif_write_reg)(uint32_t, uint32_t); - int (*hif_block_rx)(uint32_t, u8 *, uint32_t); - int (*hif_block_tx)(uint32_t, u8 *, uint32_t); + int (*hif_read_reg)(u32, u32 *); + int (*hif_write_reg)(u32, u32); + int (*hif_block_rx)(u32, u8 *, u32); + int (*hif_block_tx)(u32, u8 *, u32); int (*hif_sync)(void); int (*hif_clear_int)(void); - int (*hif_read_int)(uint32_t *); - int (*hif_clear_int_ext)(uint32_t); - int (*hif_read_size)(uint32_t *); - int (*hif_block_tx_ext)(uint32_t, u8 *, uint32_t); - int (*hif_block_rx_ext)(uint32_t, u8 *, uint32_t); + int (*hif_read_int)(u32 *); + int (*hif_clear_int_ext)(u32); + int (*hif_read_size)(u32 *); + int (*hif_block_tx_ext)(u32, u8 *, u32); + int (*hif_block_rx_ext)(u32, u8 *, u32); int (*hif_sync_ext)(int); void (*hif_set_max_bus_speed)(void); void (*hif_set_default_bus_speed)(void);
@@ -295,18 +295,18 @@ typedef struct { } wilc_cfg_frame_t;typedef struct { -int (*wlan_tx)(u8 *,uint32_t ,wilc_tx_complete_func_t ); +int (*wlan_tx)(u8 *,u32 ,wilc_tx_complete_func_t ); }wilc_wlan_cfg_func_t ;typedef struct {int type; -uint32_t seq_no; +u32 seq_no; }wilc_cfg_rsp_t ;typedef struct { -int (*cfg_wid_set)(u8 *,uint32_t ,u16 ,u8 *,int ); -int (*cfg_wid_get)(u8 *,uint32_t ,u16 ); -int (*cfg_wid_get_val)(u16 ,u8 *,uint32_t ); +int (*cfg_wid_set)(u8 *,u32 ,u16 ,u8 *,int ); +int (*cfg_wid_get)(u8 *,u32 ,u16 ); +int (*cfg_wid_get_val)(u16 ,u8 *,u32 );int (*rx_indicate)(u8 *,int ,wilc_cfg_rsp_t *);int (*cfg_init)(wilc_debug_func ); }wilc_cfg_func_t ;
drivers/staging/wilc1000/wilc_wlan_cfg.c +15 -15
@@ -160,7 +160,7 @@ static wilc_cfg_str_t g_cfg_str[] = {* ********************************************/ -static int wilc_wlan_cfg_set_byte (u8 *frame,uint32_t offset,u16 id,u8 val8) +static int wilc_wlan_cfg_set_byte (u8 *frame,u32 offset,u16 id,u8 val8) {u8 *buf;
@@ -176,7 +176,7 @@ static int wilc_wlan_cfg_set_byte(u8 *frame, uint32_t offset, u16 id, u8 val8)return 4 ; } -static int wilc_wlan_cfg_set_hword (u8 *frame,uint32_t offset,u16 id,u16 val16) +static int wilc_wlan_cfg_set_hword (u8 *frame,u32 offset,u16 id,u16 val16) {u8 *buf;
@@ -194,7 +194,7 @@ static int wilc_wlan_cfg_set_hword(u8 *frame, uint32_t offset, u16 id, u16 val16return 5 ; } -static int wilc_wlan_cfg_set_word (u8 *frame,uint32_t offset,u16 id,uint32_t val32) +static int wilc_wlan_cfg_set_word (u8 *frame,u32 offset,u16 id,u32 val32) {u8 *buf;
@@ -214,7 +214,7 @@ static int wilc_wlan_cfg_set_word(u8 *frame, uint32_t offset, u16 id, uint32_t vreturn 7 ; } -static int wilc_wlan_cfg_set_str (u8 *frame,uint32_t offset,u16 id,u8 *str,uint32_t size) +static int wilc_wlan_cfg_set_str (u8 *frame,u32 offset,u16 id,u8 *str,u32 size) {u8 *buf;
@@ -233,10 +233,10 @@ static int wilc_wlan_cfg_set_str(u8 *frame, uint32_t offset, u16 id, u8 *str, uireturn (size +3 ); } -static int wilc_wlan_cfg_set_bin (u8 *frame,uint32_t offset,u16 id,u8 *b,uint32_t size) +static int wilc_wlan_cfg_set_bin (u8 *frame,u32 offset,u16 id,u8 *b,u32 size) {u8 *buf; -uint32_t i; +u32 i;u8 checksum =0 ;if ((offset + size +5 ) >=MAX_CFG_FRAME_SIZE )
@@ -268,7 +268,7 @@ static int wilc_wlan_cfg_set_bin(u8 *frame, uint32_t offset, u16 id, u8 *b, uintstatic void wilc_wlan_parse_response_frame (u8 *info,int size) { -uint32_t wid, len =0 , i =0 ; +u32 wid, len =0 , i =0 ;static int seq;while (size >0 ) {
@@ -364,7 +364,7 @@ static void wilc_wlan_parse_response_frame(u8 *info, int size)static int wilc_wlan_parse_info_frame (u8 *info,int size) {wilc_mac_cfg_t *pd = (wilc_mac_cfg_t *)&g_mac; -uint32_t wid, len; +u32 wid, len;int type =WILC_CFG_RSP_STATUS ; wid = info[0 ] | (info[1 ] <<8 );
@@ -385,7 +385,7 @@ static int wilc_wlan_parse_info_frame(u8 *info, int size)* ********************************************/ -static int wilc_wlan_cfg_set_wid (u8 *frame,uint32_t offset,u16 id,u8 *buf,int size) +static int wilc_wlan_cfg_set_wid (u8 *frame,u32 offset,u16 id,u8 *buf,int size) {u8 type = (id >>12 ) &0xf ;int ret =0 ;
@@ -398,7 +398,7 @@ static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, u16 id, u8 *buf, in ret =wilc_wlan_cfg_set_hword (frame, offset, id, *((u16 *)buf)); }else if (type ==2 ) {/* word command */ if (size >=4 ) - ret =wilc_wlan_cfg_set_word (frame, offset, id, *((uint32_t *)buf)); + ret =wilc_wlan_cfg_set_word (frame, offset, id, *((u32 *)buf)); }else if (type ==3 ) {/* string command */ ret =wilc_wlan_cfg_set_str (frame, offset, id, buf, size); }else if (type ==4 ) {/* binary command */
@@ -410,7 +410,7 @@ static int wilc_wlan_cfg_set_wid(u8 *frame, uint32_t offset, u16 id, u8 *buf, inreturn ret; } -static int wilc_wlan_cfg_get_wid (u8 *frame,uint32_t offset,u16 id) +static int wilc_wlan_cfg_get_wid (u8 *frame,u32 offset,u16 id) {u8 *buf;
@@ -425,13 +425,13 @@ static int wilc_wlan_cfg_get_wid(u8 *frame, uint32_t offset, u16 id)return 2 ; } -static int wilc_wlan_cfg_get_wid_value (u16 wid,u8 *buffer,uint32_t buffer_size) +static int wilc_wlan_cfg_get_wid_value (u16 wid,u8 *buffer,u32 buffer_size) { -uint32_t type = (wid >>12 ) &0xf ; +u32 type = (wid >>12 ) &0xf ;int i, ret =0 ;if (wid ==WID_STATUS ) { - *((uint32_t *)buffer) = g_mac.mac_status; + *((u32 *)buffer) = g_mac.mac_status;return 4 ; }
@@ -478,7 +478,7 @@ static int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, uint32_t buffer_sizebreak ;if (g_cfg_str[i].id == wid) { -uint32_t size = g_cfg_str[i].str[0 ]; +u32 size = g_cfg_str[i].str[0 ];if (buffer_size >= size) {if (g_cfg_str[i].id ==WID_SITE_SURVEY_RESULTS ) {
drivers/staging/wilc1000/wilc_wlan_cfg.h +3 -3
@@ -21,12 +21,12 @@ typedef struct { } wilc_cfg_hword_t;typedef struct { -uint32_t id; -uint32_t val; +u32 id; +u32 val; }wilc_cfg_word_t ;typedef struct { -uint32_t id; +u32 id;u8 *str; }wilc_cfg_str_t ;
drivers/staging/wilc1000/wilc_wlan_if.h +26 -26
106 lines not on this page · raw message
Signature · 1 line
2.5.1
PATCH 7/18 staging: wilc1000: remove commented codes
In reply to Chaehyun LimThis patch removes commented codes.
--- drivers/staging/wilc1000/host_interface.h | 13 ------- drivers/staging/wilc1000/linux_mon.c | 59 ------------------------------- drivers/staging/wilc1000/wilc_sdio.c | 2 -- drivers/staging/wilc1000/wilc_spi.c | 4 --- 4 files changed, 78 deletions(-)
drivers/staging/wilc1000/host_interface.h +0 -13
@@ -65,14 +65,6 @@#define WILC_ADD_STA_LENGTH 40/* Not including the rates field cause it has variable length*/ #define SCAN_EVENT_DONE_ABORTED #define NUM_CONCURRENT_IFC 2 -/*****************************************************************************/ -/* Data Types */ -/*****************************************************************************/ -/* typedef unsigned char uint8; */ -/* typedef signed char int8; */ -/* typedef unsigned short uint16; */ -/* typedef unsigned long uint32; */ -/* typedef uint32 Bool; */ typedef struct { u16 cfg_wid;
@@ -192,7 +184,6 @@ typedef enum {typedef enum {WEP , WPARxGtk, -/* WPATxGtk, */ WPAPtk,PMKSA , }tenuKeyType ;
@@ -350,8 +341,6 @@ typedef struct {tenuHostIFstate enuHostIFstate; -/* bool bPendingConnRequest; */ -#ifndef CONNECT_DIRECT u32 u32SurveyResultsCount;wid_site_survey_reslts_s astrSurveyResults[MAX_NUM_SCANNED_NETWORKS ];
@@ -414,8 +403,6 @@ typedef struct {u16 u16FlagsSet;/*<! Decoded according to tenuWILC_StaFlag */ } tstrWILC_AddStaParam; -/* extern void CfgDisconnected(void* pUserVoid, u16 u16reason, u8 * ie, size_t ie_len); */ -/*****************************************************************************/ /* */ /* Host Interface API */
drivers/staging/wilc1000/linux_mon.c +0 -59
139 lines not on this page · raw message
drivers/staging/wilc1000/wilc_sdio.c +0 -2
@@ -753,9 +753,7 @@ static int sdio_read_int(u32 *int_status)* Read IRQ flags **/ #ifndef WILC_SDIO_IRQ_GPIO -/* cmd.read_write = 0; */ cmd.function =1 ; -/* cmd.raw = 0; */ cmd.address =0x04 ; cmd.data =0 ; g_sdio.sdio_cmd52 (&cmd);
drivers/staging/wilc1000/wilc_spi.c +0 -4
@@ -10,10 +10,6 @@#include "wilc_wlan_if.h" #include "wilc_wlan.h" -/* -* #include <linux/kernel.h> -* #include <linux/string.h> -*/ typedef struct { void *os_context; int (*spi_tx)(u8 *, u32);
Signature · 1 line
2.5.1
PATCH 8/18 staging: wilc1000: remove useless extern declarations
In reply to Chaehyun LimThis patch removes useless extern declarations. This function is not existed in the driver.
--- drivers/staging/wilc1000/host_interface.c | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/host_interface.c +0 -2
@@ -1,8 +1,6 @@#include "host_interface.h" #include "coreconfigurator.h" -extern s32 TransportInit (void ); -extern s32 TransportDeInit (void );extern u8 connecting;#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
Signature · 1 line
2.5.1
PATCH 9/18 staging: wilc1000: use BIT macro
In reply to Chaehyun LimThis patch replaces bit shift with BIT(x) macro.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +8 -8
@@ -11,14 +11,14 @@#include "wilc_wfi_netdevice.h" /* The following macros describe the bitfield map used by the firmware to determine its 11i mode */ -#define NO_ENCRYPT 0 -#define ENCRYPT_ENABLED (1 << 0) -#define WEP (1 << 1) -#define WEP_EXTENDED (1 << 2) -#define WPA (1 << 3) -#define WPA2 (1 << 4) -#define AES (1 << 5) -#define TKIP (1 << 6) +#define NO_ENCRYPT 0 +#define ENCRYPT_ENABLED BIT(0) +#define WEP BIT(1) +#define WEP_EXTENDED BIT(2) +#define WPA BIT(3) +#define WPA2 BIT(4) +#define AES BIT(5) +#define TKIP BIT(6)#ifdef WILC_P2P /* #define USE_SUPPLICANT_GO_INTENT */
Signature · 1 line
2.5.1
PATCH 10/18 staging: wilc1000: remove bit shift macro that is custom defined
In reply to Chaehyun LimThis patch remove bit shift macro that is custom defined, then it is replaced BIT(x) macro.
--- drivers/staging/wilc1000/host_interface.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
drivers/staging/wilc1000/host_interface.h +3 -7
@@ -19,10 +19,6 @@#define IP_ALEN 4 -#define BIT2 ((u32)(1 << 2)) -#define BIT1 ((u32)(1 << 1)) -#define BIT0 ((u32)(1 << 0)) -#define IDLE_MODE 0x00#define AP_MODE 0x01#define STATION_MODE 0x02
@@ -36,9 +32,9 @@#define MIN_SCAN_TIME 10#define MAX_SCAN_TIME 1200#define DEFAULT_SCAN 0 -#define USER_SCAN BIT0 -#define OBSS_PERIODIC_SCAN BIT1 -#define OBSS_ONETIME_SCAN BIT2 +#define USER_SCAN BIT(0) +#define OBSS_PERIODIC_SCAN BIT(1) +#define OBSS_ONETIME_SCAN BIT(2)#define GTK_RX_KEY_BUFF_LEN 24#define ADDKEY 0x1#define REMOVEKEY 0x2
Signature · 1 line
2.5.1
PATCH 11/18 staging: wilc1000: remove unused defines
In reply to Chaehyun LimThe macros are not used anywhere in this driver, so just delete it.
--- drivers/staging/wilc1000/host_interface.h | 2 -- 1 file changed, 2 deletions(-)
drivers/staging/wilc1000/host_interface.h +0 -2
@@ -14,8 +14,6 @@/*****************************************************************************/ /* Macros */ /*****************************************************************************/ -#define FAIL 0x0000 -#define SUCCESS 0x0001#define IP_ALEN 4
Signature · 1 line
2.5.1
PATCH 12/18 staging: wilc1000: fix alignment of defines
In reply to Chaehyun LimThis patch fix alignment of defines.
--- drivers/staging/wilc1000/host_interface.h | 42 +++++++++++++++---------------- 1 file changed, 21 insertions(+), 21 deletions(-)
drivers/staging/wilc1000/host_interface.h +21 -21
@@ -20,11 +20,11 @@#define IDLE_MODE 0x00#define AP_MODE 0x01#define STATION_MODE 0x02 -#define GO_MODE 0x03 +#define GO_MODE 0x03#define CLIENT_MODE 0x04 -#define MAX_NUM_STA 9 +#define MAX_NUM_STA 9#define ACTIVE_SCAN_TIME 10#define PASSIVE_SCAN_TIME 1200#define MIN_SCAN_TIME 10
@@ -34,31 +34,31 @@#define OBSS_PERIODIC_SCAN BIT(1)#define OBSS_ONETIME_SCAN BIT(2)#define GTK_RX_KEY_BUFF_LEN 24 -#define ADDKEY 0x1 -#define REMOVEKEY 0x2 -#define DEFAULTKEY 0x4 -#define ADDKEY_AP 0x8 -#define MAX_NUM_SCANNED_NETWORKS 100/* 30 // rachel */ -#define MAX_NUM_SCANNED_NETWORKS_SHADOW 130 -#define MAX_NUM_PROBED_SSID 10/*One more than the number of scanned ssids*/ +#define ADDKEY 0x1 +#define REMOVEKEY 0x2 +#define DEFAULTKEY 0x4 +#define ADDKEY_AP 0x8 +#define MAX_NUM_SCANNED_NETWORKS 100/* 30 // rachel */ +#define MAX_NUM_SCANNED_NETWORKS_SHADOW 130 +#define MAX_NUM_PROBED_SSID 10/*One more than the number of scanned ssids*/ #define CHANNEL_SCAN_TIME 250/* 250 */ #define TX_MIC_KEY_LEN 8#define RX_MIC_KEY_LEN 8 -#define PTK_KEY_LEN 16 +#define PTK_KEY_LEN 16#define TX_MIC_KEY_MSG_LEN 26#define RX_MIC_KEY_MSG_LEN 48#define PTK_KEY_MSG_LEN 39#define PMKSA_KEY_LEN 22 -#define ETH_ALEN 6 -#define PMKID_LEN 16 -#define WILC_MAX_NUM_PMKIDS 16 -#define WILC_SUPP_MCS_SET_SIZE 16 -#define WILC_ADD_STA_LENGTH 40/* Not including the rates field cause it has variable length*/ +#define ETH_ALEN 6 +#define PMKID_LEN 16 +#define WILC_MAX_NUM_PMKIDS 16 +#define WILC_SUPP_MCS_SET_SIZE 16 +#define WILC_ADD_STA_LENGTH 40/* Not including the rates field cause it has variable length*/ #define SCAN_EVENT_DONE_ABORTED -#define NUM_CONCURRENT_IFC 2 +#define NUM_CONCURRENT_IFC 2 typedef struct { u16 cfg_wid;
@@ -304,11 +304,11 @@ typedef struct { } tstrHostIfRegisterFrame; -#define ACTION 0xD0 -#define PROBE_REQ 0x40 -#define PROBE_RESP 0x50 -#define ACTION_FRM_IDX 0 -#define PROBE_REQ_IDX 1 +#define ACTION 0xD0 +#define PROBE_REQ 0x40 +#define PROBE_RESP 0x50 +#define ACTION_FRM_IDX 0 +#define PROBE_REQ_IDX 1enum p2p_listen_state {
Signature · 1 line
2.5.1
PATCH 13/18 staging: wilc1000: fix alignment of enum
In reply to Chaehyun LimThis patch fix alignment of enum.
--- drivers/staging/wilc1000/host_interface.h | 76 +++++++++++++++---------------- 1 file changed, 38 insertions(+), 38 deletions(-)
drivers/staging/wilc1000/host_interface.h +38 -38
@@ -77,13 +77,13 @@ typedef struct _tstrStatistics {typedef enum { -HOST_IF_IDLE =0 , -HOST_IF_SCANNING =1 , -HOST_IF_CONNECTING =2 , -HOST_IF_WAITING_CONN_RESP =3 , -HOST_IF_CONNECTED =4 , -HOST_IF_P2P_LISTEN =5 , -HOST_IF_FORCE_32BIT =0xFFFFFFFF +HOST_IF_IDLE =0 , +HOST_IF_SCANNING =1 , +HOST_IF_CONNECTING =2 , +HOST_IF_WAITING_CONN_RESP =3 , +HOST_IF_CONNECTED =4 , +HOST_IF_P2P_LISTEN =5 , +HOST_IF_FORCE_32BIT =0xFFFFFFFF }tenuHostIFstate ; typedef struct _tstrHostIFpmkid {
@@ -97,19 +97,19 @@ typedef struct _tstrHostIFpmkidAttr { } tstrHostIFpmkidAttr;typedef enum { -AUTORATE =0 , -MBPS_1 =1 , -MBPS_2 =2 , -MBPS_5_5 =5 , -MBPS_11 =11 , -MBPS_6 =6 , -MBPS_9 =9 , -MBPS_12 =12 , -MBPS_18 =18 , -MBPS_24 =24 , -MBPS_36 =36 , -MBPS_48 =48 , -MBPS_54 =54 +AUTORATE =0 , +MBPS_1 =1 , +MBPS_2 =2 , +MBPS_5_5 =5 , +MBPS_11 =11 , +MBPS_6 =6 , +MBPS_9 =9 , +MBPS_12 =12 , +MBPS_18 =18 , +MBPS_24 =24 , +MBPS_36 =36 , +MBPS_48 =48 , +MBPS_54 =54 }CURRENT_TX_RATE_T ; typedef struct {
@@ -140,23 +140,23 @@ typedef struct {typedef enum {RETRY_SHORT =1 <<0 ,RETRY_LONG =1 <<1 , -FRAG_THRESHOLD =1 <<2 , -RTS_THRESHOLD =1 <<3 , -BSS_TYPE =1 <<4 , -AUTH_TYPE =1 <<5 , -AUTHEN_TIMEOUT =1 <<6 , -POWER_MANAGEMENT =1 <<7 , -PREAMBLE =1 <<8 , -SHORT_SLOT_ALLOWED =1 <<9 , -TXOP_PROT_DISABLE =1 <<10 , -BEACON_INTERVAL =1 <<11 , -DTIM_PERIOD =1 <<12 , -SITE_SURVEY =1 <<13 , -SITE_SURVEY_SCAN_TIME =1 <<14 , -ACTIVE_SCANTIME =1 <<15 , -PASSIVE_SCANTIME =1 <<16 , -CURRENT_TX_RATE =1 <<17 , -HT_ENABLE =1 <<18 , +FRAG_THRESHOLD =1 <<2 , +RTS_THRESHOLD =1 <<3 , +BSS_TYPE =1 <<4 , +AUTH_TYPE =1 <<5 , +AUTHEN_TIMEOUT =1 <<6 , +POWER_MANAGEMENT =1 <<7 , +PREAMBLE =1 <<8 , +SHORT_SLOT_ALLOWED =1 <<9 , +TXOP_PROT_DISABLE =1 <<10 , +BEACON_INTERVAL =1 <<11 , +DTIM_PERIOD =1 <<12 , +SITE_SURVEY =1 <<13 , +SITE_SURVEY_SCAN_TIME =1 <<14 , +ACTIVE_SCANTIME =1 <<15 , +PASSIVE_SCANTIME =1 <<16 , +CURRENT_TX_RATE =1 <<17 , +HT_ENABLE =1 <<18 , }tenuCfgParam ; typedef struct {
@@ -172,7 +172,7 @@ typedef enum {SCAN_EVENT_NETWORK_FOUND = 0,typedef enum {CONN_DISCONN_EVENT_CONN_RESP =0 ,CONN_DISCONN_EVENT_DISCONN_NOTIF =1 , -CONN_DISCONN_EVENT_FORCE_32BIT =0xFFFFFFFF +CONN_DISCONN_EVENT_FORCE_32BIT =0xFFFFFFFF }tenuConnDisconnEvent ; typedef enum {
Signature · 1 line
2.5.1
PATCH 14/18 staging: wilc1000: remove USE_SUPPLICANT_GO_INTENT
In reply to Chaehyun LimThis patch removes USE_SUPPLICANT_GO_INTENT macro that is commented.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +0 -1
@@ -21,7 +21,6 @@#define TKIP BIT(6)#ifdef WILC_P2P -/* #define USE_SUPPLICANT_GO_INTENT */ /*Public action frame index IDs*/ #define FRAME_TYPE_ID 0
Signature · 1 line
2.5.1
PATCH 15/18 staging: wilc1000: remove if defined codes of USE_SUPPLICANT_GO_INTENT
In reply to Chaehyun LimThis patch removes if defined codes of USE_SUPPLICANT_GO_INTENT. This macro is deleted because it is commented out.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 66 ----------------------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 9 ---- 2 files changed, 75 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -66
@@ -2023,51 +2023,18 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)u32 i =0 , j =0 ;/*BugID_5460*/ -#ifdef USE_SUPPLICANT_GO_INTENT -u8 intent; -u8 tie_breaker; -bool is_wilc_go = true; -#endif u8 op_channel_attr_index =0 ;u8 channel_list_attr_index =0 ;while (index < len) {if (buf[index] ==GO_INTENT_ATTR_ID ) { -#ifdef USE_SUPPLICANT_GO_INTENT -/*BugID_5460*/ -/*Case 1: If we are going to be p2p client, no need to modify channels attributes*/ -/*In negotiation frames, go intent attr value determines who will be GO*/ - intent =GET_GO_INTENT (buf[index +3 ]); - tie_breaker =GET_TIE_BREAKER (buf[index +3 ]); -if (intent >SUPPLICANT_GO_INTENT - || (intent ==SUPPLICANT_GO_INTENT && tie_breaker ==1 )) { -PRINT_D (GENERIC_DBG ,"WILC will be client (intent %d tie breaker %d)\n" , intent, tie_breaker); - is_wilc_go = false; - }else { -PRINT_D (GENERIC_DBG ,"WILC will be GO (intent %d tie breaker %d)\n" , intent, tie_breaker); - is_wilc_go = true; - } - -#else /* USE_SUPPLICANT_GO_INTENT */ #ifdef FORCE_P2P_CLIENT buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x0f <<1 );#else buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x00 <<1 );#endif -#endif /* USE_SUPPLICANT_GO_INTENT */ } -#ifdef USE_SUPPLICANT_GO_INTENT -/*Case 2: If group bssid attribute is present, no need to modify channels attributes*/ -/*In invitation req and rsp, group bssid attr presence determines who will be GO*/ -if (buf[index] ==GROUP_BSSID_ATTR_ID ) { -PRINT_D (GENERIC_DBG ,"Group BSSID: %2x:%2x:%2x\n" , buf[index +3 ] - , buf[index +4 ] - , buf[index +5 ]); - is_wilc_go = false; - } -#endif /* USE_SUPPLICANT_GO_INTENT */ -if (buf[index] ==CHANLIST_ATTR_ID ) channel_list_attr_index = index;else if (buf[index] ==OPERCHAN_ATTR_ID )
@@ -2075,11 +2042,7 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len) index += buf[index +1 ] +3 ;/* ID,Length byte */ } -#ifdef USE_SUPPLICANT_GO_INTENT -if (u8WLANChannel !=INVALID_CHANNEL && is_wilc_go) - #elseif (u8WLANChannel !=INVALID_CHANNEL ) -#endif {/*Modify channel list attribute*/ if (channel_list_attr_index) {
@@ -2119,29 +2082,8 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)u8 op_channel_attr_index =0 ;u8 channel_list_attr_index =0 ; -#ifdef USE_SUPPLICANT_GO_INTENT -bool is_wilc_go = false; - -/*BugID_5460*/ -/*Case 1: If we are already p2p client, no need to modify channels attributes*/ -/*This to handle the case of inviting a p2p peer to join an existing group which we are a member in*/ -if (iftype ==CLIENT_MODE ) -return ; -#endif while (index < len) { -#ifdef USE_SUPPLICANT_GO_INTENT -/*Case 2: If group bssid attribute is present, no need to modify channels attributes*/ -/*In invitation req and rsp, group bssid attr presence determines who will be GO*/ -/*Note: If we are already p2p client, group bssid attr may also be present (handled in Case 1)*/ -if (buf[index] ==GROUP_BSSID_ATTR_ID ) { -PRINT_D (GENERIC_DBG ,"Group BSSID: %2x:%2x:%2x\n" , buf[index +3 ] - , buf[index +4 ] - , buf[index +5 ]); - is_wilc_go = true; - } - -#else /* USE_SUPPLICANT_GO_INTENT */ if (buf[index] ==GO_INTENT_ATTR_ID ) {#ifdef FORCE_P2P_CLIENT buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x00 <<1 );
@@ -2151,7 +2093,6 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)break ; } -#endif if (buf[index] ==CHANLIST_ATTR_ID ) channel_list_attr_index = index;
@@ -2160,12 +2101,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype) index += buf[index +1 ] +3 ;/* ID,Length byte */ } -#ifdef USE_SUPPLICANT_GO_INTENT -/*No need to check bOperChan since only transmitted invitation frames are parsed*/ -if (u8WLANChannel !=INVALID_CHANNEL && is_wilc_go) - #elseif (u8WLANChannel !=INVALID_CHANNEL && bOperChan) -#endif {/*Modify channel list attribute*/ if (channel_list_attr_index) {
@@ -2605,10 +2541,8 @@ int mgmt_tx(struct wiphy *wiphy,/*BugID_5460*/ /*If using supplicant go intent, no need at all*/ /*to parse transmitted negotiation frames*/ -#ifndef USE_SUPPLICANT_GO_INTENT else WILC_WFI_CfgParseTxAction(&mgmt_tx->buff[i + 6], len - (i + 6), false, nic->iftype); -#endif break ; } }
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +0 -9
@@ -33,9 +33,6 @@#define GO_INTENT_ATTR_ID 0x04#define CHANLIST_ATTR_ID 0x0b#define OPERCHAN_ATTR_ID 0x11 -#ifdef USE_SUPPLICANT_GO_INTENT -#define GROUP_BSSID_ATTR_ID 0x07 -#endif #define PUB_ACTION_ATTR_ID 0x04#define P2PELEM_ATTR_ID 0xdd
@@ -50,14 +47,8 @@#define GAS_INTIAL_RSP 0x0b#define INVALID_CHANNEL 0 -#ifdef USE_SUPPLICANT_GO_INTENT -#define SUPPLICANT_GO_INTENT 6 -#define GET_GO_INTENT (a) (((a) >> 1) & 0x0f) -#define GET_TIE_BREAKER (a) (((a)) & 0x01) -#else /* #define FORCE_P2P_CLIENT */ #endif -#endif #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ)#define SCAN_RESULT_EXPIRE (40 * HZ)
Signature · 1 line
2.5.1
PATCH 16/18 staging: wilc1000: remove FORCE_P2P_CLIENT
In reply to Chaehyun LimThis patch removes FORCE_P2P_CLIENT that is commented.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 1 - 1 file changed, 1 deletion(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +0 -1
@@ -47,7 +47,6 @@#define GAS_INTIAL_RSP 0x0b#define INVALID_CHANNEL 0 -/* #define FORCE_P2P_CLIENT */ #endif #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ)
Signature · 1 line
2.5.1
PATCH 17/18 staging: wilc1000: remove if defined codes of FORCE_P2P_CLIENT
In reply to Chaehyun LimThis patch removes if defined codes of FORCE_P2P_CLIENT. This macro is deleted because it it commented out.
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +0 -8
@@ -2028,11 +2028,7 @@ void WILC_WFI_CfgParseRxAction(u8 *buf, u32 len)while (index < len) {if (buf[index] ==GO_INTENT_ATTR_ID ) { -#ifdef FORCE_P2P_CLIENT - buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x0f <<1 ); -#else buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x00 <<1 ); -#endif }if (buf[index] ==CHANLIST_ATTR_ID )
@@ -2085,11 +2081,7 @@ void WILC_WFI_CfgParseTxAction(u8 *buf, u32 len, bool bOperChan, u8 iftype)while (index < len) {if (buf[index] ==GO_INTENT_ATTR_ID ) { -#ifdef FORCE_P2P_CLIENT - buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x00 <<1 ); -#else buf[index +3 ] = (buf[index +3 ] &0x01 ) | (0x0f <<1 ); -#endif break ; }
Signature · 1 line
2.5.1
PATCH 18/18 staging: wilc1000: wilc_wfi_cfgoperations.h: align defines
In reply to Chaehyun LimThis patch fix alignment of some defines in wilc_wfi_cfgoperations.h
--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 44 +++++++++++------------ 1 file changed, 22 insertions(+), 22 deletions(-)
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +22 -22
@@ -23,34 +23,34 @@#ifdef WILC_P2P /*Public action frame index IDs*/ -#define FRAME_TYPE_ID 0 -#define ACTION_CAT_ID 24 -#define ACTION_SUBTYPE_ID 25 -#define P2P_PUB_ACTION_SUBTYPE 30 +#define FRAME_TYPE_ID 0 +#define ACTION_CAT_ID 24 +#define ACTION_SUBTYPE_ID 25 +#define P2P_PUB_ACTION_SUBTYPE 30/*Public action frame Attribute IDs*/ -#define ACTION_FRAME 0xd0 -#define GO_INTENT_ATTR_ID 0x04 -#define CHANLIST_ATTR_ID 0x0b -#define OPERCHAN_ATTR_ID 0x11 -#define PUB_ACTION_ATTR_ID 0x04 -#define P2PELEM_ATTR_ID 0xdd +#define ACTION_FRAME 0xd0 +#define GO_INTENT_ATTR_ID 0x04 +#define CHANLIST_ATTR_ID 0x0b +#define OPERCHAN_ATTR_ID 0x11 +#define PUB_ACTION_ATTR_ID 0x04 +#define P2PELEM_ATTR_ID 0xdd/*Public action subtype values*/ -#define GO_NEG_REQ 0x00 -#define GO_NEG_RSP 0x01 -#define GO_NEG_CONF 0x02 -#define P2P_INV_REQ 0x03 -#define P2P_INV_RSP 0x04 -#define PUBLIC_ACT_VENDORSPEC 0x09 -#define GAS_INTIAL_REQ 0x0a -#define GAS_INTIAL_RSP 0x0b +#define GO_NEG_REQ 0x00 +#define GO_NEG_RSP 0x01 +#define GO_NEG_CONF 0x02 +#define P2P_INV_REQ 0x03 +#define P2P_INV_RSP 0x04 +#define PUBLIC_ACT_VENDORSPEC 0x09 +#define GAS_INTIAL_REQ 0x0a +#define GAS_INTIAL_RSP 0x0b -#define INVALID_CHANNEL 0 +#define INVALID_CHANNEL 0#endif #define nl80211_SCAN_RESULT_EXPIRE (3 * HZ) -#define SCAN_RESULT_EXPIRE (40 * HZ) +#define SCAN_RESULT_EXPIRE (40 * HZ)static const u32 cipher_suites[] = {WLAN_CIPHER_SUITE_WEP40 ,
@@ -105,8 +105,8 @@ int WILC_WFI_deinit_mon_interface(void);struct net_device *WILC_WFI_init_mon_interface (const char *name,struct net_device *real_dev);#ifdef TCP_ENHANCEMENTS -#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 -#define DEFAULT_LINK_SPEED 72 +#define TCP_ACK_FILTER_LINK_SPEED_THRESH 54 +#define DEFAULT_LINK_SPEED 72void Enable_TCP_ACK_Filter (bool value);#endif
Signature · 1 line
2.5.1