Fix checkpatch warning: Avoid CamelCase by renaming following structure members of struct rtllib_device pDot11dInfo -> p_dot11d_info bGlobalDomain -> b_global_domain IbssStartChnl -> ibss_start_chnl Signed-off-by: Himadri Pandya <himadri18.07@xxxxxxxxx> --- drivers/staging/rtl8192e/dot11d.c | 66 ++++++++++++----------- drivers/staging/rtl8192e/dot11d.h | 4 +- drivers/staging/rtl8192e/rtllib.h | 6 +-- drivers/staging/rtl8192e/rtllib_softmac.c | 12 ++--- 4 files changed, 46 insertions(+), 42 deletions(-) diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c index c2040f23dbd4..82b9605f7aed 100644 --- a/drivers/staging/rtl8192e/dot11d.c +++ b/drivers/staging/rtl8192e/dot11d.c @@ -44,14 +44,15 @@ static struct channel_list channel_array[] = { void dot11d_init(struct rtllib_device *ieee) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); + struct rt_dot11d_info *p_dot11d_info = GET_DOT11D_INFO(ieee); - pDot11dInfo->b_enabled = false; + p_dot11d_info->b_enabled = false; - pDot11dInfo->state = DOT11D_STATE_NONE; - pDot11dInfo->country_ie_len = 0; - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER + 1); + p_dot11d_info->state = DOT11D_STATE_NONE; + p_dot11d_info->country_ie_len = 0; + memset(p_dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1); + memset(p_dot11d_info->max_tx_pwr_dbm_list, 0xFF, + MAX_CHANNEL_NUMBER + 1); RESET_CIE_WATCHDOG(ieee); } EXPORT_SYMBOL(dot11d_init); @@ -60,7 +61,7 @@ void dot11d_channel_map(u8 channel_plan, struct rtllib_device *ieee) { int i, max_chan = 14, min_chan = 1; - ieee->bGlobalDomain = false; + ieee->b_global_domain = false; if (channel_array[channel_plan].len != 0) { memset(GET_DOT11D_INFO(ieee)->channel_map, 0, @@ -76,22 +77,22 @@ void dot11d_channel_map(u8 channel_plan, struct rtllib_device *ieee) switch (channel_plan) { case COUNTRY_CODE_GLOBAL_DOMAIN: - ieee->bGlobalDomain = true; + ieee->b_global_domain = true; for (i = 12; i <= 14; i++) GET_DOT11D_INFO(ieee)->channel_map[i] = 2; - ieee->IbssStartChnl = 10; + ieee->ibss_start_chnl = 10; ieee->ibss_maxjoin_chal = 11; break; case COUNTRY_CODE_WORLD_WIDE_13: for (i = 12; i <= 13; i++) GET_DOT11D_INFO(ieee)->channel_map[i] = 2; - ieee->IbssStartChnl = 10; + ieee->ibss_start_chnl = 10; ieee->ibss_maxjoin_chal = 11; break; default: - ieee->IbssStartChnl = 1; + ieee->ibss_start_chnl = 1; ieee->ibss_maxjoin_chal = 14; break; } @@ -100,29 +101,31 @@ EXPORT_SYMBOL(dot11d_channel_map); void dot11d_reset(struct rtllib_device *ieee) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(ieee); + struct rt_dot11d_info *p_dot11d_info = GET_DOT11D_INFO(ieee); u32 i; - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER + 1); + memset(p_dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1); + memset(p_dot11d_info->max_tx_pwr_dbm_list, 0xFF, + MAX_CHANNEL_NUMBER + 1); for (i = 1; i <= 11; i++) - (pDot11dInfo->channel_map)[i] = 1; + (p_dot11d_info->channel_map)[i] = 1; for (i = 12; i <= 14; i++) - (pDot11dInfo->channel_map)[i] = 2; - pDot11dInfo->state = DOT11D_STATE_NONE; - pDot11dInfo->country_ie_len = 0; + (p_dot11d_info->channel_map)[i] = 2; + p_dot11d_info->state = DOT11D_STATE_NONE; + p_dot11d_info->country_ie_len = 0; RESET_CIE_WATCHDOG(ieee); } void dot11d_update_country_ie(struct rtllib_device *dev, u8 *p_taddr, - u16 coutry_ie_len, u8 *p_coutry_ie) + u16 coutry_ie_len, u8 *p_coutry_ie) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); + struct rt_dot11d_info *p_dot11d_info = GET_DOT11D_INFO(dev); u8 i, j, num_triples, max_chnl_num; struct chnl_txpow_triple *p_triple; - memset(pDot11dInfo->channel_map, 0, MAX_CHANNEL_NUMBER + 1); - memset(pDot11dInfo->max_tx_pwr_dbm_list, 0xFF, MAX_CHANNEL_NUMBER + 1); + memset(p_dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1); + memset(p_dot11d_info->max_tx_pwr_dbm_list, 0xFF, + MAX_CHANNEL_NUMBER + 1); max_chnl_num = 0; num_triples = (coutry_ie_len - 3) / 3; p_triple = (struct chnl_txpow_triple *)(p_coutry_ie + 3); @@ -142,9 +145,10 @@ void dot11d_update_country_ie(struct rtllib_device *dev, u8 *p_taddr, } for (j = 0; j < p_triple->num_chnls; j++) { - pDot11dInfo->channel_map[p_triple->first_chnl + j] = 1; - pDot11dInfo->max_tx_pwr_dbm_list[p_triple->first_chnl + j] = - p_triple->max_tx_power_in_dbm; + p_dot11d_info->channel_map[p_triple->first_chnl + + j] = 1; + p_dot11d_info->max_tx_pwr_dbm_list[p_triple->first_chnl + + j] = p_triple->max_tx_power_in_dbm; max_chnl_num = p_triple->first_chnl + j; } @@ -153,18 +157,18 @@ void dot11d_update_country_ie(struct rtllib_device *dev, u8 *p_taddr, UPDATE_CIE_SRC(dev, p_taddr); - pDot11dInfo->country_ie_len = coutry_ie_len; - memcpy(pDot11dInfo->country_ie_buf, p_coutry_ie, coutry_ie_len); - pDot11dInfo->state = DOT11D_STATE_LEARNED; + p_dot11d_info->country_ie_len = coutry_ie_len; + memcpy(p_dot11d_info->country_ie_buf, p_coutry_ie, coutry_ie_len); + p_dot11d_info->state = DOT11D_STATE_LEARNED; } void dot11d_scan_complete(struct rtllib_device *dev) { - struct rt_dot11d_info *pDot11dInfo = GET_DOT11D_INFO(dev); + struct rt_dot11d_info *p_dot11d_info = GET_DOT11D_INFO(dev); - switch (pDot11dInfo->state) { + switch (p_dot11d_info->state) { case DOT11D_STATE_LEARNED: - pDot11dInfo->state = DOT11D_STATE_DONE; + p_dot11d_info->state = DOT11D_STATE_DONE; break; case DOT11D_STATE_DONE: dot11d_reset(dev); diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h index ae2389efdff7..bdf862efab6e 100644 --- a/drivers/staging/rtl8192e/dot11d.h +++ b/drivers/staging/rtl8192e/dot11d.h @@ -59,7 +59,7 @@ static inline void cp_mac_addr(unsigned char *des, unsigned char *src) } #define GET_DOT11D_INFO(__p_ieee_dev) \ - ((struct rt_dot11d_info *)((__p_ieee_dev)->pDot11dInfo)) + ((struct rt_dot11d_info *)((__p_ieee_dev)->p_dot11d_info)) #define IS_DOT11D_ENABLE(__p_ieee_dev) \ (GET_DOT11D_INFO(__p_ieee_dev)->b_enabled) @@ -85,7 +85,7 @@ void dot11d_init(struct rtllib_device *dev); void dot11d_channel_map(u8 channel_plan, struct rtllib_device *ieee); void dot11d_reset(struct rtllib_device *dev); void dot11d_update_country_ie(struct rtllib_device *dev, u8 *p_taddr, - u16 coutry_ie_len, u8 *p_coutry_ie); + u16 coutry_ie_len, u8 *p_coutry_ie); void dot11d_scan_complete(struct rtllib_device *dev); #endif diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index c01474a6db1e..fe4f0c8d5988 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -1560,11 +1560,11 @@ struct rtllib_device { u16 scan_watch_dog; /* map of allowed channels. 0 is dummy */ - void *pDot11dInfo; - bool bGlobalDomain; + void *p_dot11d_info; + bool b_global_domain; u8 active_channel_map[MAX_CHANNEL_NUMBER+1]; - u8 IbssStartChnl; + u8 ibss_start_chnl; u8 ibss_maxjoin_chal; int rate; /* current rate */ diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index 7bcd8eec6459..15c1b66580d6 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -2627,7 +2627,7 @@ static void rtllib_start_ibss_wq(void *data) /* the network definitively is not here.. create a new cell */ if (ieee->state == RTLLIB_NOLINK) { netdev_info(ieee->dev, "creating new IBSS cell\n"); - ieee->current_network.channel = ieee->IbssStartChnl; + ieee->current_network.channel = ieee->ibss_start_chnl; if (!ieee->wap_set) eth_random_addr(ieee->current_network.bssid); @@ -2719,7 +2719,7 @@ static void rtllib_start_bss(struct rtllib_device *ieee) unsigned long flags; if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee)) { - if (!ieee->bGlobalDomain) + if (!ieee->b_global_domain) return; } /* check if we have already found the net we @@ -2974,8 +2974,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee) ieee->state = RTLLIB_NOLINK; for (i = 0; i < 5; i++) ieee->seq_ctrl[i] = 0; - ieee->pDot11dInfo = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC); - if (!ieee->pDot11dInfo) + ieee->p_dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC); + if (!ieee->p_dot11d_info) netdev_err(ieee->dev, "Can't alloc memory for DOT11D\n"); ieee->LinkDetectInfo.SlotIndex = 0; ieee->LinkDetectInfo.SlotNum = 2; @@ -3049,8 +3049,8 @@ void rtllib_softmac_init(struct rtllib_device *ieee) void rtllib_softmac_free(struct rtllib_device *ieee) { mutex_lock(&ieee->wx_mutex); - kfree(ieee->pDot11dInfo); - ieee->pDot11dInfo = NULL; + kfree(ieee->p_dot11d_info); + ieee->p_dot11d_info = NULL; del_timer_sync(&ieee->associate_timer); cancel_delayed_work_sync(&ieee->associate_retry_wq); -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel