Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Staging: wlan-ng: fixed coding style issues in p80211conv.c

This is a patch to the p80211conv.c file that fixes a couple of coding
style issues found by the checkpatch.pl tool.

Signed-off-by: Johan Meiring <johanmeiring@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Johan Meiring and committed by
Greg Kroah-Hartman
4eb28f71 4c510e95

+28 -17
+28 -17
drivers/staging/wlan-ng/p80211conv.c
··· 148 148 149 149 /* tack on SNAP */ 150 150 e_snap = 151 - (struct wlan_snap *) skb_push(skb, sizeof(struct wlan_snap)); 151 + (struct wlan_snap *) skb_push(skb, 152 + sizeof(struct wlan_snap)); 152 153 e_snap->type = htons(proto); 153 154 if (ethconv == WLAN_ETHCONV_8021h 154 155 && p80211_stt_findproto(proto)) { ··· 162 161 163 162 /* tack on llc */ 164 163 e_llc = 165 - (struct wlan_llc *) skb_push(skb, sizeof(struct wlan_llc)); 164 + (struct wlan_llc *) skb_push(skb, 165 + sizeof(struct wlan_llc)); 166 166 e_llc->dsap = 0xAA; /* SNAP, see IEEE 802 */ 167 167 e_llc->ssap = 0xAA; 168 168 e_llc->ctl = 0x03; ··· 299 297 if ((WLAN_GET_FC_TODS(fc) == 0) && (WLAN_GET_FC_FROMDS(fc) == 0)) { 300 298 memcpy(daddr, w_hdr->a3.a1, WLAN_ETHADDR_LEN); 301 299 memcpy(saddr, w_hdr->a3.a2, WLAN_ETHADDR_LEN); 302 - } else if ((WLAN_GET_FC_TODS(fc) == 0) && (WLAN_GET_FC_FROMDS(fc) == 1)) { 300 + } else if ((WLAN_GET_FC_TODS(fc) == 0) 301 + && (WLAN_GET_FC_FROMDS(fc) == 1)) { 303 302 memcpy(daddr, w_hdr->a3.a1, WLAN_ETHADDR_LEN); 304 303 memcpy(saddr, w_hdr->a3.a3, WLAN_ETHADDR_LEN); 305 - } else if ((WLAN_GET_FC_TODS(fc) == 1) && (WLAN_GET_FC_FROMDS(fc) == 0)) { 304 + } else if ((WLAN_GET_FC_TODS(fc) == 1) 305 + && (WLAN_GET_FC_FROMDS(fc) == 0)) { 306 306 memcpy(daddr, w_hdr->a3.a3, WLAN_ETHADDR_LEN); 307 307 memcpy(saddr, w_hdr->a3.a2, WLAN_ETHADDR_LEN); 308 308 } else { ··· 353 349 354 350 e_llc = (struct wlan_llc *) (skb->data + payload_offset); 355 351 e_snap = 356 - (struct wlan_snap *) (skb->data + payload_offset + sizeof(struct wlan_llc)); 352 + (struct wlan_snap *) (skb->data + payload_offset + 353 + sizeof(struct wlan_llc)); 357 354 358 355 /* Test for the various encodings */ 359 356 if ((payload_length >= sizeof(struct wlan_ethhdr)) && ··· 377 372 /* chop off the 802.11 CRC */ 378 373 skb_trim(skb, skb->len - WLAN_CRC_LEN); 379 374 380 - } else if ((payload_length >= sizeof(struct wlan_llc) + sizeof(struct wlan_snap)) 381 - && (e_llc->dsap == 0xaa) && (e_llc->ssap == 0xaa) 382 - && (e_llc->ctl == 0x03) 375 + } else if ((payload_length >= sizeof(struct wlan_llc) + 376 + sizeof(struct wlan_snap)) 377 + &&(e_llc->dsap == 0xaa) 378 + && (e_llc->ssap == 0xaa) 379 + && (e_llc->ctl == 0x03) 383 380 && 384 381 (((memcmp(e_snap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN) == 0) 385 382 && (ethconv == WLAN_ETHCONV_8021h) ··· 413 406 /* chop off the 802.11 CRC */ 414 407 skb_trim(skb, skb->len - WLAN_CRC_LEN); 415 408 416 - } else if ((payload_length >= sizeof(struct wlan_llc) + sizeof(struct wlan_snap)) 417 - && (e_llc->dsap == 0xaa) && (e_llc->ssap == 0xaa) 418 - && (e_llc->ctl == 0x03)) { 409 + } else if ((payload_length >= sizeof(struct wlan_llc) + 410 + sizeof(struct wlan_snap)) 411 + &&(e_llc->dsap == 0xaa) 412 + && (e_llc->ssap == 0xaa) 413 + && (e_llc->ctl == 0x03)) { 419 414 pr_debug("802.1h/RFC1042 len: %d\n", payload_length); 420 - /* it's an 802.1h frame || (an RFC1042 && protocol is not in STT) */ 421 - /* build a DIXII + RFC894 */ 415 + /* it's an 802.1h frame || (an RFC1042 && protocol not in STT) 416 + build a DIXII + RFC894 */ 422 417 423 418 /* Test for an overlength frame */ 424 - if ((payload_length - sizeof(struct wlan_llc) - sizeof(struct wlan_snap)) 425 - > netdev->mtu) { 419 + if ((payload_length - sizeof(struct wlan_llc) - 420 + sizeof(struct wlan_snap)) 421 + > netdev->mtu) { 426 422 /* A bogus length ethfrm has been sent. */ 427 423 /* Is someone trying an oflow attack? */ 428 424 printk(KERN_ERR "DIXII frame too large (%ld > %d)\n", 429 - (long int)(payload_length - sizeof(struct wlan_llc) - 430 - sizeof(struct wlan_snap)), netdev->mtu); 425 + (long int)(payload_length - 426 + sizeof(struct wlan_llc) - 427 + sizeof(struct wlan_snap)), netdev->mtu); 431 428 return 1; 432 429 } 433 430