[PATCH] Staging: rtl8192e: rtllib_rx: fixed alignment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed alignment.

Signed-off-by: Yusef Aslam <YUZi54780@xxxxxxxxxxx>
---
 drivers/staging/rtl8192e/rtllib_rx.c | 98 ++++++++++++++--------------
 1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_rx.c
b/drivers/staging/rtl8192e/rtllib_rx.c
index ebf8a2fd36d3..b1a476e29670 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -55,7 +55,7 @@ static inline void rtllib_monitor_rx(struct
rtllib_device *ieee,
 /* Called only as a tasklet (software IRQ) */
 static struct rtllib_frag_entry *
 rtllib_frag_cache_find(struct rtllib_device *ieee, unsigned int seq,
-			  unsigned int frag, u8 tid, u8 *src, u8 *dst)
+		       unsigned int frag, u8 tid, u8 *src, u8 *dst)
 {
 	struct rtllib_frag_entry *entry;
 	int i;
@@ -84,7 +84,7 @@ rtllib_frag_cache_find(struct rtllib_device *ieee,
unsigned int seq,
 /* Called only as a tasklet (software IRQ) */
 static struct sk_buff *
 rtllib_frag_cache_get(struct rtllib_device *ieee,
-			 struct ieee80211_hdr *hdr)
+		      struct ieee80211_hdr *hdr)
 {
 	struct sk_buff *skb = NULL;
 	u16 fc = le16_to_cpu(hdr->frame_control);
@@ -143,7 +143,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
 		 * should have already been received
 		 */
 		entry = rtllib_frag_cache_find(ieee, seq, frag, tid,
hdr->addr2,
-						  hdr->addr1);
+					       hdr->addr1);
 		if (entry) {
 			entry->last_frag = frag;
 			skb = entry->skb;
@@ -155,7 +155,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,
 
 /* Called only as a tasklet (software IRQ) */
 static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,
-					   struct ieee80211_hdr *hdr)
+					struct ieee80211_hdr *hdr)
 {
 	u16 fc = le16_to_cpu(hdr->frame_control);
 	u16 sc = le16_to_cpu(hdr->seq_ctrl);
@@ -181,7 +181,7 @@ static int rtllib_frag_cache_invalidate(struct
rtllib_device *ieee,
 	}
 
 	entry = rtllib_frag_cache_find(ieee, seq, -1, tid, hdr->addr2,
-					  hdr->addr1);
+				       hdr->addr1);
 
 	if (!entry) {
 		netdev_dbg(ieee->dev,
@@ -202,8 +202,8 @@ static int rtllib_frag_cache_invalidate(struct
rtllib_device *ieee,
  */
 static inline int
 rtllib_rx_frame_mgmt(struct rtllib_device *ieee, struct sk_buff *skb,
-			struct rtllib_rx_stats *rx_stats, u16 type,
-			u16 stype)
+		     struct rtllib_rx_stats *rx_stats, u16 type,
+		     u16 stype)
 {
 	/* On the struct stats definition there is written that
 	 * this is not mandatory.... but seems that the probe
@@ -228,7 +228,7 @@ rtllib_rx_frame_mgmt(struct rtllib_device *ieee,
struct sk_buff *skb,
 
 /* Called by rtllib_rx_frame_decrypt */
 static int rtllib_is_eapol_frame(struct rtllib_device *ieee,
-				    struct sk_buff *skb, size_t
hdrlen)
+				 struct sk_buff *skb, size_t hdrlen)
 {
 	struct net_device *dev = ieee->dev;
 	u16 fc, ethertype;
@@ -346,7 +346,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device
*ieee, struct sk_buff *skb,
 /* this function is stolen from ipw2200 driver*/
 #define IEEE_PACKET_RETRY_TIME (5 * HZ)
 static int is_duplicate_packet(struct rtllib_device *ieee,
-				      struct ieee80211_hdr *header)
+			       struct ieee80211_hdr *header)
 {
 	u16 fc = le16_to_cpu(header->frame_control);
 	u16 sc = le16_to_cpu(header->seq_ctrl);
@@ -411,10 +411,10 @@ static bool AddReorderEntry(struct rx_ts_record
*ts,
 	while (pList->next != &ts->rx_pending_pkt_list) {
 		if (SN_LESS(pReorderEntry->SeqNum, ((struct
rx_reorder_entry *)
 		    list_entry(pList->next, struct rx_reorder_entry,
-		    list))->SeqNum))
+			       list))->SeqNum))
 			pList = pList->next;
 		else if (SN_EQUAL(pReorderEntry->SeqNum,
-			((struct rx_reorder_entry *)list_entry(pList-
>next,
+				  ((struct rx_reorder_entry
*)list_entry(pList->next,
 			struct rx_reorder_entry, list))->SeqNum))
 			return false;
 		else
@@ -601,7 +601,7 @@ static void RxReorderIndicatePacket(struct
rtllib_device *ieee,
 		if (!list_empty(&ieee->RxReorder_Unused_List)) {
 			pReorderEntry = (struct rx_reorder_entry *)
 					list_entry(ieee-
>RxReorder_Unused_List.next,
-					struct rx_reorder_entry,
list);
+						   struct
rx_reorder_entry, list);
 			list_del_init(&pReorderEntry->list);
 
 			/* Make a reorder entry and insert
@@ -738,7 +738,7 @@ static u8 parse_subframe(struct rtllib_device
*ieee, struct sk_buff *skb,
 	/* just for debug purpose */
 	SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctrl));
 	if ((RTLLIB_QOS_HAS_SEQ(fc)) &&
-	   (((union frameqos *)(skb->data + RTLLIB_3ADDR_LEN))-
>field.reserved))
+	    (((union frameqos *)(skb->data + RTLLIB_3ADDR_LEN))-
>field.reserved))
 		is_aggregate_frame = true;
 
 	if (RTLLIB_QOS_HAS_SEQ(fc))
@@ -880,7 +880,7 @@ static int rtllib_rx_check_duplicate(struct
rtllib_device *ieee,
 	frag = WLAN_GET_SEQ_FRAG(sc);
 
 	if (!ieee->ht_info->cur_rx_reorder_enable ||
-		!ieee->current_network.qos_data.active ||
+	    !ieee->current_network.qos_data.active ||
 		!IsDataFrame(skb->data) ||
 		IsLegacyDataFrame(skb->data)) {
 		if (!ieee80211_is_beacon(hdr->frame_control)) {
@@ -980,7 +980,7 @@ static int rtllib_rx_data_filter(struct
rtllib_device *ieee, struct ieee80211_hd
 }
 
 static int rtllib_rx_get_crypt(struct rtllib_device *ieee, struct
sk_buff *skb,
-			struct lib80211_crypt_data **crypt, size_t
hdrlen)
+			       struct lib80211_crypt_data **crypt,
size_t hdrlen)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	u16 fc = le16_to_cpu(hdr->frame_control);
@@ -1012,8 +1012,8 @@ static int rtllib_rx_get_crypt(struct
rtllib_device *ieee, struct sk_buff *skb,
 }
 
 static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct
sk_buff *skb,
-		      struct rtllib_rx_stats *rx_stats,
-		      struct lib80211_crypt_data *crypt, size_t
hdrlen)
+			     struct rtllib_rx_stats *rx_stats,
+			     struct lib80211_crypt_data *crypt, size_t
hdrlen)
 {
 	struct ieee80211_hdr *hdr;
 	int keyidx = 0;
@@ -1096,7 +1096,7 @@ static int rtllib_rx_decrypt(struct rtllib_device
*ieee, struct sk_buff *skb,
 	 * encrypted/authenticated
 	 */
 	if ((fc & IEEE80211_FCTL_PROTECTED) &&
-		rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx,
crypt)) {
+	    rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
 		netdev_info(ieee->dev, "%s: ==>decrypt msdu error\n",
__func__);
 		return -1;
 	}
@@ -1156,10 +1156,10 @@ static void rtllib_rx_check_leave_lps(struct
rtllib_device *ieee, u8 unicast,
 }
 
 static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
-		struct rtllib_rx_stats *rx_stats,
-		struct rtllib_rxb *rxb,
-		u8 *dst,
-		u8 *src)
+					  struct rtllib_rx_stats
*rx_stats,
+					  struct rtllib_rxb *rxb,
+					  u8 *dst,
+					  u8 *src)
 {
 	struct net_device *dev = ieee->dev;
 	u16 ethertype;
@@ -1179,8 +1179,8 @@ static void rtllib_rx_indicate_pkt_legacy(struct
rtllib_device *ieee,
 			 */
 			ethertype = (sub_skb->data[6] << 8) | sub_skb-
>data[7];
 			if (sub_skb->len >= 8 &&
-				((memcmp(sub_skb->data,
rfc1042_header, SNAP_SIZE) == 0 &&
-				ethertype != ETH_P_AARP && ethertype
!= ETH_P_IPX) ||
+			    ((memcmp(sub_skb->data, rfc1042_header,
SNAP_SIZE) == 0 &&
+			      ethertype != ETH_P_AARP && ethertype !=
ETH_P_IPX) ||
 				memcmp(sub_skb->data,
bridge_tunnel_header, SNAP_SIZE) == 0)) {
 				/* remove RFC1042 or Bridge-Tunnel
encapsulation
 				 * and replace EtherType
@@ -1224,7 +1224,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct
rtllib_device *ieee,
 }
 
 static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct
sk_buff *skb,
-		 struct rtllib_rx_stats *rx_stats)
+				struct rtllib_rx_stats *rx_stats)
 {
 	struct net_device *dev = ieee->dev;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -1327,7 +1327,7 @@ static int rtllib_rx_InfraAdhoc(struct
rtllib_device *ieee, struct sk_buff *skb,
 		TID = Frame_QoSTID(skb->data);
 		SeqNum = WLAN_GET_SEQ_SEQ(sc);
 		rtllib_get_ts(ieee, (struct ts_common_info **)&ts,
hdr->addr2, TID,
-		      RX_DIR, true);
+			      RX_DIR, true);
 		if (TID != 0 && TID != 3)
 			ieee->bis_any_nonbepkts = true;
 	}
@@ -1384,7 +1384,7 @@ static int rtllib_rx_InfraAdhoc(struct
rtllib_device *ieee, struct sk_buff *skb,
 }
 
 static int rtllib_rx_Monitor(struct rtllib_device *ieee, struct
sk_buff *skb,
-		 struct rtllib_rx_stats *rx_stats)
+			     struct rtllib_rx_stats *rx_stats)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	u16 fc = le16_to_cpu(hdr->frame_control);
@@ -1416,7 +1416,7 @@ static int rtllib_rx_Monitor(struct rtllib_device
*ieee, struct sk_buff *skb,
  * This function is called only as a tasklet (software IRQ).
  */
 int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
-		 struct rtllib_rx_stats *rx_stats)
+	      struct rtllib_rx_stats *rx_stats)
 {
 	int ret = 0;
 
@@ -1581,10 +1581,10 @@ static int
rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee,
 		struct rtllib_qos_parameter_info param_element;
 
 		rc = rtllib_read_qos_param_element(&param_element,
-						      info_element);
+						   info_element);
 		if (rc == 0) {
			rtllib_qos_convert_ac_to_parameters(&param_element,
-							      
&(network->qos_data));
+							    &(network-
>qos_data));
 			network->flags |= NETWORK_HAS_QOS_PARAMETERS;
 			network->qos_data.param_count =
 			    param_element.info_element.ac_info & 0x0F;
@@ -1698,7 +1698,7 @@ static void rtllib_parse_mife_generic(struct
rtllib_device *ieee,
 			if (*tmp_htcap_len != 0) {
 				network->bssht.bd_ht_spec_ver =
HT_SPEC_VER_EWC;
 				network->bssht.bd_ht_cap_len =
min_t(u16, *tmp_htcap_len,
-								 
sizeof(network->bssht.bd_ht_cap_buf));
+							     
sizeof(network->bssht.bd_ht_cap_buf));
 				memcpy(network->bssht.bd_ht_cap_buf,
 				       info_element->data,
 				       network->bssht.bd_ht_cap_len);
@@ -1868,7 +1868,7 @@ static void rtllib_parse_mfie_ht_cap(struct
rtllib_info_element *info_element,
 	if (*tmp_htcap_len != 0) {
 		ht->bd_ht_spec_ver = HT_SPEC_VER_EWC;
 		ht->bd_ht_cap_len = min_t(u16, *tmp_htcap_len,
-				       sizeof(ht->bd_ht_cap_buf));
+					  sizeof(ht->bd_ht_cap_buf));
 		memcpy(ht->bd_ht_cap_buf, info_element->data, ht-
>bd_ht_cap_len);
 
 		ht->bd_support_ht = true;
@@ -1886,10 +1886,10 @@ static void rtllib_parse_mfie_ht_cap(struct
rtllib_info_element *info_element,
 }
 
 int rtllib_parse_info_param(struct rtllib_device *ieee,
-		struct rtllib_info_element *info_element,
-		u16 length,
-		struct rtllib_network *network,
-		struct rtllib_rx_stats *stats)
+			    struct rtllib_info_element *info_element,
+			    u16 length,
+			    struct rtllib_network *network,
+			    struct rtllib_rx_stats *stats)
 {
 	u8 i;
 	short offset;
@@ -1914,7 +1914,7 @@ int rtllib_parse_info_param(struct rtllib_device
*ieee,
 		switch (info_element->id) {
 		case MFIE_TYPE_SSID:
 			if (rtllib_is_empty_essid(info_element->data,
-						     info_element-
>len)) {
+						  info_element->len))
{
 				network->flags |= NETWORK_EMPTY_ESSID;
 				break;
 			}
@@ -2193,10 +2193,10 @@ static inline int rtllib_network_init(
 	network->wzc_ie_len = 0;
 
 	if (rtllib_parse_info_param(ieee,
-			beacon->info_element,
-			(stats->len - sizeof(*beacon)),
-			network,
-			stats))
+				    beacon->info_element,
+				    (stats->len - sizeof(*beacon)),
+				    network,
+				    stats))
 		return 1;
 
 	network->mode = 0;
@@ -2333,9 +2333,9 @@ static inline void update_network(struct
rtllib_device *ieee,
 
 	dst->wmm_info = src->wmm_info;
 	if (src->wmm_param[0].ac_aci_acm_aifsn ||
-	   src->wmm_param[1].ac_aci_acm_aifsn ||
-	   src->wmm_param[2].ac_aci_acm_aifsn ||
-	   src->wmm_param[3].ac_aci_acm_aifsn)
+	    src->wmm_param[1].ac_aci_acm_aifsn ||
+	    src->wmm_param[2].ac_aci_acm_aifsn ||
+	    src->wmm_param[3].ac_aci_acm_aifsn)
 		memcpy(dst->wmm_param, src->wmm_param,
WME_AC_PRAM_LEN);
 
 	dst->SignalStrength = src->SignalStrength;
@@ -2454,7 +2454,7 @@ static inline void rtllib_process_probe_response(
 
 	spin_lock_irqsave(&ieee->lock, flags);
 	if (is_same_network(&ieee->current_network, network,
-	   (network->ssid_len ? 1 : 0))) {
+			    (network->ssid_len ? 1 : 0))) {
 		update_network(ieee, &ieee->current_network, network);
 		if ((ieee->current_network.mode == WIRELESS_MODE_N_24G
||
 		     ieee->current_network.mode == WIRELESS_MODE_G) &&
@@ -2471,7 +2471,7 @@ static inline void rtllib_process_probe_response(
 	}
 	list_for_each_entry(target, &ieee->network_list, list) {
 		if (is_same_network(target, network,
-		   (target->ssid_len ? 1 : 0)))
+				    (target->ssid_len ? 1 : 0)))
 			break;
 		if (!oldest || (target->last_scanned < oldest-
>last_scanned))
 			oldest = target;
@@ -2532,7 +2532,7 @@ static inline void rtllib_process_probe_response(
 	spin_unlock_irqrestore(&ieee->lock, flags);
 	if (ieee80211_is_beacon(frame_ctl) &&
 	    is_same_network(&ieee->current_network, network,
-	    (network->ssid_len ? 1 : 0)) &&
+			    (network->ssid_len ? 1 : 0)) &&
 	    (ieee->link_state == MAC80211_LINKED)) {
 		ieee->handle_beacon(ieee->dev, beacon, &ieee-
>current_network);
 	}
@@ -2557,8 +2557,8 @@ static void rtllib_rx_mgt(struct rtllib_device
*ieee,
 				stats);
 
 		if (ieee->sta_sleep || (ieee->ps != RTLLIB_PS_DISABLED
&&
-		    ieee->iw_mode == IW_MODE_INFRA &&
-		    ieee->link_state == MAC80211_LINKED))
+					ieee->iw_mode == IW_MODE_INFRA
&&
+					ieee->link_state ==
MAC80211_LINKED))
 			schedule_work(&ieee->ps_task);
 	} else if (ieee80211_is_probe_resp(header->frame_control)) {
 		netdev_dbg(ieee->dev, "received PROBE RESPONSE\n");
-- 
2.44.2







[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux