Commit 18ac97e9 authored by Artur Stupa's avatar Artur Stupa Committed by Greg Kroah-Hartman
Browse files

staging: rtl8723bs: core: fix block comment style issues



Fix the following checkpatch warnings for block comments:
* Block comments should align the * on each line
* Block comments use * on subsequent lines
* Block comments use a trailing */ on a separate line

No functional changes.

Signed-off-by: default avatarArtur Stupa <arthur.stupa@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/20251121224143.33701-1-arthur.stupa@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 706cc5a9
Loading
Loading
Loading
Loading
+13 −9
Original line number Diff line number Diff line
@@ -132,9 +132,7 @@ u8 *rtw_set_ie(u8 *pbuf,
	return pbuf + len + 2;
}

/*----------------------------------------------------------------------------
index: the information element id index, limit is the limit for search
-----------------------------------------------------------------------------*/
/* index: the information element id index, limit is the limit for search */
u8 *rtw_get_ie(u8 *pbuf, signed int index, signed int *len, signed int limit)
{
	signed int tmp, i;
@@ -767,21 +765,27 @@ static int rtw_ieee802_11_parse_vendor_specific(u8 *pos, uint elen,
{
	unsigned int oui;

	/* first 3 bytes in vendor specific information element are the IEEE
	/*
	 * first 3 bytes in vendor specific information element are the IEEE
	 * OUI of the vendor. The following byte is used a vendor specific
	 * sub-type. */
	 * sub-type.
	 */
	if (elen < 4)
		return -1;

	oui = get_unaligned_be24(pos);
	switch (oui) {
	case OUI_MICROSOFT:
		/* Microsoft/Wi-Fi information elements are further typed and
		 * subtyped */
		/*
		 * Microsoft/Wi-Fi information elements are further typed and
		 * subtyped
		 */
		switch (pos[3]) {
		case 1:
			/* Microsoft OUI (00:50:F2) with OUI Type 1:
			 * real WPA information element */
			/*
			 * Microsoft OUI (00:50:F2) with OUI Type 1:
			 * real WPA information element
			 */
			elems->wpa_ie = pos;
			elems->wpa_ie_len = elen;
			break;
+22 −26
Original line number Diff line number Diff line
@@ -5,24 +5,22 @@
 *
 ******************************************************************************/
/*

The purpose of rtw_io.c

a. provides the API

b. provides the protocol engine

c. provides the software interface between caller and the hardware interface


Compiler Flag Option:

1. CONFIG_SDIO_HCI:
    a. USE_SYNC_IRP:  Only sync operations are provided.
    b. USE_ASYNC_IRP:Both sync/async operations are provided.

jackson@realtek.com.tw

 * The purpose of rtw_io.c
 *
 * a. provides the API
 *
 * b. provides the protocol engine
 *
 * c. provides the software interface between caller and the hardware interface
 *
 *
 * Compiler Flag Option:
 *
 * 1. CONFIG_SDIO_HCI:
 *  a. USE_SYNC_IRP:  Only sync operations are provided.
 *  b. USE_ASYNC_IRP:Both sync/async operations are provided.
 *
 *  jackson@realtek.com.tw
 */

#include <drv_types.h>
@@ -149,9 +147,7 @@ int rtw_inc_and_chk_continual_io_error(struct dvobj_priv *dvobj)
	return false;
}

/*
* Set the continual_io_error of this @param dvobjprive to 0
*/
/* Set the continual_io_error of this @param dvobjprive to 0 */
void rtw_reset_continual_io_error(struct dvobj_priv *dvobj)
{
	atomic_set(&dvobj->continual_io_error, 0);
+35 −41
Original line number Diff line number Diff line
@@ -214,9 +214,9 @@ void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *
}

/*
	return the wlan_network with the matching addr

	Shall be called under atomic context... to avoid possible racing condition...
 * return the wlan_network with the matching addr
 *
 * Shall be called under atomic context... to avoid possible racing condition...
 */
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
@@ -319,9 +319,9 @@ void rtw_free_network_nolock(struct adapter *padapter, struct wlan_network *pnet
}

/*
	return the wlan_network with the matching addr

	Shall be called under atomic context... to avoid possible racing condition...
 * return the wlan_network with the matching addr
 *
 * Shall be called under atomic context... to avoid possible racing condition...
 */
struct	wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
{
@@ -476,9 +476,7 @@ static void update_current_network(struct adapter *adapter, struct wlan_bssid_ex
	}
}

/*
Caller must hold pmlmepriv->lock first.
*/
/* Caller must hold pmlmepriv->lock first. */
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
{
	struct list_head	*plist, *phead;
@@ -510,8 +508,10 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
			oldest = pnetwork;
	}

	/* If we didn't find a match, then get a new network slot to initialize
	 * with this beacon's information */
	/*
	 * If we didn't find a match, then get a new network slot to initialize
	 * with this beacon's information
	 */
	if (!target_find) {
		if (list_empty(&pmlmepriv->free_bss_pool.queue)) {
			/* If there are no more slots, expire the oldest */
@@ -843,9 +843,7 @@ static void find_network(struct adapter *adapter)
		rtw_free_network_nolock(adapter, pwlan);
}

/*
*rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock
*/
/* rtw_free_assoc_resources: the caller has to lock pmlmepriv->lock */
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
{
	struct	mlme_priv *pmlmepriv = &adapter->mlmepriv;
@@ -879,9 +877,7 @@ void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
	rtw_reset_rx_info(pdbgpriv);
}

/*
*rtw_indicate_connect: the caller has to lock pmlmepriv->lock
*/
/* rtw_indicate_connect: the caller has to lock pmlmepriv->lock */
void rtw_indicate_connect(struct adapter *padapter)
{
	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -908,9 +904,7 @@ void rtw_indicate_connect(struct adapter *padapter)
	rtw_set_scan_deny(padapter, 3000);
}

/*
*rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock
*/
/* rtw_indicate_disconnect: the caller has to lock pmlmepriv->lock */
void rtw_indicate_disconnect(struct adapter *padapter)
{
	struct	mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -1829,10 +1823,10 @@ static int rtw_check_join_candidate(struct mlme_priv *mlme
}

/*
Calling context:
The caller of the sub-routine will be in critical section...
The caller must hold the following spinlock
pmlmepriv->lock
 * Calling context:
 * The caller of the sub-routine will be in critical section...
 * The caller must hold the following spinlock
 * pmlmepriv->lock
 */

int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
+14 −45
Original line number Diff line number Diff line
@@ -18,9 +18,7 @@ static struct mlme_handler mlme_sta_tbl[] = {
	{WIFI_PROBEREQ,		"OnProbeReq",	&OnProbeReq},
	{WIFI_PROBERSP,		"OnProbeRsp",		&OnProbeRsp},

	/*----------------------------------------------------------
					below 2 are reserved
	-----------------------------------------------------------*/
	/* below 2 are reserved */
	{0,					"DoReserved",		&DoReserved},
	{0,					"DoReserved",		&DoReserved},
	{WIFI_BEACON,		"OnBeacon",		&OnBeacon},
@@ -50,9 +48,7 @@ static struct action_handler OnAction_tbl[] = {

static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};

/**************************************************
OUI definitions for the vendor specific IE
***************************************************/
/* OUI definitions for the vendor specific IE */
unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01};
unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02};
unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04};
@@ -64,9 +60,7 @@ unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};

static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};

/********************************************************
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 */
@@ -187,11 +181,7 @@ int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
	return i;
}

/****************************************************************************

Following are the initialization functions for WiFi MLME

*****************************************************************************/
/* Following are the initialization functions for WiFi MLME */

int init_hw_mlme_ext(struct adapter *padapter)
{
@@ -507,11 +497,7 @@ void mgt_dispatcher(struct adapter *padapter, union recv_frame *precv_frame)
	}
}

/****************************************************************************

Following are the callback functions for each subtype of the management frames

*****************************************************************************/
/* Following are the callback functions for each subtype of the management frames */

unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
{
@@ -1950,11 +1936,7 @@ inline struct xmit_frame *alloc_mgtxmitframe(struct xmit_priv *pxmitpriv)
	return _alloc_mgtxmitframe(pxmitpriv, false);
}

/****************************************************************************

Following are some TX functions for WiFi MLME

*****************************************************************************/
/* Following are some TX functions for WiFi MLME */

void update_mgnt_tx_rate(struct adapter *padapter, u8 rate)
{
@@ -3797,11 +3779,7 @@ unsigned int send_beacon(struct adapter *padapter)
		return _SUCCESS;
}

/****************************************************************************

Following are some utility functions for WiFi MLME

*****************************************************************************/
/* Following are some utility functions for WiFi MLME */

void site_survey(struct adapter *padapter)
{
@@ -4392,11 +4370,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
	}
}

/****************************************************************************

Following are the functions to report events

*****************************************************************************/
/* Following are the functions to report events */

void report_survey_event(struct adapter *padapter, union recv_frame *precv_frame)
{
@@ -4692,11 +4666,7 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
	rtw_enqueue_cmd(pcmdpriv, pcmd_obj);
}

