Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c6f25533 authored by YAMANE Toshiaki's avatar YAMANE Toshiaki Committed by Greg Kroah-Hartman
Browse files

staging/rtl8187se: Fix spacing coding style in ieee80211/ieee80211_rx.c



The following warnings fixed.
- ERROR: space required before the open parenthesis '('
- ERROR: that open brace { should be on the previous line
- ERROR: space required before the open brace '{'
- ERROR: else should follow close brace '}'
- ERROR: space prohibited before that close parenthesis ')'

Signed-off-by: default avatarYAMANE Toshiaki <yamanetoshi@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 173d6b99
Loading
Loading
Loading
Loading
+54 −97
Original line number Diff line number Diff line
@@ -244,11 +244,9 @@ ieee80211_rx_frame_mgmt(struct ieee80211_device *ieee, struct sk_buff *skb,

/* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */
/* Ethernet-II snap header (RFC1042 for most EtherTypes) */
static unsigned char rfc1042_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
static unsigned char rfc1042_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
static unsigned char bridge_tunnel_header[] =
{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
static unsigned char bridge_tunnel_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
/* No encapsulation header if EtherType < 0x600 (=length) */

/* Called by ieee80211_rx_frame_decrypt */
@@ -506,17 +504,12 @@ int ieee80211_rtl_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
	frag = WLAN_GET_SEQ_FRAG(sc);

//YJ,add,080828,for keep alive
	if((fc & IEEE80211_FCTL_TODS) != IEEE80211_FCTL_TODS)
	{
		if(!memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN))
		{
	if ((fc & IEEE80211_FCTL_TODS) != IEEE80211_FCTL_TODS) {
		if (!memcmp(hdr->addr1, dev->dev_addr, ETH_ALEN)) {
			ieee->NumRxUnicast++;
		}
	}
	else
	{
		if(!memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN))
		{
	} else {
		if (!memcmp(hdr->addr3, dev->dev_addr, ETH_ALEN)) {
			ieee->NumRxUnicast++;
		}
	}
@@ -814,44 +807,25 @@ static inline int ieee80211_SignalStrengthTranslate(
	int RetSS;

	// Step 1. Scale mapping.
	if(CurrSS >= 71 && CurrSS <= 100)
	{
	if (CurrSS >= 71 && CurrSS <= 100) {
		RetSS = 90 + ((CurrSS - 70) / 3);
	}
	else if(CurrSS >= 41 && CurrSS <= 70)
	{
	} else if (CurrSS >= 41 && CurrSS <= 70) {
		RetSS = 78 + ((CurrSS - 40) / 3);
	}
	else if(CurrSS >= 31 && CurrSS <= 40)
	{
	} else if (CurrSS >= 31 && CurrSS <= 40) {
		RetSS = 66 + (CurrSS - 30);
	}
	else if(CurrSS >= 21 && CurrSS <= 30)
	{
	} else if (CurrSS >= 21 && CurrSS <= 30) {
		RetSS = 54 + (CurrSS - 20);
	}
	else if(CurrSS >= 5 && CurrSS <= 20)
	{
	} else if (CurrSS >= 5 && CurrSS <= 20) {
		RetSS = 42 + (((CurrSS - 5) * 2) / 3);
	}
	else if(CurrSS == 4)
	{
	} else if (CurrSS == 4) {
		RetSS = 36;
	}
	else if(CurrSS == 3)
	{
	} else if (CurrSS == 3) {
		RetSS = 27;
	}
	else if(CurrSS == 2)
	{
	} else if (CurrSS == 2) {
		RetSS = 18;
	}
	else if(CurrSS == 1)
	{
	} else if (CurrSS == 1) {
		RetSS = 9;
	}
	else
	{
	} else {
		RetSS = CurrSS;
	}
	//RT_TRACE(COMP_DBG, DBG_LOUD, ("##### After Mapping:  LastSS: %d, CurrSS: %d, RetSS: %d\n", LastSS, CurrSS, RetSS));
@@ -870,15 +844,12 @@ static inline void ieee80211_extract_country_ie(
	u8 * addr2
)
{
	if(IS_DOT11D_ENABLE(ieee))
	{
		if(info_element->len != 0)
		{
	if (IS_DOT11D_ENABLE(ieee)) {
		if (info_element->len != 0) {
			memcpy(network->CountryIeBuf, info_element->data, info_element->len);
			network->CountryIeLen = info_element->len;

			if(!IS_COUNTRY_IE_VALID(ieee))
			{
			if (!IS_COUNTRY_IE_VALID(ieee)) {
				Dot11d_UpdateCountryIe(ieee, addr2, info_element->len, info_element->data);
			}
		}
@@ -888,8 +859,7 @@ static inline void ieee80211_extract_country_ie(
		// some AP (e.g. Cisco 1242) don't include country IE in their
		// probe response frame.
		//
		if(IS_EQUAL_CIE_SRC(ieee, addr2) )
		{
		if (IS_EQUAL_CIE_SRC(ieee, addr2)) {
			UPDATE_CIE_WATCHDOG(ieee);
		}
	}
@@ -1266,8 +1236,7 @@ inline void update_network(struct ieee80211_network *dst,
	//printk("==========>in %s: src->ssid is %s,chan is %d\n",__func__,src->ssid,src->channel);

	//YJ,add,080819,for hidden ap
	if(src->ssid_len > 0)
	{
	if (src->ssid_len > 0) {
		//if(src->ssid_len == 13)
		//	printk("=====================>>>>>>>> Dst ssid: %s Src ssid: %s\n", dst->ssid, src->ssid);
		memset(dst->ssid, 0, dst->ssid_len);
@@ -1378,47 +1347,35 @@ inline void ieee80211_process_probe_response(
	// (2)  If there is no any country code in beacon,
	//       then wireless adapter should do active scan from ch1~11 and
	//       passive scan from ch12~14
	if(ieee->bGlobalDomain)
	{
		if (WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP)
		{
	if (ieee->bGlobalDomain) {
		if (WLAN_FC_GET_STYPE(beacon->header.frame_ctl) == IEEE80211_STYPE_PROBE_RESP) {
			// Case 1: Country code
			if(IS_COUNTRY_IE_VALID(ieee) )
			{
				if( !IsLegalChannel(ieee, network.channel) )
				{
			if (IS_COUNTRY_IE_VALID(ieee)) {
				if (!IsLegalChannel(ieee, network.channel)) {
					printk("GetScanInfo(): For Country code, filter probe response at channel(%d).\n", network.channel);
					return;
				}
			}
			// Case 2: No any country code.
			else
			{
			else {
				// Filter over channel ch12~14
				if(network.channel > 11)
				{
				if (network.channel > 11) {
					printk("GetScanInfo(): For Global Domain, filter probe response at channel(%d).\n", network.channel);
					return;
				}
			}
		}
		else
		{
		} else {
			// Case 1: Country code
			if(IS_COUNTRY_IE_VALID(ieee) )
			{
				if( !IsLegalChannel(ieee, network.channel) )
				{
			if (IS_COUNTRY_IE_VALID(ieee)) {
				if (!IsLegalChannel(ieee, network.channel)) {
					printk("GetScanInfo(): For Country code, filter beacon at channel(%d).\n", network.channel);
					return;
				}
			}
			// Case 2: No any country code.
			else
			{
			else {
				// Filter over channel ch12~14
				if(network.channel > 14)
				{
				if (network.channel > 14) {
					printk("GetScanInfo(): For Global Domain, filter beacon at channel(%d).\n", network.channel);
					return;
				}