Re: [PATCH 6/8] staging: lustre: Fix overlong lines
On Jan 11, 2018, at 10:17, Fabian Huegel wrote: > > Fixed four lines that went over the 80 character limit > to reduce checkpatch warnings. > > Signed-off-by: Fabian Huegel > Signed-off-by: Christoph Volkert > --- > drivers/staging/lustre/lustre/include/obd_class.h | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/include/obd_class.h > b/drivers/staging/lustre/lustre/include/obd_class.h > index d195866..06f825b 100644 > --- a/drivers/staging/lustre/lustre/include/obd_class.h > +++ b/drivers/staging/lustre/lustre/include/obd_class.h > @@ -850,7 +850,9 @@ static inline int obd_pool_del(struct obd_device *obd, > char *poolname) > return rc; > } > > -static inline int obd_pool_add(struct obd_device *obd, char *poolname, char > *ostname) > +static inline int obd_pool_add(struct obd_device *obd, > +char *poolname, > +char *ostname) This only needs a single field moved onto the next line, like: +static inline int obd_pool_add(struct obd_device *obd, char *poolname, + char *ostname) > @@ -861,7 +863,9 @@ static inline int obd_pool_add(struct obd_device *obd, > char *poolname, char *ost > return rc; > } > > -static inline int obd_pool_rem(struct obd_device *obd, char *poolname, char > *ostname) > +static inline int obd_pool_rem(struct obd_device *obd, > +char *poolname, > +char *ostname) Same. > @@ -997,7 +1001,8 @@ static inline int obd_statfs(const struct lu_env *env, > struct obd_export *exp, > spin_unlock(&obd->obd_osfs_lock); > } > } else { > - CDEBUG(D_SUPER, "%s: use %p cache blocks %llu/%llu objects > %llu/%llu\n", > + CDEBUG(D_SUPER, > +"%s: use %p cache blocks %llu/%llu objects %llu/%llu\n", > obd->obd_name, &obd->obd_osfs, > obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks, > obd->obd_osfs.os_ffree, obd->obd_osfs.os_files); > @@ -1579,7 +1584,8 @@ int class_procfs_init(void); > int class_procfs_clean(void); > > /* prng.c */ > -#define ll_generate_random_uuid(uuid_out) get_random_bytes(uuid_out, > sizeof(class_uuid_t)) > +#define ll_generate_random_uuid(uuid_out) \ > + get_random_bytes(uuid_out, sizeof(class_uuid_t)) This looks like it would be better to replace ll_generate_random_uuid() callers with generate_random_uuid(). Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel Corporation ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
staging: lustre: Cleanup of obd_class.h
Here are the remaining patches rebased on the current staging-testing. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: lustre: Fix comment style
Most multi-line comments started on the first line, but the preferred linux kernel style is to start multi-line comments on the second line. Some comments became less readable after the change, so we changed them to single-line comments. Signed-off-by: Fabian Huegel Signed-off-by: Christoph Volkert --- drivers/staging/lustre/lustre/include/obd_class.h | 47 +-- 1 file changed, 27 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 199b593..f517a05 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -40,15 +40,12 @@ #include #include -#define OBD_STATFS_NODELAY 0x0001 /* requests should be send without delay -* and resends for avoid deadlocks -*/ -#define OBD_STATFS_FROM_CACHE 0x0002 /* the statfs callback should not update -* obd_osfs_age -*/ -#define OBD_STATFS_FOR_MDT00x0004 /* The statfs is only for retrieving -* information from MDT0. -*/ +/* requests should be send without delay and resends for avoid deadlocks */ +#define OBD_STATFS_NODELAY 0x0001 +/* the statfs callback should not update obd_osfs_age */ +#define OBD_STATFS_FROM_CACHE 0x0002 +/* the statfs is only for retrieving information from MDT0 */ +#define OBD_STATFS_FOR_MDT00x0004 /* OBD Device Declarations */ extern struct obd_device *obd_devs[MAX_OBD_DEVICES]; @@ -137,7 +134,7 @@ int class_config_llog_handler(const struct lu_env *env, struct llog_rec_hdr *rec, void *data); int class_add_uuid(const char *uuid, __u64 nid); -/*obdecho*/ +/* obdecho */ void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); #define CFG_F_START 0x01 /* Set when we start updating from a log */ @@ -182,7 +179,8 @@ struct config_llog_data { struct obd_export *cld_mgcexp; struct mutexcld_lock; int cld_type; - unsigned intcld_stopping:1, /* we were told to stop + unsigned intcld_stopping:1, /* +* we were told to stop * watching */ cld_lostlock:1; /* lock not requeued */ @@ -301,7 +299,8 @@ void obdo_to_ioobj(const struct obdo *oa, struct obd_ioobj *ioobj); #define MDP(dev, op)(dev)->obd_type->typ_md_ops->op #define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op -/* Ensure obd_setup: used for cleanup which must be called +/* + * Ensure obd_setup: used for cleanup which must be called * while obd is stopping */ static inline int obd_check_dev(struct obd_device *obd) @@ -588,7 +587,8 @@ static inline int obd_cleanup(struct obd_device *obd) static inline void obd_cleanup_client_import(struct obd_device *obd) { - /* If we set up but never connected, the + /* +* If we set up but never connected, the * client import will not have been cleaned. */ down_write(&obd->u.cli.cl_sem); @@ -727,7 +727,8 @@ static inline struct obd_uuid *obd_get_uuid(struct obd_export *exp) return uuid; } -/** Create a new /a exp on device /a obd for the uuid /a cluuid +/* + * Create a new /a exp on device /a obd for the uuid /a cluuid * @param exp New export handle * @param d Connect data, supported flags are set, flags also understood *by obd are returned. @@ -739,7 +740,8 @@ static inline int obd_connect(const struct lu_env *env, void *localdata) { int rc; - __u64 ocf = data ? data->ocd_connect_flags : 0; /* for post-condition + __u64 ocf = data ? data->ocd_connect_flags : 0; /* +* for post-condition * check */ @@ -908,7 +910,8 @@ static inline int obd_destroy_export(struct obd_export *exp) return 0; } -/* @max_age is the oldest time in jiffies that we accept using a cached data. +/* + * @max_age is the oldest time in jiffies that we accept using a cached data. * If the cache is older than @max_age we will get a new value from the * target. Use a value of "cfs_time_current() + HZ" to guarantee freshness. */ @@ -969,7 +972,8 @@ static inline int obd_statfs_rqset(struct obd_export *exp, return rc; } -/* @max_age is the oldest time in jiffies that we accept using a cached data. +/* + * @max_age is the oldest time in jiffies that we accept using a cached data. * If the cache is ol
[PATCH 2/2] staging: lustre: Align struct member identifiers
This patch properly left aligns all member identifiers in every struct defined in obd_class.h for better readability. Signed-off-by: Fabian Huegel Signed-off-by: Christoph Volkert --- drivers/staging/lustre/lustre/include/obd_class.h | 44 +++ 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index f517a05..531e8dd 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -145,13 +145,13 @@ void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars); /* Passed as data param to class_config_parse_llog */ struct config_llog_instance { - char *cfg_obdname; - void *cfg_instance; + char *cfg_obdname; + void *cfg_instance; struct super_block *cfg_sb; struct obd_uuid cfg_uuid; llog_cb_t cfg_callback; - int cfg_last_idx; /* for partial llog processing */ - int cfg_flags; + int cfg_last_idx; /* for partial llog processing */ + int cfg_flags; }; int class_config_parse_llog(const struct lu_env *env, struct llog_ctxt *ctxt, @@ -169,31 +169,31 @@ enum { /* list of active configuration logs */ struct config_llog_data { - struct ldlm_res_idcld_resid; + struct ldlm_res_id cld_resid; struct config_llog_instance cld_cfg; - struct list_head cld_list_chain; - atomic_tcld_refcount; + struct list_headcld_list_chain; + atomic_tcld_refcount; struct config_llog_data*cld_sptlrpc;/* depended sptlrpc log */ struct config_llog_data*cld_params; /* common parameters log */ struct config_llog_data*cld_recover;/* imperative recover log */ - struct obd_export *cld_mgcexp; + struct obd_export *cld_mgcexp; struct mutexcld_lock; - int cld_type; - unsigned intcld_stopping:1, /* -* we were told to stop -* watching -*/ - cld_lostlock:1; /* lock not requeued */ - charcld_logname[0]; + int cld_type; + unsigned intcld_stopping:1, /* +* we were told to stop +* watching +*/ + cld_lostlock:1; /* lock not requeued */ + charcld_logname[0]; }; struct lustre_profile { - struct list_head lp_list; - char*lp_profile; - char*lp_dt; - char*lp_md; - int lp_refs; - boollp_list_deleted; + struct list_head lp_list; + char*lp_profile; + char*lp_dt; + char*lp_md; + int lp_refs; + bool lp_list_deleted; }; struct lustre_profile *class_get_profile(const char *prof); @@ -1544,7 +1544,7 @@ struct lwp_register_item { struct obd_export **lri_exp; register_lwp_cb lri_cb_func; void *lri_cb_data; - struct list_headlri_list; + struct list_headlri_list; charlri_name[MTI_NAME_MAXLEN]; }; -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 14/14] staging: wilc1000: rename Handle_ConnectTimeout() and Handle_Key()
fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 15fca67..49f35f7 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1159,7 +1159,7 @@ static s32 handle_connect(struct wilc_vif *vif, return result; } -static s32 Handle_ConnectTimeout(struct wilc_vif *vif) +static s32 handle_connect_timeout(struct wilc_vif *vif) { s32 result = 0; struct connect_info conn_info; @@ -1519,7 +1519,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, return result; } -static int Handle_Key(struct wilc_vif *vif, +static int handle_key(struct wilc_vif *vif, struct key_attr *pstrHostIFkeyAttr) { s32 result = 0; @@ -2505,7 +2505,7 @@ static void host_if_work(struct work_struct *work) break; case HOST_IF_MSG_KEY: - Handle_Key(msg->vif, &msg->body.key_info); + handle_key(msg->vif, &msg->body.key_info); break; case HOST_IF_MSG_CFG_PARAMS: @@ -2572,7 +2572,7 @@ static void host_if_work(struct work_struct *work) break; case HOST_IF_MSG_CONNECT_TIMER_FIRED: - Handle_ConnectTimeout(msg->vif); + handle_connect_timeout(msg->vif); break; case HOST_IF_MSG_POWER_MGMT: -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 10/14] staging: wilc1000: rename ptstrJoinBssParam variable to avoid camelCase
fix "Avoid camelCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 78 +++ 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 4ddd1a8..cc27b5a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -909,7 +909,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, struct wid wid_list[8]; u32 wid_cnt = 0, dummyval = 0; u8 *cur_byte = NULL; - struct join_bss_param *ptstrJoinBssParam; + struct join_bss_param *j_bss_param; struct host_if_drv *hif_drv = vif->hif_drv; if (memcmp(attr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { @@ -918,8 +918,8 @@ static s32 Handle_Connect(struct wilc_vif *vif, return result; } - ptstrJoinBssParam = attr->params; - if (!ptstrJoinBssParam) { + j_bss_param = attr->params; + if (!j_bss_param) { netdev_err(vif->ndev, "Required BSSID not found\n"); result = -ENOENT; goto ERRORHANDLER; @@ -1027,8 +1027,8 @@ static s32 Handle_Connect(struct wilc_vif *vif, netdev_err(vif->ndev, "Channel out of range\n"); *(cur_byte++) = 0xFF; } - *(cur_byte++) = (ptstrJoinBssParam->cap_info) & 0xFF; - *(cur_byte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF; + *(cur_byte++) = (j_bss_param->cap_info) & 0xFF; + *(cur_byte++) = ((j_bss_param->cap_info) >> 8) & 0xFF; if (attr->bssid) memcpy(cur_byte, attr->bssid, 6); @@ -1038,57 +1038,57 @@ static s32 Handle_Connect(struct wilc_vif *vif, memcpy(cur_byte, attr->bssid, 6); cur_byte += 6; - *(cur_byte++) = (ptstrJoinBssParam->beacon_period) & 0xFF; - *(cur_byte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF; - *(cur_byte++) = ptstrJoinBssParam->dtim_period; + *(cur_byte++) = (j_bss_param->beacon_period) & 0xFF; + *(cur_byte++) = ((j_bss_param->beacon_period) >> 8) & 0xFF; + *(cur_byte++) = j_bss_param->dtim_period; - memcpy(cur_byte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + 1); + memcpy(cur_byte, j_bss_param->supp_rates, MAX_RATES_SUPPORTED + 1); cur_byte += (MAX_RATES_SUPPORTED + 1); - *(cur_byte++) = ptstrJoinBssParam->wmm_cap; - *(cur_byte++) = ptstrJoinBssParam->uapsd_cap; + *(cur_byte++) = j_bss_param->wmm_cap; + *(cur_byte++) = j_bss_param->uapsd_cap; - *(cur_byte++) = ptstrJoinBssParam->ht_capable; - hif_drv->usr_conn_req.ht_capable = ptstrJoinBssParam->ht_capable; + *(cur_byte++) = j_bss_param->ht_capable; + hif_drv->usr_conn_req.ht_capable = j_bss_param->ht_capable; - *(cur_byte++) = ptstrJoinBssParam->rsn_found; - *(cur_byte++) = ptstrJoinBssParam->rsn_grp_policy; - *(cur_byte++) = ptstrJoinBssParam->mode_802_11i; + *(cur_byte++) = j_bss_param->rsn_found; + *(cur_byte++) = j_bss_param->rsn_grp_policy; + *(cur_byte++) = j_bss_param->mode_802_11i; - memcpy(cur_byte, ptstrJoinBssParam->rsn_pcip_policy, sizeof(ptstrJoinBssParam->rsn_pcip_policy)); - cur_byte += sizeof(ptstrJoinBssParam->rsn_pcip_policy); + memcpy(cur_byte, j_bss_param->rsn_pcip_policy, sizeof(j_bss_param->rsn_pcip_policy)); + cur_byte += sizeof(j_bss_param->rsn_pcip_policy); - memcpy(cur_byte, ptstrJoinBssParam->rsn_auth_policy, sizeof(ptstrJoinBssParam->rsn_auth_policy)); - cur_byte += sizeof(ptstrJoinBssParam->rsn_auth_policy); + memcpy(cur_byte, j_bss_param->rsn_auth_policy, sizeof(j_bss_param->rsn_auth_policy)); + cur_byte += sizeof(j_bss_param->rsn_auth_policy); - memcpy(cur_byte, ptstrJoinBssParam->rsn_cap, sizeof(ptstrJoinBssParam->rsn_cap)); - cur_byte += sizeof(ptstrJoinBssParam->rsn_cap); + memcpy(cur_byte, j_bss_param->rsn_cap, sizeof(j_bss_param->rsn_cap)); + cur_byte += sizeof(j_bss_param->rsn_cap); *(cur_byte++) = REAL_JOIN_REQ; - *(cur_byte++) = ptstrJoinBssParam->noa_enabled; + *(cur_byte++) = j_bss_param->noa_enabled; - if (ptstrJoinBssParam->noa_enabled) { - *(cur_byte++) = (ptstrJoinBssParam->tsf) & 0xFF; - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 8) & 0xFF; - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 16) & 0xFF; - *(cur_byte++) = ((ptstrJoinBssParam->tsf) >> 24) & 0xFF; + if (j_bss_param->noa_enabled) { + *(cur_byte++) = (j_bss_param->tsf) & 0xFF; + *(cur_byte++) = ((j_bss_param->tsf) >> 8) & 0xFF; + *(cur_byte++) = ((j_bss_param->tsf) >> 16) & 0xFF; + *(cur_byte++) = ((j_bss_param->tsf) >> 24) & 0xFF; - *(
[PATCH 00/14] fix to remove unnecessary parenthesis, typedef and avoid camelCase
This patch series contains changes to fix issues reported by checkpatch.pl script. Ajay Singh (14): staging: wilc1000: remove unnecessary use of parentheses staging: wilc1000: removed unnecessary defined enums typedef staging: wilc1000: fix alignments to match open parenthesis staging: wilc1000: rename host_int_ParseJoinBssParam() and it's variable using camelCase staging: wilc1000: rename camelCase used in Handle_DelAllSta() and its variable staging: wilc1000: rename strWIDList variable to wid_list to avoid camelCase staging: wilc1000: rename u32WidsCount variable to avoid camelCase staging: wilc1000: rename pu8CurrByte variable to avoid camelCase staging: wilc1000: rename pstrHostIFconnectAttr argument to avoid camelCase staging: wilc1000: rename ptstrJoinBssParam variable to avoid camelCase staging: wilc1000: rename strConnectInfo variable to avoid camelCase staging: wilc1000: rename Handle_ScanDone() to avoid camelCase staging: wilc1000: rename Handle_Connect() to avoid camelCase staging: wilc1000: rename Handle_ConnectTimeout() and Handle_Key() drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/host_interface.c | 936 +++--- drivers/staging/wilc1000/linux_wlan.c | 10 +- drivers/staging/wilc1000/wilc_sdio.c | 4 +- drivers/staging/wilc1000/wilc_spi.c | 20 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 64 +- drivers/staging/wilc1000/wilc_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan_cfg.c | 6 +- drivers/staging/wilc1000/wilc_wlan_if.h | 72 +- 9 files changed, 555 insertions(+), 561 deletions(-) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 13/14] staging: wilc1000: rename Handle_Connect() to avoid camelCase
fix "Avoid camelcase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 5ea7c4b..15fca67 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -902,7 +902,7 @@ static s32 handle_scan_done(struct wilc_vif *vif, } u8 wilc_connected_ssid[6] = {0}; -static s32 Handle_Connect(struct wilc_vif *vif, +static s32 handle_connect(struct wilc_vif *vif, struct connect_attr *attr) { s32 result = 0; @@ -2492,7 +2492,7 @@ static void host_if_work(struct work_struct *work) break; case HOST_IF_MSG_CONNECT: - Handle_Connect(msg->vif, &msg->body.con_info); + handle_connect(msg->vif, &msg->body.con_info); break; case HOST_IF_MSG_RCVD_NTWRK_INFO: -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 04/14] staging: wilc1000: rename host_int_ParseJoinBssParam() and it's variable using camelCase
fix "Avoid CamelCase:" issue reported by checkpatch.pl script Rename host_int_ParseJoinBssParam() & its variables name using camelCase. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 230 +++--- 1 file changed, 115 insertions(+), 115 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 358354b..9f6365a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -265,7 +265,7 @@ static struct wilc_vif *join_req_vif; #define FLUSHED_JOIN_REQ 1 #define FLUSHED_BYTE_POS 79 -static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo); +static void *host_parse_join_bss_param(struct network_info *info); static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); static s32 Handle_ScanDone(struct wilc_vif *vif, enum scan_event enuEvent); static void host_if_work(struct work_struct *work); @@ -1288,7 +1288,7 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif, hif_drv->usr_scan_req.rcvd_ch_cnt++; pstrNetworkInfo->new_network = true; - pJoinParams = host_int_ParseJoinBssParam(pstrNetworkInfo); + pJoinParams = host_parse_join_bss_param(pstrNetworkInfo); hif_drv->usr_scan_req.scan_result(SCAN_EVENT_NETWORK_FOUND, pstrNetworkInfo, hif_drv->usr_scan_req.arg, @@ -3870,152 +3870,152 @@ int wilc_setup_multicast_filter(struct wilc_vif *vif, bool enabled, return result; } -static void *host_int_ParseJoinBssParam(struct network_info *ptstrNetworkInfo) +static void *host_parse_join_bss_param(struct network_info *info) { - struct join_bss_param *pNewJoinBssParam = NULL; - u8 *pu8IEs; - u16 u16IEsLen; + struct join_bss_param *param = NULL; + u8 *ies; + u16 ies_len; u16 index = 0; - u8 suppRatesNo = 0; - u8 extSuppRatesNo; - u16 jumpOffset; - u8 pcipherCount; - u8 authCount; - u8 pcipherTotalCount = 0; - u8 authTotalCount = 0; + u8 rates_no = 0; + u8 ext_rates_no; + u16 offset; + u8 pcipher_cnt; + u8 auth_cnt; + u8 pcipher_total_cnt = 0; + u8 auth_total_cnt = 0; u8 i, j; - pu8IEs = ptstrNetworkInfo->ies; - u16IEsLen = ptstrNetworkInfo->ies_len; - - pNewJoinBssParam = kzalloc(sizeof(*pNewJoinBssParam), GFP_KERNEL); - if (pNewJoinBssParam) { - pNewJoinBssParam->dtim_period = ptstrNetworkInfo->dtim_period; - pNewJoinBssParam->beacon_period = ptstrNetworkInfo->beacon_period; - pNewJoinBssParam->cap_info = ptstrNetworkInfo->cap_info; - memcpy(pNewJoinBssParam->bssid, ptstrNetworkInfo->bssid, 6); - memcpy((u8 *)pNewJoinBssParam->ssid, ptstrNetworkInfo->ssid, - ptstrNetworkInfo->ssid_len + 1); - pNewJoinBssParam->ssid_len = ptstrNetworkInfo->ssid_len; - memset(pNewJoinBssParam->rsn_pcip_policy, 0xFF, 3); - memset(pNewJoinBssParam->rsn_auth_policy, 0xFF, 3); - - while (index < u16IEsLen) { - if (pu8IEs[index] == SUPP_RATES_IE) { - suppRatesNo = pu8IEs[index + 1]; - pNewJoinBssParam->supp_rates[0] = suppRatesNo; + ies = info->ies; + ies_len = info->ies_len; + + param = kzalloc(sizeof(*param), GFP_KERNEL); + if (param) { + param->dtim_period = info->dtim_period; + param->beacon_period = info->beacon_period; + param->cap_info = info->cap_info; + memcpy(param->bssid, info->bssid, 6); + memcpy((u8 *)param->ssid, info->ssid, + info->ssid_len + 1); + param->ssid_len = info->ssid_len; + memset(param->rsn_pcip_policy, 0xFF, 3); + memset(param->rsn_auth_policy, 0xFF, 3); + + while (index < ies_len) { + if (ies[index] == SUPP_RATES_IE) { + rates_no = ies[index + 1]; + param->supp_rates[0] = rates_no; index += 2; - for (i = 0; i < suppRatesNo; i++) - pNewJoinBssParam->supp_rates[i + 1] = pu8IEs[index + i]; + for (i = 0; i < rates_no; i++) + param->supp_rates[i + 1] = ies[index + i]; - index += suppRatesNo; - } else if (pu8IEs[index] == EXT_SUPP_RATES_IE) { - extSuppRatesNo = pu8IEs[index + 1]; -
[PATCH 08/14] staging: wilc1000: rename pu8CurrByte variable to avoid camelCase
fix "Avoid camelCase" issue reported by checkpatch.pl script. rename variable name from "pu8CurrByte" to "cur_byte" Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 232 +++--- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 912d223..e3931bc 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -908,7 +908,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, s32 result = 0; struct wid wid_list[8]; u32 wid_cnt = 0, dummyval = 0; - u8 *pu8CurrByte = NULL; + u8 *cur_byte = NULL; struct join_bss_param *ptstrJoinBssParam; struct host_if_drv *hif_drv = vif->hif_drv; @@ -1016,90 +1016,90 @@ static s32 Handle_Connect(struct wilc_vif *vif, goto ERRORHANDLER; } - pu8CurrByte = wid_list[wid_cnt].val; + cur_byte = wid_list[wid_cnt].val; if (pstrHostIFconnectAttr->ssid) { - memcpy(pu8CurrByte, pstrHostIFconnectAttr->ssid, pstrHostIFconnectAttr->ssid_len); - pu8CurrByte[pstrHostIFconnectAttr->ssid_len] = '\0'; + memcpy(cur_byte, pstrHostIFconnectAttr->ssid, pstrHostIFconnectAttr->ssid_len); + cur_byte[pstrHostIFconnectAttr->ssid_len] = '\0'; } - pu8CurrByte += MAX_SSID_LEN; - *(pu8CurrByte++) = INFRASTRUCTURE; + cur_byte += MAX_SSID_LEN; + *(cur_byte++) = INFRASTRUCTURE; if (pstrHostIFconnectAttr->ch >= 1 && pstrHostIFconnectAttr->ch <= 14) { - *(pu8CurrByte++) = pstrHostIFconnectAttr->ch; + *(cur_byte++) = pstrHostIFconnectAttr->ch; } else { netdev_err(vif->ndev, "Channel out of range\n"); - *(pu8CurrByte++) = 0xFF; + *(cur_byte++) = 0xFF; } - *(pu8CurrByte++) = (ptstrJoinBssParam->cap_info) & 0xFF; - *(pu8CurrByte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF; + *(cur_byte++) = (ptstrJoinBssParam->cap_info) & 0xFF; + *(cur_byte++) = ((ptstrJoinBssParam->cap_info) >> 8) & 0xFF; if (pstrHostIFconnectAttr->bssid) - memcpy(pu8CurrByte, pstrHostIFconnectAttr->bssid, 6); - pu8CurrByte += 6; + memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); + cur_byte += 6; if (pstrHostIFconnectAttr->bssid) - memcpy(pu8CurrByte, pstrHostIFconnectAttr->bssid, 6); - pu8CurrByte += 6; + memcpy(cur_byte, pstrHostIFconnectAttr->bssid, 6); + cur_byte += 6; - *(pu8CurrByte++) = (ptstrJoinBssParam->beacon_period) & 0xFF; - *(pu8CurrByte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF; - *(pu8CurrByte++) = ptstrJoinBssParam->dtim_period; + *(cur_byte++) = (ptstrJoinBssParam->beacon_period) & 0xFF; + *(cur_byte++) = ((ptstrJoinBssParam->beacon_period) >> 8) & 0xFF; + *(cur_byte++) = ptstrJoinBssParam->dtim_period; - memcpy(pu8CurrByte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + 1); - pu8CurrByte += (MAX_RATES_SUPPORTED + 1); + memcpy(cur_byte, ptstrJoinBssParam->supp_rates, MAX_RATES_SUPPORTED + 1); + cur_byte += (MAX_RATES_SUPPORTED + 1); - *(pu8CurrByte++) = ptstrJoinBssParam->wmm_cap; - *(pu8CurrByte++) = ptstrJoinBssParam->uapsd_cap; + *(cur_byte++) = ptstrJoinBssParam->wmm_cap; + *(cur_byte++) = ptstrJoinBssParam->uapsd_cap; - *(pu8CurrByte++) = ptstrJoinBssParam->ht_capable; + *(cur_byte++) = ptstrJoinBssParam->ht_capable; hif_drv->usr_conn_req.ht_capable = ptstrJoinBssParam->ht_capable; - *(pu8CurrByte++) = ptstrJoinBssParam->rsn_found; - *(pu8CurrByte++) = ptstrJoinBssParam->rsn_grp_policy; - *(pu8CurrByte++) = ptstrJoinBssParam->mode_802_11i; + *(cur_byte++) = ptstrJoinBssParam->rsn_found; + *(cur_byte++) = ptstrJoinBssParam->rsn_grp_policy; + *(cur_byte++) = ptstrJoinBssParam->mode_802_11i; - memcpy(pu8CurrByte, ptstrJoinBssParam->rsn_pcip_policy, sizeof(ptstrJoinBssParam->rsn_pcip_policy)); - pu8CurrByte += sizeof(ptstrJoinBssParam->rsn_pcip_policy); + memcpy(cur_byte, ptstrJoinBssParam->rsn_pcip_policy, sizeof(ptstrJoinBssParam->rsn_pcip_policy)); + cur_byte += sizeof(ptstrJoinBssParam->rsn_pcip_policy); - memcpy(pu8CurrByte, ptstrJoinBssParam->rsn_auth_policy, sizeof(ptstrJoinBssParam->rsn_auth_policy)); - pu8CurrByte += sizeof(ptstrJoinBssParam->rsn_auth_policy); + memcpy(cur_byte, ptstrJoinBssParam->rsn_auth_policy, sizeof(ptstrJoinBssParam->rsn_auth_policy)); + cur_byte += sizeof(ptstrJoinBssParam->rsn_auth_policy); - memcpy(pu8CurrByte, ptstrJoinBssParam->rsn_cap, sizeof(ptstrJoinBssParam->rsn_cap)); - pu8CurrByte += sizeof(ptstrJoinBssParam->rsn_c
[PATCH 11/14] staging: wilc1000: rename strConnectInfo variable to avoid camelCase
fix "Avoid camelCase" issue reported by checkpatch.pl script. In this patch rename "strConnectInfo" variable to resolve issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 74 +++ 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index cc27b5a..d017c86 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -1116,30 +1116,30 @@ static s32 Handle_Connect(struct wilc_vif *vif, ERRORHANDLER: if (result) { - struct connect_info strConnectInfo; + struct connect_info conn_info; del_timer(&hif_drv->connect_timer); - memset(&strConnectInfo, 0, sizeof(struct connect_info)); + memset(&conn_info, 0, sizeof(struct connect_info)); if (attr->result) { if (attr->bssid) - memcpy(strConnectInfo.bssid, attr->bssid, 6); + memcpy(conn_info.bssid, attr->bssid, 6); if (attr->ies) { - strConnectInfo.req_ies_len = attr->ies_len; - strConnectInfo.req_ies = kmalloc(attr->ies_len, GFP_KERNEL); - memcpy(strConnectInfo.req_ies, attr->ies, attr->ies_len); + conn_info.req_ies_len = attr->ies_len; + conn_info.req_ies = kmalloc(attr->ies_len, GFP_KERNEL); + memcpy(conn_info.req_ies, attr->ies, attr->ies_len); } attr->result(CONN_DISCONN_EVENT_CONN_RESP, - &strConnectInfo, + &conn_info, MAC_DISCONNECTED, NULL, attr->arg); hif_drv->hif_state = HOST_IF_IDLE; - kfree(strConnectInfo.req_ies); - strConnectInfo.req_ies = NULL; + kfree(conn_info.req_ies); + conn_info.req_ies = NULL; } else { netdev_err(vif->ndev, "Connect callback is NULL\n"); @@ -1162,7 +1162,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, static s32 Handle_ConnectTimeout(struct wilc_vif *vif) { s32 result = 0; - struct connect_info strConnectInfo; + struct connect_info conn_info; struct wid wid; u16 u16DummyReasonCode = 0; struct host_if_drv *hif_drv = vif->hif_drv; @@ -1176,30 +1176,30 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif) scan_while_connected = false; - memset(&strConnectInfo, 0, sizeof(struct connect_info)); + memset(&conn_info, 0, sizeof(struct connect_info)); if (hif_drv->usr_conn_req.conn_result) { if (hif_drv->usr_conn_req.bssid) { - memcpy(strConnectInfo.bssid, + memcpy(conn_info.bssid, hif_drv->usr_conn_req.bssid, 6); } if (hif_drv->usr_conn_req.ies) { - strConnectInfo.req_ies_len = hif_drv->usr_conn_req.ies_len; - strConnectInfo.req_ies = kmalloc(hif_drv->usr_conn_req.ies_len, GFP_KERNEL); - memcpy(strConnectInfo.req_ies, + conn_info.req_ies_len = hif_drv->usr_conn_req.ies_len; + conn_info.req_ies = kmalloc(hif_drv->usr_conn_req.ies_len, GFP_KERNEL); + memcpy(conn_info.req_ies, hif_drv->usr_conn_req.ies, hif_drv->usr_conn_req.ies_len); } hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_CONN_RESP, - &strConnectInfo, + &conn_info, MAC_DISCONNECTED, NULL, hif_drv->usr_conn_req.arg); - kfree(strConnectInfo.req_ies); - strConnectInfo.req_ies = NULL; + kfree(conn_info.req_ies); + conn_info.req_ies = NULL; } else { netdev_err(vif->ndev, "Connect callback is NULL\n"); } @@ -1324,7 +1324,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, u8 u8MacStatus; u8 u8MacStatusReasonCode; u8 u8MacStatusAdditionalInfo; - stru
[PATCH 12/14] staging: wilc1000: rename Handle_ScanDone() to avoid camelCase
fix "Avoid camelCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index d017c86..5ea7c4b 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -267,7 +267,7 @@ static struct wilc_vif *join_req_vif; static void *host_parse_join_bss_param(struct network_info *info); static int host_int_get_ipaddress(struct wilc_vif *vif, u8 *ip_addr, u8 idx); -static s32 Handle_ScanDone(struct wilc_vif *vif, enum scan_event enuEvent); +static s32 handle_scan_done(struct wilc_vif *vif, enum scan_event enuEvent); static void host_if_work(struct work_struct *work); /*! @@ -847,7 +847,7 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info) ERRORHANDLER: if (result) { del_timer(&hif_drv->scan_timer); - Handle_ScanDone(vif, SCAN_EVENT_ABORTED); + handle_scan_done(vif, SCAN_EVENT_ABORTED); } kfree(scan_info->ch_freq_list); @@ -863,8 +863,8 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info) return result; } -static s32 Handle_ScanDone(struct wilc_vif *vif, - enum scan_event enuEvent) +static s32 handle_scan_done(struct wilc_vif *vif, + enum scan_event enuEvent) { s32 result = 0; u8 u8abort_running_scan; @@ -1461,7 +1461,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, if (hif_drv->usr_scan_req.scan_result) { del_timer(&hif_drv->scan_timer); - Handle_ScanDone(vif, SCAN_EVENT_ABORTED); + handle_scan_done(vif, SCAN_EVENT_ABORTED); } strDisconnectNotifInfo.reason = 0; @@ -1509,7 +1509,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, (hif_drv->usr_scan_req.scan_result)) { del_timer(&hif_drv->scan_timer); if (hif_drv->usr_scan_req.scan_result) - Handle_ScanDone(vif, SCAN_EVENT_ABORTED); + handle_scan_done(vif, SCAN_EVENT_ABORTED); } } @@ -2526,7 +2526,7 @@ static void host_if_work(struct work_struct *work) if (!wilc_wlan_get_num_conn_ifcs(wilc)) wilc_chip_sleep_manually(wilc); - Handle_ScanDone(msg->vif, SCAN_EVENT_DONE); + handle_scan_done(msg->vif, SCAN_EVENT_DONE); if (msg->vif->hif_drv->remain_on_ch_pending) Handle_RemainOnChan(msg->vif, @@ -2568,7 +2568,7 @@ static void host_if_work(struct work_struct *work) break; case HOST_IF_MSG_SCAN_TIMER_FIRED: - Handle_ScanDone(msg->vif, SCAN_EVENT_ABORTED); + handle_scan_done(msg->vif, SCAN_EVENT_ABORTED); break; case HOST_IF_MSG_CONNECT_TIMER_FIRED: -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 05/14] staging: wilc1000: rename camelCase used in Handle_DelAllSta() and its variable
fix "Avoid camelCase" issue reported by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 9f6365a..1ac079a 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -2123,34 +2123,34 @@ static void Handle_AddStation(struct wilc_vif *vif, kfree(wid.val); } -static void Handle_DelAllSta(struct wilc_vif *vif, -struct del_all_sta *pstrDelAllStaParam) +static void handle_del_all_sta(struct wilc_vif *vif, + struct del_all_sta *param) { s32 result = 0; struct wid wid; - u8 *pu8CurrByte; + u8 *curr_byte; u8 i; - u8 au8Zero_Buff[6] = {0}; + u8 zero_buff[6] = {0}; wid.id = (u16)WID_DEL_ALL_STA; wid.type = WID_STR; - wid.size = (pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1; + wid.size = (param->assoc_sta * ETH_ALEN) + 1; - wid.val = kmalloc((pstrDelAllStaParam->assoc_sta * ETH_ALEN) + 1, GFP_KERNEL); + wid.val = kmalloc((param->assoc_sta * ETH_ALEN) + 1, GFP_KERNEL); if (!wid.val) goto ERRORHANDLER; - pu8CurrByte = wid.val; + curr_byte = wid.val; - *(pu8CurrByte++) = pstrDelAllStaParam->assoc_sta; + *(curr_byte++) = param->assoc_sta; for (i = 0; i < MAX_NUM_STA; i++) { - if (memcmp(pstrDelAllStaParam->del_all_sta[i], au8Zero_Buff, ETH_ALEN)) - memcpy(pu8CurrByte, pstrDelAllStaParam->del_all_sta[i], ETH_ALEN); + if (memcmp(param->del_all_sta[i], zero_buff, ETH_ALEN)) + memcpy(curr_byte, param->del_all_sta[i], ETH_ALEN); else continue; - pu8CurrByte += ETH_ALEN; + curr_byte += ETH_ALEN; } result = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, @@ -2626,7 +2626,7 @@ static void host_if_work(struct work_struct *work) break; case HOST_IF_MSG_DEL_ALL_STA: - Handle_DelAllSta(msg->vif, &msg->body.del_all_sta_info); + handle_del_all_sta(msg->vif, &msg->body.del_all_sta_info); break; case HOST_IF_MSG_SET_TX_POWER: -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 03/14] staging: wilc1000: fix alignments to match open parenthesis
fix "Alignment should match open parenthesis" issues reported by checkpatch.pl script. changes to comply with linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 4 +-- drivers/staging/wilc1000/linux_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 38 +++ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 46e2d55..358354b 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -3730,8 +3730,8 @@ int wilc_add_station(struct wilc_vif *vif, struct add_sta_param *sta_param) memcpy(add_sta_info, sta_param, sizeof(struct add_sta_param)); if (add_sta_info->rates_len > 0) { add_sta_info->rates = kmemdup(sta_param->rates, - add_sta_info->rates_len, - GFP_KERNEL); + add_sta_info->rates_len, + GFP_KERNEL); if (!add_sta_info->rates) return -ENOMEM; } diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c index 3c3f1863..d9725ef 100644 --- a/drivers/staging/wilc1000/linux_wlan.c +++ b/drivers/staging/wilc1000/linux_wlan.c @@ -695,7 +695,7 @@ static int wlan_initialize_threads(struct net_device *dev) wilc = vif->wilc; wilc->txq_thread = kthread_run(linux_wlan_txq_task, (void *)dev, -"K_TXQ_TASK"); + "K_TXQ_TASK"); if (IS_ERR(wilc->txq_thread)) { netdev_err(dev, "couldn't create TXQ thread\n"); wilc->close = 0; diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index fb4a142..621810d 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -470,10 +470,10 @@ static void CfgScanResult(enum scan_event scan_event, int wilc_connecting; static void cfg_connect_result(enum conn_event conn_disconn_evt, -struct connect_info *conn_info, -u8 mac_status, -struct disconnect_info *disconn_info, -void *priv_data) + struct connect_info *conn_info, + u8 mac_status, + struct disconnect_info *disconn_info, + void *priv_data) { struct wilc_priv *priv; struct net_device *dev; @@ -623,18 +623,18 @@ static int scan(struct wiphy *wiphy, struct cfg80211_scan_request *request) } } ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN, -au8ScanChanList, -request->n_channels, -(const u8 *)request->ie, -request->ie_len, CfgScanResult, -(void *)priv, &strHiddenNetwork); + au8ScanChanList, + request->n_channels, + (const u8 *)request->ie, + request->ie_len, CfgScanResult, + (void *)priv, &strHiddenNetwork); } else { ret = wilc_scan(vif, USER_SCAN, ACTIVE_SCAN, -au8ScanChanList, -request->n_channels, -(const u8 *)request->ie, -request->ie_len, CfgScanResult, -(void *)priv, NULL); + au8ScanChanList, + request->n_channels, + (const u8 *)request->ie, + request->ie_len, CfgScanResult, + (void *)priv, NULL); } } else { netdev_err(priv->dev, "Requested scanned channels over\n"); @@ -793,11 +793,11 @@ static int connect(struct wiphy *wiphy, struct net_device *dev, wilc_wlan_set_bssid(dev, pstrNetworkInfo->bssid, STATION_MODE); ret = wilc_set_join_req(vif, pstrNetworkInfo->bssid, sme->ssid, -sme->ssid_len, sme->ie, sme->ie_len, -cfg_connect_result, (void *)priv, -
[PATCH 01/14] staging: wilc1000: remove unnecessary use of parentheses
fix "Unnecessary parentheses around" issue found by checkpatch.pl script.Remove the unnecessary parentheses to follow linux coding style. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/coreconfigurator.c | 2 +- drivers/staging/wilc1000/host_interface.c | 34 +++ drivers/staging/wilc1000/linux_wlan.c | 8 +++--- drivers/staging/wilc1000/wilc_sdio.c | 4 +-- drivers/staging/wilc1000/wilc_spi.c | 20 ++--- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 26 - drivers/staging/wilc1000/wilc_wlan.c | 2 +- drivers/staging/wilc1000/wilc_wlan_cfg.c | 6 ++-- 8 files changed, 51 insertions(+), 51 deletions(-) diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c index 8cf886d..e98fc8e 100644 --- a/drivers/staging/wilc1000/coreconfigurator.c +++ b/drivers/staging/wilc1000/coreconfigurator.c @@ -201,7 +201,7 @@ static inline u16 get_cap_info(u8 *data) st = get_sub_type(data); - if ((st == BEACON) || (st == PROBE_RSP)) + if (st == BEACON || st == PROBE_RSP) index += TIME_STAMP_LEN + BEACON_INTERVAL_LEN; cap_info = data[index]; diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 4ff1a59..46e2d55 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -394,7 +394,7 @@ static void handle_set_operation_mode(struct wilc_vif *vif, ret = wilc_send_config_pkt(vif, SET_CFG, &wid, 1, wilc_get_vif_idx(vif)); - if ((hif_op_mode->mode) == IDLE_MODE) + if (hif_op_mode->mode == IDLE_MODE) complete(&hif_driver_comp); if (ret) @@ -760,8 +760,8 @@ static s32 handle_scan(struct wilc_vif *vif, struct scan_attr *scan_info) hif_drv->usr_scan_req.scan_result = scan_info->result; hif_drv->usr_scan_req.arg = scan_info->arg; - if ((hif_drv->hif_state >= HOST_IF_SCANNING) && - (hif_drv->hif_state < HOST_IF_CONNECTED)) { + if (hif_drv->hif_state >= HOST_IF_SCANNING && + hif_drv->hif_state < HOST_IF_CONNECTED) { netdev_err(vif->ndev, "Already scan\n"); result = -EBUSY; goto ERRORHANDLER; @@ -1025,7 +1025,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, pu8CurrByte += MAX_SSID_LEN; *(pu8CurrByte++) = INFRASTRUCTURE; - if ((pstrHostIFconnectAttr->ch >= 1) && (pstrHostIFconnectAttr->ch <= 14)) { + if (pstrHostIFconnectAttr->ch >= 1 && pstrHostIFconnectAttr->ch <= 14) { *(pu8CurrByte++) = pstrHostIFconnectAttr->ch; } else { netdev_err(vif->ndev, "Channel out of range\n"); @@ -1258,8 +1258,8 @@ static s32 Handle_RcvdNtwrkInfo(struct wilc_vif *vif, if (hif_drv->usr_scan_req.scan_result) { wilc_parse_network_info(pstrRcvdNetworkInfo->buffer, &pstrNetworkInfo); - if ((!pstrNetworkInfo) || - (!hif_drv->usr_scan_req.scan_result)) { + if (!pstrNetworkInfo || + !hif_drv->usr_scan_req.scan_result) { netdev_err(vif->ndev, "driver is null\n"); result = -EINVAL; goto done; @@ -1340,8 +1340,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, return -ENODEV; } - if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) || - (hif_drv->hif_state == HOST_IF_CONNECTED) || + if (hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP || + hif_drv->hif_state == HOST_IF_CONNECTED || hif_drv->usr_scan_req.scan_result) { if (!pstrRcvdGnrlAsyncInfo->buffer || !hif_drv->usr_conn_req.conn_result) { @@ -1400,8 +1400,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, } } - if ((u8MacStatus == MAC_CONNECTED) && - (strConnectInfo.status != SUCCESSFUL_STATUSCODE)) { + if (u8MacStatus == MAC_CONNECTED && + strConnectInfo.status != SUCCESSFUL_STATUSCODE) { netdev_err(vif->ndev, "Received MAC status is MAC_CONNECTED while the received status code in Asoc Resp is not SUCCESSFUL_STATUSCODE\n"); eth_zero_addr(wilc_connected_ssid); } else if (u8MacStatus == MAC_DISCONNECTED){ @@ -1412,8 +1412,8 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif, if (hif_drv->usr_conn_req.bssid) { memcpy(strConnectInfo.bssid, hif_drv->usr_conn_req.bssid, 6); - if ((u8MacStatus == MAC_CONNECTE
[PATCH 07/14] staging: wilc1000: rename u32WidsCount variable to avoid camelCase
fix "Avoid camleCase" issue reported by checkpatch.pl script. rename variable name from u32WidsCount to wid_cnt to fix checkpatch.pl report issue. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 146 +++--- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 57b872c..912d223 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -907,7 +907,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, { s32 result = 0; struct wid wid_list[8]; - u32 u32WidsCount = 0, dummyval = 0; + u32 wid_cnt = 0, dummyval = 0; u8 *pu8CurrByte = NULL; struct join_bss_param *ptstrJoinBssParam; struct host_if_drv *hif_drv = vif->hif_drv; @@ -952,30 +952,30 @@ static s32 Handle_Connect(struct wilc_vif *vif, hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; - wid_list[u32WidsCount].id = WID_SUCCESS_FRAME_COUNT; - wid_list[u32WidsCount].type = WID_INT; - wid_list[u32WidsCount].size = sizeof(u32); - wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); - u32WidsCount++; + wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT; + wid_list[wid_cnt].type = WID_INT; + wid_list[wid_cnt].size = sizeof(u32); + wid_list[wid_cnt].val = (s8 *)(&(dummyval)); + wid_cnt++; - wid_list[u32WidsCount].id = WID_RECEIVED_FRAGMENT_COUNT; - wid_list[u32WidsCount].type = WID_INT; - wid_list[u32WidsCount].size = sizeof(u32); - wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); - u32WidsCount++; + wid_list[wid_cnt].id = WID_RECEIVED_FRAGMENT_COUNT; + wid_list[wid_cnt].type = WID_INT; + wid_list[wid_cnt].size = sizeof(u32); + wid_list[wid_cnt].val = (s8 *)(&(dummyval)); + wid_cnt++; - wid_list[u32WidsCount].id = WID_FAILED_COUNT; - wid_list[u32WidsCount].type = WID_INT; - wid_list[u32WidsCount].size = sizeof(u32); - wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); - u32WidsCount++; + wid_list[wid_cnt].id = WID_FAILED_COUNT; + wid_list[wid_cnt].type = WID_INT; + wid_list[wid_cnt].size = sizeof(u32); + wid_list[wid_cnt].val = (s8 *)(&(dummyval)); + wid_cnt++; { - wid_list[u32WidsCount].id = WID_INFO_ELEMENT_ASSOCIATE; - wid_list[u32WidsCount].type = WID_BIN_DATA; - wid_list[u32WidsCount].val = hif_drv->usr_conn_req.ies; - wid_list[u32WidsCount].size = hif_drv->usr_conn_req.ies_len; - u32WidsCount++; + wid_list[wid_cnt].id = WID_INFO_ELEMENT_ASSOCIATE; + wid_list[wid_cnt].type = WID_BIN_DATA; + wid_list[wid_cnt].val = hif_drv->usr_conn_req.ies; + wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; + wid_cnt++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { info_element_size = hif_drv->usr_conn_req.ies_len; @@ -984,39 +984,39 @@ static s32 Handle_Connect(struct wilc_vif *vif, info_element_size); } } - wid_list[u32WidsCount].id = (u16)WID_11I_MODE; - wid_list[u32WidsCount].type = WID_CHAR; - wid_list[u32WidsCount].size = sizeof(char); - wid_list[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.security; - u32WidsCount++; + wid_list[wid_cnt].id = (u16)WID_11I_MODE; + wid_list[wid_cnt].type = WID_CHAR; + wid_list[wid_cnt].size = sizeof(char); + wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; + wid_cnt++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) mode_11i = hif_drv->usr_conn_req.security; - wid_list[u32WidsCount].id = (u16)WID_AUTH_TYPE; - wid_list[u32WidsCount].type = WID_CHAR; - wid_list[u32WidsCount].size = sizeof(char); - wid_list[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.auth_type; - u32WidsCount++; + wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; + wid_list[wid_cnt].type = WID_CHAR; + wid_list[wid_cnt].size = sizeof(char); + wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type; + wid_cnt++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) auth_type = (u8)hif_drv->usr_conn_req.auth_type; - wid_list[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED; - wid_list[u32WidsCount].type = WID_STR; - wid_list[u32WidsCount].size = 112; - wid_list[u32WidsCount].val = kmalloc(wid_list[u32WidsCount].size, GFP_KERNEL); + wid_list[wid_cnt].id = (u16)WID_JOIN_REQ_EXTENDED; + wid_list[wid_cnt].type = WID_STR; + wid_list[wid_cnt].size = 112; + wid_l
[PATCH 02/14] staging: wilc1000: removed unnecessary defined enums typedef
fix the "do not add new typedefs" issue found by checkpatch.pl script Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/wilc_wlan_if.h | 72 - 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan_if.h b/drivers/staging/wilc1000/wilc_wlan_if.h index 1641ddb..e186509 100644 --- a/drivers/staging/wilc1000/wilc_wlan_if.h +++ b/drivers/staging/wilc1000/wilc_wlan_if.h @@ -114,28 +114,28 @@ enum { G_MIXED_11B_2_MODE, /* 1,2,5,11,6,12,24 otherwise all on */ }; -typedef enum { +enum { G_SHORT_PREAMBLE= 0,/* Short Preamble */ G_LONG_PREAMBLE = 1,/* Long Preamble */ G_AUTO_PREAMBLE = 2,/* Auto Preamble Selection */ -} G_PREAMBLE_T; +}; #define MAC_CONNECTED 1 #define MAC_DISCONNECTED 0 #define SCAN_DONE TRUE -typedef enum { +enum { PASSIVE_SCAN= 0, ACTIVE_SCAN = 1, -} SCANTYPE_T; +}; -typedef enum { +enum { NO_POWERSAVE= 0, MIN_FAST_PS = 1, MAX_FAST_PS = 2, MIN_PSPOLL_PS = 3, MAX_PSPOLL_PS = 4 -} USER_PS_MODE_T; +}; enum chip_ps_states { CHIP_WAKEDUP= 0, @@ -153,7 +153,7 @@ enum bus_release { RELEASE_ALLOW_SLEEP = 1, }; -typedef enum { +enum { NO_SECURITY = 0, WEP_40 = 0x3, WEP_104 = 0x7, @@ -163,7 +163,7 @@ typedef enum { WPA2_AES= 0x31, WPA2_TKIP = 0x51, WPA2_AES_TKIP = 0x71, /* Aes or Tkip */ -} SECURITY_T; +}; enum AUTHTYPE { OPEN_SYSTEM = 1, @@ -178,88 +178,88 @@ enum SITESURVEY { SITE_SURVEY_OFF = 2 }; -typedef enum { +enum { NORMAL_ACK = 0, NO_ACK, -} ACK_POLICY_T; +}; -typedef enum { +enum { DONT_RESET = 0, DO_RESET= 1, NO_REQUEST = 2, -} RESET_REQ_T; +}; -typedef enum { +enum { REKEY_DISABLE = 1, REKEY_TIME_BASE, REKEY_PKT_BASE, REKEY_TIME_PKT_BASE -} RSNA_REKEY_POLICY_T; +}; -typedef enum { +enum { FILTER_NO = 0x00, FILTER_AP_ONLY = 0x01, FILTER_STA_ONLY = 0x02 -} SCAN_CLASS_FITLER_T; +}; -typedef enum { +enum { PRI_HIGH_RSSI = 0x00, PRI_LOW_RSSI= 0x04, PRI_DETECT = 0x08 -} SCAN_PRI_T; +}; -typedef enum { +enum { CH_FILTER_OFF = 0x00, CH_FILTER_ON= 0x10 -} CH_FILTER_T; +}; -typedef enum { +enum { AUTO_PROT = 0,/* Auto */ NO_PROT,/* Do not use any protection */ ERP_PROT, /* Protect all ERP frame exchanges */ HT_PROT,/* Protect all HT frame exchanges */ GF_PROT,/* Protect all GF frame exchanges */ -} N_PROTECTION_MODE_T; +}; -typedef enum { +enum { G_SELF_CTS_PROT, G_RTS_CTS_PROT, -} G_PROTECTION_MODE_T; +}; -typedef enum { +enum { HT_MIXED_MODE = 1, HT_ONLY_20MHZ_MODE, HT_ONLY_20_40MHZ_MODE, -} N_OPERATING_MODE_T; +}; -typedef enum { +enum { NO_DETECT = 0, DETECT_ONLY = 1, DETECT_PROTECT = 2, DETECT_PROTECT_REPORT = 3, -} N_OBSS_DETECTION_T; +}; -typedef enum { +enum { RTS_CTS_NONHT_PROT = 0,/* RTS-CTS at non-HT rate */ FIRST_FRAME_NONHT_PROT, /* First frame at non-HT rate */ LSIG_TXOP_PROT, /* LSIG TXOP Protection */ FIRST_FRAME_MIXED_PROT, /* First frame at Mixed format */ -} N_PROTECTION_TYPE_T; +}; -typedef enum { +enum { STATIC_MODE = 1, DYNAMIC_MODE= 2, MIMO_MODE = 3,/* power save disable */ -} N_SMPS_MODE_T; +}; -typedef enum { +enum { DISABLE_SELF_CTS, ENABLE_SELF_CTS, DISABLE_TX_ABORT, ENABLE_TX_ABORT, HW_TRIGGER_ABORT, SW_TRIGGER_ABORT, -} TX_ABORT_OPTION_T; +}; enum wid_type { WID_CHAR= 0, @@ -281,7 +281,7 @@ struct wid { s8 *val; }; -typedef enum { +enum { WID_NIL = 0x, /* @@ -889,7 +889,7 @@ typedef enum { /* Miscellaneous WIDs */ WID_ALL = 0x7FFE, WID_MAX = 0x -} WID_T; +}; struct wilc; int wilc_wlan_init(struct net_device *dev); -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 06/14] staging: wilc1000: rename strWIDList variable to wid_list to avoid camelCase
fix "Avoid camelCase" issue found by checkpatch.pl script. Rename variable name from strWIDList to wid_list. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 176 +++--- 1 file changed, 88 insertions(+), 88 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index 1ac079a..57b872c 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -906,7 +906,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, struct connect_attr *pstrHostIFconnectAttr) { s32 result = 0; - struct wid strWIDList[8]; + struct wid wid_list[8]; u32 u32WidsCount = 0, dummyval = 0; u8 *pu8CurrByte = NULL; struct join_bss_param *ptstrJoinBssParam; @@ -952,29 +952,29 @@ static s32 Handle_Connect(struct wilc_vif *vif, hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; - strWIDList[u32WidsCount].id = WID_SUCCESS_FRAME_COUNT; - strWIDList[u32WidsCount].type = WID_INT; - strWIDList[u32WidsCount].size = sizeof(u32); - strWIDList[u32WidsCount].val = (s8 *)(&(dummyval)); + wid_list[u32WidsCount].id = WID_SUCCESS_FRAME_COUNT; + wid_list[u32WidsCount].type = WID_INT; + wid_list[u32WidsCount].size = sizeof(u32); + wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); u32WidsCount++; - strWIDList[u32WidsCount].id = WID_RECEIVED_FRAGMENT_COUNT; - strWIDList[u32WidsCount].type = WID_INT; - strWIDList[u32WidsCount].size = sizeof(u32); - strWIDList[u32WidsCount].val = (s8 *)(&(dummyval)); + wid_list[u32WidsCount].id = WID_RECEIVED_FRAGMENT_COUNT; + wid_list[u32WidsCount].type = WID_INT; + wid_list[u32WidsCount].size = sizeof(u32); + wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); u32WidsCount++; - strWIDList[u32WidsCount].id = WID_FAILED_COUNT; - strWIDList[u32WidsCount].type = WID_INT; - strWIDList[u32WidsCount].size = sizeof(u32); - strWIDList[u32WidsCount].val = (s8 *)(&(dummyval)); + wid_list[u32WidsCount].id = WID_FAILED_COUNT; + wid_list[u32WidsCount].type = WID_INT; + wid_list[u32WidsCount].size = sizeof(u32); + wid_list[u32WidsCount].val = (s8 *)(&(dummyval)); u32WidsCount++; { - strWIDList[u32WidsCount].id = WID_INFO_ELEMENT_ASSOCIATE; - strWIDList[u32WidsCount].type = WID_BIN_DATA; - strWIDList[u32WidsCount].val = hif_drv->usr_conn_req.ies; - strWIDList[u32WidsCount].size = hif_drv->usr_conn_req.ies_len; + wid_list[u32WidsCount].id = WID_INFO_ELEMENT_ASSOCIATE; + wid_list[u32WidsCount].type = WID_BIN_DATA; + wid_list[u32WidsCount].val = hif_drv->usr_conn_req.ies; + wid_list[u32WidsCount].size = hif_drv->usr_conn_req.ies_len; u32WidsCount++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { @@ -984,39 +984,39 @@ static s32 Handle_Connect(struct wilc_vif *vif, info_element_size); } } - strWIDList[u32WidsCount].id = (u16)WID_11I_MODE; - strWIDList[u32WidsCount].type = WID_CHAR; - strWIDList[u32WidsCount].size = sizeof(char); - strWIDList[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.security; + wid_list[u32WidsCount].id = (u16)WID_11I_MODE; + wid_list[u32WidsCount].type = WID_CHAR; + wid_list[u32WidsCount].size = sizeof(char); + wid_list[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.security; u32WidsCount++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) mode_11i = hif_drv->usr_conn_req.security; - strWIDList[u32WidsCount].id = (u16)WID_AUTH_TYPE; - strWIDList[u32WidsCount].type = WID_CHAR; - strWIDList[u32WidsCount].size = sizeof(char); - strWIDList[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.auth_type; + wid_list[u32WidsCount].id = (u16)WID_AUTH_TYPE; + wid_list[u32WidsCount].type = WID_CHAR; + wid_list[u32WidsCount].size = sizeof(char); + wid_list[u32WidsCount].val = (s8 *)&hif_drv->usr_conn_req.auth_type; u32WidsCount++; if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) auth_type = (u8)hif_drv->usr_conn_req.auth_type; - strWIDList[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED; - strWIDList[u32WidsCount].type = WID_STR; - strWIDList[u32WidsCount].size = 112; - strWIDList[u32WidsCount].val = kmalloc(strWIDList[u32WidsCount].size, GFP_KERNEL); + wid_list[u32WidsCount].id = (u16)WID_JOIN_REQ_EXTENDED; + wid_list[u32WidsCount].type = WID_STR; + wid_list[u32WidsCount].size = 112; + wid_list[u32WidsCount].val = kmall
[PATCH 09/14] staging: wilc1000: rename pstrHostIFconnectAttr argument to avoid camelCase
fix "Avoid camelCase" issue found by checkpatch.pl script. Signed-off-by: Ajay Singh --- drivers/staging/wilc1000/host_interface.c | 104 ++ 1 file changed, 49 insertions(+), 55 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b/drivers/staging/wilc1000/host_interface.c index e3931bc..4ddd1a8 100644 --- a/drivers/staging/wilc1000/host_interface.c +++ b/drivers/staging/wilc1000/host_interface.c @@ -903,7 +903,7 @@ static s32 Handle_ScanDone(struct wilc_vif *vif, u8 wilc_connected_ssid[6] = {0}; static s32 Handle_Connect(struct wilc_vif *vif, - struct connect_attr *pstrHostIFconnectAttr) + struct connect_attr *attr) { s32 result = 0; struct wid wid_list[8]; @@ -912,45 +912,41 @@ static s32 Handle_Connect(struct wilc_vif *vif, struct join_bss_param *ptstrJoinBssParam; struct host_if_drv *hif_drv = vif->hif_drv; - if (memcmp(pstrHostIFconnectAttr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { + if (memcmp(attr->bssid, wilc_connected_ssid, ETH_ALEN) == 0) { result = 0; netdev_err(vif->ndev, "Discard connect request\n"); return result; } - ptstrJoinBssParam = pstrHostIFconnectAttr->params; + ptstrJoinBssParam = attr->params; if (!ptstrJoinBssParam) { netdev_err(vif->ndev, "Required BSSID not found\n"); result = -ENOENT; goto ERRORHANDLER; } - if (pstrHostIFconnectAttr->bssid) { + if (attr->bssid) { hif_drv->usr_conn_req.bssid = kmalloc(6, GFP_KERNEL); - memcpy(hif_drv->usr_conn_req.bssid, pstrHostIFconnectAttr->bssid, 6); + memcpy(hif_drv->usr_conn_req.bssid, attr->bssid, 6); } - hif_drv->usr_conn_req.ssid_len = pstrHostIFconnectAttr->ssid_len; - if (pstrHostIFconnectAttr->ssid) { - hif_drv->usr_conn_req.ssid = kmalloc(pstrHostIFconnectAttr->ssid_len + 1, GFP_KERNEL); - memcpy(hif_drv->usr_conn_req.ssid, - pstrHostIFconnectAttr->ssid, - pstrHostIFconnectAttr->ssid_len); - hif_drv->usr_conn_req.ssid[pstrHostIFconnectAttr->ssid_len] = '\0'; + hif_drv->usr_conn_req.ssid_len = attr->ssid_len; + if (attr->ssid) { + hif_drv->usr_conn_req.ssid = kmalloc(attr->ssid_len + 1, GFP_KERNEL); + memcpy(hif_drv->usr_conn_req.ssid, attr->ssid, attr->ssid_len); + hif_drv->usr_conn_req.ssid[attr->ssid_len] = '\0'; } - hif_drv->usr_conn_req.ies_len = pstrHostIFconnectAttr->ies_len; - if (pstrHostIFconnectAttr->ies) { - hif_drv->usr_conn_req.ies = kmalloc(pstrHostIFconnectAttr->ies_len, GFP_KERNEL); - memcpy(hif_drv->usr_conn_req.ies, - pstrHostIFconnectAttr->ies, - pstrHostIFconnectAttr->ies_len); + hif_drv->usr_conn_req.ies_len = attr->ies_len; + if (attr->ies) { + hif_drv->usr_conn_req.ies = kmalloc(attr->ies_len, GFP_KERNEL); + memcpy(hif_drv->usr_conn_req.ies, attr->ies, attr->ies_len); } - hif_drv->usr_conn_req.security = pstrHostIFconnectAttr->security; - hif_drv->usr_conn_req.auth_type = pstrHostIFconnectAttr->auth_type; - hif_drv->usr_conn_req.conn_result = pstrHostIFconnectAttr->result; - hif_drv->usr_conn_req.arg = pstrHostIFconnectAttr->arg; + hif_drv->usr_conn_req.security = attr->security; + hif_drv->usr_conn_req.auth_type = attr->auth_type; + hif_drv->usr_conn_req.conn_result = attr->result; + hif_drv->usr_conn_req.arg = attr->arg; wid_list[wid_cnt].id = WID_SUCCESS_FRAME_COUNT; wid_list[wid_cnt].type = WID_INT; @@ -977,7 +973,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, wid_list[wid_cnt].size = hif_drv->usr_conn_req.ies_len; wid_cnt++; - if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) { + if (memcmp("DIRECT-", attr->ssid, 7)) { info_element_size = hif_drv->usr_conn_req.ies_len; info_element = kmalloc(info_element_size, GFP_KERNEL); memcpy(info_element, hif_drv->usr_conn_req.ies, @@ -990,7 +986,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.security; wid_cnt++; - if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) + if (memcmp("DIRECT-", attr->ssid, 7)) mode_11i = hif_drv->usr_conn_req.security; wid_list[wid_cnt].id = (u16)WID_AUTH_TYPE; @@ -999,7 +995,7 @@ static s32 Handle_Connect(struct wilc_vif *vif, wid_list[wid_cnt].val = (s8 *)&hif_drv->usr_conn_req.auth_type; wid_cnt++; - if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid,
Re: [PATCH 1/7] staging: ccree: remove ccree from staging tree
On Thu, Jan 18, 2018 at 10:39:11AM +0200, Gilad Ben-Yossef wrote: > On Sat, Jan 13, 2018 at 3:21 PM, Greg Kroah-Hartman > wrote: > > On Thu, Jan 11, 2018 at 09:17:08AM +, Gilad Ben-Yossef wrote: > >> Remove the ccree driver from the staging tree in preparation to > >> introducing it in the crypto tree. > >> > >> Signed-off-by: Gilad Ben-Yossef > > > > Heh, no, just make a patch series that adds the driver to the correct > > location in the crypto tree. > > > > If that gets accepted, we can then delete the staging driver with a > > separate patch, after the fact. No need for it to be in this patch > > series. > > Yes, I should have been more communicative as to why I am doing this, sorry. > > The problem is that if you apply the patch adding the driver to > drivers/crypto/ the kernel > no longer links due to symbol name collisions. Then as the first patch in your series, just mark the staging driver as relying on BROKEN, and all should be fine :) thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH -next] staging: ccree: remove redundant dev_err call in init_cc_resources()
On Thu, Jan 11, 2018 at 1:14 PM, Wei Yongjun wrote: > There is a error message within devm_ioremap_resource > already, so remove the dev_err call to avoid redundant > error message. > > Signed-off-by: Wei Yongjun > --- > drivers/staging/ccree/cc_driver.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/staging/ccree/cc_driver.c > b/drivers/staging/ccree/cc_driver.c > index 6682d9d..c27d5a8 100644 > --- a/drivers/staging/ccree/cc_driver.c > +++ b/drivers/staging/ccree/cc_driver.c > @@ -174,10 +174,8 @@ static int init_cc_resources(struct platform_device > *plat_dev) > req_mem_cc_regs = platform_get_resource(plat_dev, IORESOURCE_MEM, 0); > /* Map registers space */ > new_drvdata->cc_base = devm_ioremap_resource(dev, req_mem_cc_regs); > - if (IS_ERR(new_drvdata->cc_base)) { > - dev_err(dev, "Failed to ioremap registers"); > + if (IS_ERR(new_drvdata->cc_base)) > return PTR_ERR(new_drvdata->cc_base); > - } > > dev_dbg(dev, "Got MEM resource (%s): %pR\n", req_mem_cc_regs->name, > req_mem_cc_regs); > Yeah, that makes sense. Acked-by: Gilad Ben-Yossef Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH v2] ION: Sys_heap: fix the incorrect pool->gfp_mask setting
The gfp_mask low order pool is overlapped by the high order inside the loop, so the gfp_mask of all pools are set to high_order_gfp_flags. And all the allcations will have no __GFP_RECLAIM flag, we will easily get the allocation failure problem with memory presure. Changes since v1: 1. fix the tag 2. change the flags define based on the comment. Fixes: e7f63771b60e ("ION: Sys_heap: Add cached pool to spead up cached buffer alloc") Signed-off-by: Zeng Tao --- drivers/staging/android/ion/ion_system_heap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/android/ion/ion_system_heap.c b/drivers/staging/android/ion/ion_system_heap.c index 4dc5d7a..12d0801 100644 --- a/drivers/staging/android/ion/ion_system_heap.c +++ b/drivers/staging/android/ion/ion_system_heap.c @@ -305,6 +305,8 @@ static int ion_system_heap_create_pools(struct ion_page_pool **pools, if (orders[i] > 4) gfp_flags = high_order_gfp_flags; + else + gfp_flags = low_order_gfp_flags; pool = ion_page_pool_create(gfp_flags, orders[i], cached); if (!pool) -- 2.7.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/7] staging: ccree: remove ccree from staging tree
On Sat, Jan 13, 2018 at 3:21 PM, Greg Kroah-Hartman wrote: > On Thu, Jan 11, 2018 at 09:17:08AM +, Gilad Ben-Yossef wrote: >> Remove the ccree driver from the staging tree in preparation to >> introducing it in the crypto tree. >> >> Signed-off-by: Gilad Ben-Yossef > > Heh, no, just make a patch series that adds the driver to the correct > location in the crypto tree. > > If that gets accepted, we can then delete the staging driver with a > separate patch, after the fact. No need for it to be in this patch > series. Yes, I should have been more communicative as to why I am doing this, sorry. The problem is that if you apply the patch adding the driver to drivers/crypto/ the kernel no longer links due to symbol name collisions. If we really must avoid doing an "atomic" replacement I guess I can change the Kconfig name to ...CCREE_OLD or something although I would prefer not doing that so that people using the driver in staging/ don't need to change their kernel build configs when they are upgrading versions. Does that makes sense? Thanks, Gilad -- Gilad Ben-Yossef Chief Coffee Drinker "If you take a class in large-scale robotics, can you end up in a situation where the homework eats your dog?" -- Jean-Baptiste Queru ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel