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

Commit ef1a0ed7 authored by Andrew Elwell's avatar Andrew Elwell Committed by Greg Kroah-Hartman
Browse files

Staging: wlan-ng - checkpatch.pl fixups



Basic fixups in the staging/wlan-ng directory.
(First kernel patch - thanks to FOSDEM talk)

Signed-off-by: default avatarAndrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6705b68d
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -118,10 +118,10 @@
#include <linux/wireless.h>
#include <linux/netdevice.h>
#include <linux/timer.h>
#include <asm/io.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <asm/byteorder.h>
#include <asm/bitops.h>
#include <linux/bitops.h>
#include <linux/list.h>
#include <linux/usb.h>
#include <linux/byteorder/generic.h>
@@ -3642,7 +3642,7 @@ static void hfa384x_int_rxmonitor(wlandevice_t *wlandev,
		/* check for unencrypted stuff if WEP bit set. */
		if (*(datap - hdrlen + 1) & 0x40)	/* wep set */
			if ((*(datap) == 0xaa) && (*(datap + 1) == 0xaa))
				*(datap - hdrlen + 1) &= 0xbf;	// clear wep; it's the 802.2 header!
				*(datap - hdrlen + 1) &= 0xbf;	/* clear wep; it's the 802.2 header! */
	}

	if (hw->sniff_fcs) {
+28 −28
Original line number Diff line number Diff line
@@ -46,8 +46,8 @@
#include <linux/wireless.h>
#include <net/iw_handler.h>
#include <linux/if_arp.h>
#include <asm/bitops.h>
#include <asm/uaccess.h>
#include <linux/bitops.h>
#include <linux/uaccess.h>
#include <asm/byteorder.h>
#include <linux/if_ether.h>
#include <linux/bitops.h>
+32 −37
Original line number Diff line number Diff line
@@ -264,7 +264,7 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
	/* Build the PDA we're going to use. */
	if (read_cardpda(&pda, wlandev)) {
		printk(KERN_ERR "load_cardpda failed, exiting.\n");
		return (1);
		return 1;
	}

	/* read the card's PRI-SUP */
@@ -286,9 +286,8 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)

	/* DIDmsg_dot11req_mibget */
	prism2mgmt_mibset_mibget(wlandev, &getmsg);
	if (getmsg.resultcode.data != P80211ENUM_resultcode_success) {
	if (getmsg.resultcode.data != P80211ENUM_resultcode_success)
		printk(KERN_ERR "Couldn't fetch PRI-SUP info\n");
	}

	/* Already in host order */
	priid.role = *data++;
@@ -301,19 +300,19 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
	result = read_fwfile(rfptr);
	if (result) {
		printk(KERN_ERR "Failed to read the data exiting.\n");
		return (1);
		return 1;
	}

	result = validate_identity();

	if (result) {
		printk(KERN_ERR "Incompatible firmware image.\n");
		return (1);
		return 1;
	}

	if (startaddr == 0x00000000) {
		printk(KERN_ERR "Can't RAM download a Flash image!\n");
		return (1);
		return 1;
	}

	/* Make the image chunks */
@@ -323,20 +322,20 @@ int prism2_fwapply(const struct ihex_binrec *rfptr, wlandevice_t *wlandev)
	result = plugimage(fchunk, nfchunks, s3plug, ns3plug, &pda);
	if (result) {
		printk(KERN_ERR "Failed to plug data.\n");
		return (1);
		return 1;
	}

	/* Insert any CRCs */
	if (crcimage(fchunk, nfchunks, s3crc, ns3crc)) {
		printk(KERN_ERR "Failed to insert all CRCs\n");
		return (1);
		return 1;
	}

	/* Write the image */
	result = writeimage(wlandev, fchunk, nfchunks);
	if (result) {
		printk(KERN_ERR "Failed to ramwrite image data.\n");
		return (1);
		return 1;
	}

	/* clear any allocated memory */
@@ -434,10 +433,9 @@ void free_chunks(imgchunk_t *fchunk, unsigned int *nfchunks)
{
	int i;
	for (i = 0; i < *nfchunks; i++) {
		if (fchunk[i].data != NULL) {
		if (fchunk[i].data != NULL)
			kfree(fchunk[i].data);
	}
	}
	*nfchunks = 0;
	memset(fchunk, 0, sizeof(*fchunk));

@@ -531,7 +529,7 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
		if (clist[i].data == NULL) {
			printk(KERN_ERR
			       "failed to allocate image space, exitting.\n");
			return (1);
			return 1;
		}
		memset(clist[i].data, 0, clist[i].len);
		pr_debug("chunk[%d]: addr=0x%06x len=%d\n",
@@ -545,15 +543,14 @@ int mkimage(imgchunk_t *clist, unsigned int *ccnt)
		for (j = 0; j < *ccnt; j++) {
			cstart = clist[j].addr;
			cend = cstart + clist[j].len - 1;
			if (s3start >= cstart && s3end <= cend) {
			if (s3start >= cstart && s3end <= cend)
				break;
		}
		}
		if (((unsigned int)j) >= (*ccnt)) {
			printk(KERN_ERR
			       "s3rec(a=0x%06x,l=%d), no chunk match, exiting.\n",
			       s3start, s3data[i].len);
			return (1);
			return 1;
		}
		coffset = s3start - cstart;
		memcpy(clist[j].data + coffset, s3data[i].data, s3data[i].len);
@@ -623,7 +620,7 @@ int mkpdrlist(pda_t *pda)
		printk(KERN_ERR
		       "no end record found or invalid lengths in "
		       "PDR data, exiting. %x %d\n", curroff, pda->nrec);
		return (1);
		return 1;
	}
	if (le16_to_cpu(pda16[curroff + 1]) == HFA384x_PDR_END_OF_PDA) {
		pda->rec[pda->nrec] = (hfa384x_pdrec_t *) &(pda16[curroff]);
@@ -1160,10 +1157,7 @@ int validate_identity(void)
			}
			/* SEC compat range */
			if ((s3info[i].info.compat.role == 1) &&
			    (s3info[i].info.compat.id == 4)) {

			}

			    (s3info[i].info.compat.id == 4))
			break;
		case 3:
			pr_debug("Seq: %#x\n", s3info[i].info.buildseq);
@@ -1196,8 +1190,9 @@ int validate_identity(void)
			pr_debug("Unknown inforec type %d\n", s3info[i].type);
		}
	}
	// walk through
	/* walk through */

	if (trump && (result != 2)) result = 0;
	if (trump && (result != 2))
		result = 0;
	return result;
}
+13 −17
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@
#include <linux/wireless.h>
#include <linux/netdevice.h>
#include <linux/delay.h>
#include <asm/io.h>
#include <linux/io.h>
#include <asm/byteorder.h>
#include <linux/random.h>
#include <linux/usb.h>
@@ -1157,9 +1157,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
				/* Save macport 0 state */
				result = hfa384x_drvr_getconfig16(hw,
						  HFA384x_RID_CNFPORTTYPE,
								  &
								  (hw->
								   presniff_port_type));
						  &(hw->presniff_port_type));
				if (result) {
					pr_debug
					    ("failed to read porttype, result=%d\n",
@@ -1169,9 +1167,7 @@ int prism2mgmt_wlansniff(wlandevice_t *wlandev, void *msgp)
				/* Save the wepflags state */
				result = hfa384x_drvr_getconfig16(hw,
						  HFA384x_RID_CNFWEPFLAGS,
								  &
								  (hw->
								   presniff_wepflags));
						  &(hw->presniff_wepflags));
				if (result) {
					pr_debug
					    ("failed to read wepflags, result=%d\n",
+5 −6
Original line number Diff line number Diff line
@@ -113,8 +113,7 @@ static int prism2mib_flag(mibrec_t *mib,
			  p80211msg_dot11req_mibset_t *msg, void *data);

static int prism2mib_wepdefaultkey(mibrec_t *mib,
				   int isget,
				   wlandevice_t * wlandev,
				   int isget, wlandevice_t *wlandev,
				   hfa384x_t *hw,
				   p80211msg_dot11req_mibset_t *msg,
				   void *data);
Loading