staging: rtl8188eu: clean up block comment style issues
PATCH 1/2 staging: rtl8188eu: clean up block comment style issues
Clean up block comment style issues to follow kernel coding style and clear checkpatch warnings.
WARNING: Block comments should align the * on each line
WARNING: Block comments use a trailing */ on a separate line
WARNING: Block comments use * on subsequent lines
Signed-off-by Michael Straube <[email protected]>
--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 6 +++--- drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 12 +++--------- drivers/staging/rtl8188eu/core/rtw_pwrctrl.c | 10 +++++----- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 10 ++++------ drivers/staging/rtl8188eu/os_dep/usb_intf.c | 11 ++++++----- 5 files changed, 21 insertions(+), 28 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +3 -3
@@ -1894,9 +1894,9 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_rtw_hal_get_def_var (padapter,HAL_DEF_MAX_RECVBUF_SZ , &max_recvbuf_sz);/* -ampdu_params_info [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k -ampdu_params_info [4:2]:Min MPDU Start Spacing -*/ +* ampdu_params_info [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k +* ampdu_params_info [4:2]:Min MPDU Start Spacing +*/ rtw_hal_get_def_var (padapter,HW_VAR_MAX_RX_AMPDU_FACTOR , &max_rx_ampdu_factor); ht_cap.ampdu_params_info = max_rx_ampdu_factor &0x03 ;
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +3 -9
@@ -19,9 +19,7 @@static u8 null_addr[ETH_ALEN ] = {}; -/************************************************** -OUI definitions for the vendor specific IE -***************************************************/ +/* OUI definitions for the vendor specific IE */ const u8 RTW_WPA_OUI [] = {0x00 ,0x50 ,0xf2 ,0x01 };const u8 WPS_OUI [] = {0x00 ,0x50 ,0xf2 ,0x04 };static const u8 WMM_OUI [] = {0x00 ,0x50 ,0xf2 ,0x02 };
@@ -32,17 +30,13 @@ static const u8 WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};const u8 WPA_TKIP_CIPHER [4 ] = {0x00 ,0x50 ,0xf2 ,0x02 };const u8 RSN_TKIP_CIPHER [4 ] = {0x00 ,0x0f ,0xac ,0x02 }; -/******************************************************** -MCS rate definitions -*********************************************************/ +/* MCS rate definitions */ const u8 MCS_rate_1R[16 ] = {0xff ,0x00 ,0x00 ,0x00 ,0x01 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 }; -/******************************************************** -ChannelPlan definitions -*********************************************************/ +/* ChannelPlan definitions */ static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX ] = { {{1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 },13 },/* 0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */ {{1 ,2 ,3 ,4 ,5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 },13 },/* 0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c +5 -5
@@ -530,11 +530,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter) }/* -* rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend -* @adapter: pointer to struct adapter structure -* @ips_deffer_ms: the ms will prevent from falling into IPS after wakeup -* Return _SUCCESS or _FAIL -*/ +* rtw_pwr_wakeup - Wake the NIC up from: 1)IPS. 2)USB autosuspend +* @adapter: pointer to struct adapter structure +* @ips_deffer_ms: the ms will prevent from falling into IPS after wakeup +* Return _SUCCESS or _FAIL +*/ int _rtw_pwr_wakeup (struct adapter *padapter,u32 ips_deffer_ms,const char *caller) {
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +4 -6
@@ -1813,9 +1813,7 @@ static int rtw_wx_set_auth(struct net_device *dev,break ;case IW_AUTH_80211_AUTH_ALG : -/* -* It's the starting point of a link layer connection using wpa_supplicant -*/ +/* It's the starting point of a link layer connection using wpa_supplicant */ if (check_fwstate (&padapter->mlmepriv, _FW_LINKED)) {LeaveAllPowerSaveMode (padapter);rtw_disassoc_cmd (padapter,500 , false);
@@ -2775,9 +2773,9 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p)struct adapter *padapter =rtw_netdev_priv (dev);/* -* this function is expect to call in master mode, which allows no power saving -* so, we just check hw_init_completed -*/ +* this function is expect to call in master mode, which allows no power saving +* so, we just check hw_init_completed +*/ if (!padapter->hw_init_completed)return -EPERM ;
drivers/staging/rtl8188eu/os_dep/usb_intf.c +6 -5
@@ -126,7 +126,8 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)* remove/insert module, driver fails * on sitesurvey for the first time when * device is up . Reset usb port for sitesurvey -* fail issue. */ +* fail issue. +*/ pr_debug ("usb attached..., try to reset usb device\n" );usb_reset_device (interface_to_usbdev (usb_intf)); }
@@ -383,8 +384,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, }#endif -/* 2012-07-11 Move here to prevent the 8723AS-VAU BT auto -* suspend influence */ +/* 2012-07-11 Move here to prevent the 8723AS-VAU BT auto suspend influence */ if (usb_autopm_get_interface (pusb_intf) <0 )pr_debug ("can't get autopm:\n" );
@@ -479,8 +479,9 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device/* * dev_remove() - our device is being removed -*/ -/* rmmod module & unplug(SurpriseRemoved) will call r871xu_dev_remove() => how to recognize both */ +* +* rmmod module & unplug(SurpriseRemoved) will call r871xu_dev_remove() => how to recognize both +*/ static void rtw_dev_remove (struct usb_interface *pusb_intf) {struct dvobj_priv *dvobj =usb_get_intfdata (pusb_intf);
Signature · 1 line
2.28.0
PATCH 2/2 staging: rtl8188eu: clean up alignment style issues
Clean up alignment style issues to follow kernel coding style and clear checkpatch issues.
CHECK: Alignment should match open parenthesis
Signed-off-by Michael Straube <[email protected]>
--- drivers/staging/rtl8188eu/core/rtw_mlme.c | 2 +- drivers/staging/rtl8188eu/hal/phy.c | 21 ++-- drivers/staging/rtl8188eu/hal/rf_cfg.c | 3 +- .../staging/rtl8188eu/hal/rtl8188e_hal_init.c | 2 +- drivers/staging/rtl8188eu/hal/usb_halinit.c | 4 +- .../staging/rtl8188eu/os_dep/ioctl_linux.c | 114 +++++++++--------- .../staging/rtl8188eu/os_dep/rtw_android.c | 4 +- drivers/staging/rtl8188eu/os_dep/usb_intf.c | 27 +++-- 8 files changed, 87 insertions(+), 90 deletions(-)
drivers/staging/rtl8188eu/core/rtw_mlme.c +1 -1
@@ -1730,7 +1730,7 @@ int rtw_restruct_sec_ie(struct adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_ (ndisauthmode == Ndis802_11AuthModeWPAPSK)) authmode = _WPA_IE_ID_; else if ((ndisauthmode == Ndis802_11AuthModeWPA2) || - (ndisauthmode == Ndis802_11AuthModeWPA2PSK)) + (ndisauthmode == Ndis802_11AuthModeWPA2PSK)) authmode = _WPA2_IE_ID_; else authmode =0x0 ;
drivers/staging/rtl8188eu/hal/phy.c +10 -11
@@ -51,8 +51,7 @@ void phy_set_bb_reg(struct adapter *adapt, u32 regaddr, u32 bitmask, u32 data)usb_write32 (adapt, regaddr, data); } -static u32 rf_serial_read (struct adapter *adapt, -enum rf_radio_path rfpath,u32 offset) +static u32 rf_serial_read (struct adapter *adapt,enum rf_radio_path rfpath,u32 offset) {u32 ret =0 ;struct bb_reg_def *phyreg = &adapt->HalData->PHYRegDef[rfpath];
@@ -107,7 +106,7 @@ static void rf_serial_write(struct adapter *adapt, }u32 rtw_hal_read_rfreg (struct adapter *adapt,enum rf_radio_path rf_path, -u32 reg_addr,u32 bit_mask) +u32 reg_addr,u32 bit_mask) {u32 original_value, bit_shift;
@@ -117,7 +116,7 @@ u32 rtw_hal_read_rfreg(struct adapter *adapt, enum rf_radio_path rf_path, }void phy_set_rf_reg (struct adapter *adapt,enum rf_radio_path rf_path, -u32 reg_addr,u32 bit_mask,u32 data) +u32 reg_addr,u32 bit_mask,u32 data) {u32 original_value, bit_shift;
@@ -190,7 +189,7 @@ void phy_set_tx_power_level(struct adapter *adapt, u8 channel)rtl88eu_phy_rf6052_set_cck_txpower (adapt, &cck_pwr[0 ]);rtl88eu_phy_rf6052_set_ofdm_txpower (adapt, &ofdm_pwr[0 ], &bw20_pwr[0 ], - &bw40_pwr[0 ], channel); + &bw40_pwr[0 ], channel); }static void phy_set_bw_mode_callback (struct adapter *adapt)
@@ -236,11 +235,11 @@ static void phy_set_bw_mode_callback(struct adapter *adapt)* These settings are required only for 40MHz */ phy_set_bb_reg (adapt, rCCK0_System, bCCKSideBand, - (hal_data->nCur40MhzPrimeSC >>1 )); + (hal_data->nCur40MhzPrimeSC >>1 ));phy_set_bb_reg (adapt, rOFDM1_LSTF,0xC00 , hal_data->nCur40MhzPrimeSC);phy_set_bb_reg (adapt,0x818 , (BIT (26 ) |BIT (27 )), - (hal_data->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) ?2 :1 ); + (hal_data->nCur40MhzPrimeSC ==HAL_PRIME_CHNL_OFFSET_LOWER ) ?2 :1 );break ;default :break ;
@@ -251,7 +250,7 @@ static void phy_set_bw_mode_callback(struct adapter *adapt) }void rtw_hal_set_bwmode (struct adapter *adapt,enum ht_channel_width bandwidth, -unsigned char offset) +unsigned char offset) {struct hal_data_8188e *hal_data = adapt->HalData;enum ht_channel_width tmp_bw = hal_data->CurrentChannelBW;
@@ -437,7 +436,7 @@ void rtl88eu_dm_txpower_tracking_callback_thermalmeter(struct adapter *adapt) thermal_val = (u8)(thermal_avg / thermal_avg_count);if (dm_odm->RFCalibrateInfo.bDoneTxpower && - !dm_odm->RFCalibrateInfo.bReloadtxpowerindex) { + !dm_odm->RFCalibrateInfo.bReloadtxpowerindex) { delta =abs (thermal_val - dm_odm->RFCalibrateInfo.ThermalValue); }else { delta =abs (thermal_val - hal_data->EEPROMThermalMeter);
@@ -1149,12 +1148,12 @@ static void phy_lc_calibrate(struct adapter *adapt, bool is2t)/* 1. Read original RF mode */ /* Path-A */ rf_a_mode =rtw_hal_read_rfreg (adapt,RF_PATH_A ,RF_AC , - bMask12Bits); + bMask12Bits);/* Path-B */ if (is2t) rf_b_mode =rtw_hal_read_rfreg (adapt,RF_PATH_B ,RF_AC , - bMask12Bits); + bMask12Bits);/* 2. Set RF mode = standby mode */ /* Path-A */
drivers/staging/rtl8188eu/hal/rf_cfg.c +1 -2
@@ -171,8 +171,7 @@ static void rtl_rfreg_delay(struct adapter *adapt, enum rf_radio_path rfpath, u3 } } -static void rtl8188e_config_rf_reg (struct adapter *adapt, -u32 addr,u32 data) +static void rtl8188e_config_rf_reg (struct adapter *adapt,u32 addr,u32 data) {u32 content =0x1000 ;/*RF Content: radio_a_txt*/ u32 maskforphyset = content &0xE000 ;
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c +1 -1
@@ -406,7 +406,7 @@ void Hal_ReadPowerSavingMode88E(struct adapter *padapter, u8 *hwinfo, bool AutoL padapter->pwrctrlpriv.bSupportRemoteWakeup = (hwinfo[EEPROM_USB_OPTIONAL_FUNCTION0 ] &BIT (1 )) ? true : false;DBG_88E ("%s...bHWPwrPindetect(%x)-bHWPowerdown(%x) , bSupportRemoteWakeup(%x)\n" , __func__, - padapter->pwrctrlpriv.bHWPwrPindetect, padapter->pwrctrlpriv.bHWPowerdown, padapter->pwrctrlpriv.bSupportRemoteWakeup); + padapter->pwrctrlpriv.bHWPwrPindetect, padapter->pwrctrlpriv.bHWPowerdown, padapter->pwrctrlpriv.bSupportRemoteWakeup);DBG_88E ("### PS params => power_mgnt(%x), usbss_enable(%x) ###\n" , padapter->registrypriv.power_mgnt, padapter->registrypriv.usbss_enable); }
drivers/staging/rtl8188eu/hal/usb_halinit.c +2 -2
@@ -78,8 +78,8 @@ void rtw_hal_chip_configure(struct adapter *adapt) haldata->UsbRxAggPageCount =48 ;/* uint :128 b 0x0A; 10 = MAX_RX_DMA_BUFFER_SIZE/2/haldata->UsbBulkOutSize */ haldata->UsbRxAggPageTimeout =0x4 ;/* 6, absolute time = 34ms/(2^6) */ -HalUsbSetQueuePipeMapping8188EUsb (adapt, - pdvobjpriv->RtNumInPipes, pdvobjpriv->RtNumOutPipes); +HalUsbSetQueuePipeMapping8188EUsb (adapt, pdvobjpriv->RtNumInPipes, + pdvobjpriv->RtNumOutPipes); }u32 rtw_hal_power_on (struct adapter *adapt)
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +56 -58
312 lines not on this page · raw message
drivers/staging/rtl8188eu/os_dep/rtw_android.c +2 -2
@@ -68,7 +68,7 @@ int rtw_android_cmdstr_to_num(char *cmdstr)for (cmd_num =0 ; cmd_num <ANDROID_WIFI_CMD_MAX ; cmd_num++)if (!strncasecmp (cmdstr, android_wifi_cmd_str[cmd_num], -strlen (android_wifi_cmd_str[cmd_num]))) +strlen (android_wifi_cmd_str[cmd_num])))break ;return cmd_num; }
@@ -120,7 +120,7 @@ static int android_set_cntry(struct net_device *net, char *command, }static int android_get_p2p_addr (struct net_device *net,char *command, -int total_len) +int total_len) {/* We use the same address as our HW MAC address */ memcpy (command, net->dev_addr,ETH_ALEN );
drivers/staging/rtl8188eu/os_dep/usb_intf.c +14 -13
@@ -118,7 +118,7 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)if (dvobj) {/* Modify condition for 92DU DMDP 2010.11.18, by Thomas */ if ((dvobj->NumInterfaces !=2 && - dvobj->NumInterfaces !=3 ) || + dvobj->NumInterfaces !=3 ) || (dvobj->InterfaceNumber ==1 )) {if (interface_to_usbdev (usb_intf)->state !=USB_STATE_NOTATTACHED ) {
@@ -209,8 +209,8 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) {pr_debug ("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n" , - padapter->bup, padapter->bDriverStopped, - padapter->bSurpriseRemoved); + padapter->bup, padapter->bDriverStopped, + padapter->bSurpriseRemoved); goto exit; }
@@ -231,11 +231,11 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)if (check_fwstate (pmlmepriv,WIFI_STATION_STATE ) &&check_fwstate (pmlmepriv, _FW_LINKED)) {pr_debug ("%s:%d %s(%pM), length:%d assoc_ssid.length:%d\n" , - __func__, __LINE__, - pmlmepriv->cur_network.network.ssid.ssid, - pmlmepriv->cur_network.network.MacAddress, - pmlmepriv->cur_network.network.ssid.ssid_length, - pmlmepriv->assoc_ssid.ssid_length); + __func__, __LINE__, + pmlmepriv->cur_network.network.ssid.ssid, + pmlmepriv->cur_network.network.MacAddress, + pmlmepriv->cur_network.network.ssid.ssid_length, + pmlmepriv->assoc_ssid.ssid_length); pmlmepriv->to_roaming =1 ; }
@@ -300,7 +300,7 @@ static int rtw_resume_process(struct adapter *padapter)if (pwrpriv) pwrpriv->bInSuspend = false;pr_debug ("<=== %s return %d.............. in %dms\n" , __func__, - ret,jiffies_to_msecs (jiffies - start_time)); + ret,jiffies_to_msecs (jiffies - start_time));return ret; }
@@ -322,7 +322,8 @@ static int rtw_resume(struct usb_interface *pusb_intf)*/ static struct adapter *rtw_usb_if1_init (struct dvobj_priv *dvobj, -struct usb_interface *pusb_intf,const struct usb_device_id *pdid) +struct usb_interface *pusb_intf, +const struct usb_device_id *pdid) {struct adapter *padapter =NULL ;struct net_device *pnetdev =NULL ;
@@ -380,7 +381,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,device_init_wakeup (&pusb_intf->dev,1 );pr_debug ("\n padapter->pwrctrlpriv.bSupportRemoteWakeup~~~~~~\n" );pr_debug ("\n padapter->pwrctrlpriv.bSupportRemoteWakeup~~~[%d]~~~\n" , - device_may_wakeup(&pusb_intf->dev)); + device_may_wakeup(&pusb_intf->dev)); }#endif
@@ -393,7 +394,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,rtw_macaddr_cfg (padapter->eeprompriv.mac_addr);memcpy (pnetdev->dev_addr, padapter->eeprompriv.mac_addr,ETH_ALEN );pr_debug ("MAC Address from pnetdev->dev_addr = %pM\n" , - pnetdev->dev_addr); + pnetdev->dev_addr);/* step 6. Tell the network stack we exist */ if (register_netdev (pnetdev) !=0 ) {
@@ -445,7 +446,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)rtw_dev_unload (if1);pr_debug ("+r871xu_dev_remove, hw_init_completed=%d\n" , - if1->hw_init_completed); + if1->hw_init_completed);rtw_free_drv_sw (if1);rtw_free_netdev (pnetdev); }
Signature · 1 line
2.28.0