/****************************************************************************

Following are the event callback functions

*****************************************************************************/
/* Following are the event callback functions */

/* for sta/adhoc mode */
void update_sta_info(struct adapter *padapter, struct sta_info *psta)
@@ -4863,8 +4833,10 @@ void mlmeext_joinbss_event_callback(struct adapter *padapter, int join_res)

		rtw_sta_media_status_rpt(padapter, psta, 1);

		/* wakeup macid after join bss successfully to ensure
			the subsequent data frames can be sent out normally */
		/*
		 * wakeup macid after join bss successfully to ensure
		 * the subsequent data frames can be sent out normally
		 */
		rtw_hal_macid_wakeup(padapter, psta->mac_id);
	}

@@ -4940,11 +4912,8 @@ void mlmeext_sta_del_event_callback(struct adapter *padapter)
		rtw_mlmeext_disconnect(padapter);
}

/****************************************************************************

Following are the functions for the timer handlers
/* Following are the functions for the timer handlers */

*****************************************************************************/
void _linked_info_dump(struct adapter *padapter)
{
	int i;
+36 −43
Original line number Diff line number Diff line
@@ -30,9 +30,7 @@ const char *security_type_str(u8 value)

/* WEP related ===== */

/*
	Need to consider the fragment  situation
*/
/* Need to consider the fragment  situation */
void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
{																	/*  exclude ICV */
	union {
@@ -344,7 +342,6 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in R
};

/*
**********************************************************************
 * Routine: Phase 1 -- generate P1K, given TA, TK, IV32
 *
 * Inputs:
@@ -357,8 +354,6 @@ static const unsigned short Sbox1[2][256] = { /* Sbox for hash (can be in R
 * Note:
 *     This function only needs to be called every 2**16 packets,
 *     although in theory it could be called every packet.
*
**********************************************************************
 */
static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
{
@@ -386,7 +381,6 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)


/*
**********************************************************************
 * Routine: Phase 2 -- generate RC4KEY, given TK, P1K, IV16
 *
 * Inputs:
@@ -405,8 +399,6 @@ static void phase1(u16 *p1k, const u8 *tk, const u8 *ta, u32 iv32)
 * Suggested implementation optimization: if PPK[] is "overlaid"
 *     appropriately on RC4KEY[], there is no need for the final
 *     for loop below that copies the PPK[] result into RC4KEY[].
*
**********************************************************************
 */
static void phase2(u8 *rc4key, const u8 *tk, const u16 *p1k, u16 iv16)
{
@@ -1483,7 +1475,8 @@ static int omac1_aes_128_vector(u8 *key, size_t num_elem,
 * This is a mode for using block cipher (AES in this case) for authentication.
 * OMAC1 was standardized with the name CMAC by NIST in a Special Publication
 * (SP) 800-38B.
 * modify for CONFIG_IEEE80211W */
 * modify for CONFIG_IEEE80211W
 */
int omac1_aes_128(u8 *key, u8 *data, size_t data_len, u8 *mac)
{
	return omac1_aes_128_vector(key, 1, &data, &data_len, mac);
Loading