summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/airo.c
AgeCommit message (Collapse)Author
2008-06-04airo warning fixAndrew Morton
WARNING: space prohibited between function name and open parenthesis '(' #22: FILE: drivers/net/wireless/airo.c:2907: + while ((IN4500 (ai, COMMAND) & COMMAND_BUSY) && (delay < 10000)) { total: 0 errors, 1 warnings, 8 lines checked ./patches/wireless-airo-waitbusy-wont-delay.patch has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. Please run checkpatch prior to sending patches Cc: Dan Williams <dcbw@redhat.com> Cc: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-16wireless: Create 'device' symlink in sysfsMasakazu Mokuno
Some network interfaces of the wireless drivers lack the 'device' symlink in sysfs. This patch lets the drivers create the links. Signed-off-by: Masakazu Mokuno <mokuno@sm.sony.co.jp> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-16wireless, airo: waitbusy() won't delayRoel Kluin
There will be no delay even when COMMAND_BUSY (defined 0x8000) is set: 0x8000 & (delay < 10000) will evaluate to 0 - when delay is 0. Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-29wireless: use get/put_unaligned_* helpersHarvey Harrison
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Michael Buesch <mb@bu3sch.de> Cc: Daniel Drake <dsd@gentoo.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29netdev: use non-racy method for proc entries creationDenis V. Lunev
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29proc: remove proc_root_driverAlexey Dobriyan
Use creation by full path: "driver/foo". Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-01-28airo: last of endianness annotationsAl Viro
sanitize handling of ConfigRid Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize handling of StatusRidAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize APListRid handlingAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize handling of CapabilityRidAl Viro
Don't byteswap any fields, annotate. That has caught a bug, BTW - will be handled in the next patch. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize handling of StatsRidAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize handling of WepKeyRidAl Viro
don't byteswap, update users to match that, annotate. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize BSSListRid handlingAl Viro
Stop byteswap-in-place in readBSSListRid(), annotate the sucker. BTW, that had immediately found a bug - another codepath fetching the same struct from card did _not_ byteswap, but used ->dBm the same as everything else - host-endian. Fix in the next patch... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28bap_read()/bap_write() work with fixed-endian buffersAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: sanitize handling of SSID_ridAl Viro
* store SSID_rid without conversions * sanitize proc_SSID_on_close() (and avoid access past the end of buffer, while we are at it) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: trivial endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: fix writerids() endiannessAl Viro
in writerids() we do _not_ byteswap, so we want to access ->opmode as little-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo endianness bug: cap_rid.extSoftCapAl Viro
never had been byteswapped, used as host-endian... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: bug in airo_interrupt() handling on incoming 802.11Al Viro
On big-endian we end up with swapped first two bytes in packet, due to earlier conversion to host-endian and forgotten conversion back. The code we calculated that host-endian for had been duplicated several time - it finds the 802.11 MAC header length by the first two bytes of packet; taken into a new helper (header_len(__le16 ctl)). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: fix endianness bug in ->dBm handlingAl Viro
airo_translate_scan() reads BSSListRid directly, does _not_ byteswap and uses ->dBm (__le16) as host-endian. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28airo: fix transmit_802_11_packet()Al Viro
a) gaplen would better be stored little-endian b) for control packets (shorter than 24-byte header) we ended up with bap_write(ai, hdrlen == 30 ? (const u16*)&gap.gaplen : (const u16*)&gap, 38 - hdrlen, BAP1); passing to card the data past the end of gap (i.e. random stuff from stack) and did _not_ feed the gaplen at the right offset. c) sending the contents of uninitialized fields of struct is Not Nice(tm) either Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-01-28NULL noise in drivers/netAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-01-28wireless: checkpatch cleanupsJeff Garzik
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28[netdrvr] irq handler minor cleanups in several driversJeff Garzik
* use irq_handler_t where appropriate * no need to use 'irq' function arg, its already stored in a data struct * rename irq handler 'irq' argument to 'dummy', where the function has been analyzed and proven not to use its first argument. * remove always-false "dev_id == NULL" test from irq handlers * remove pointless casts from void* * declance: irq argument is not const * add KERN_xxx printk prefix * fix minor whitespace weirdness Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-01-28wireless: fix '!x & y' typo'sRoel Kluin
Fix priority mistakes similar to '!x & y' Signed-off-by: Roel Kluin <12o3l@tiscali.nl> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-10-10[NET]: Move hardware header operations out of netdevice.Stephen Hemminger
Since hardware header operations are part of the protocol class not the device instance, make them into a separate object and save memory. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Wrap hard_header_parseStephen Hemminger
Wrap the hard_header_parse function to simplify next step of header_ops conversion. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()Joe Perches
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10drivers/net/: all drivers/net/ cleanup with ARRAY_SIZEDenis Cheng
Signed-off-by: Denis Cheng <crquan@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-10-10[NET]: Nuke SET_MODULE_OWNER macro.Ralf Baechle
It's been a useless no-op for long enough in 2.6 so I figured it's time to remove it. The number of people that could object because they're maintaining unified 2.4 and 2.6 drivers is probably rather small. [ Handled drivers added by netdev tree and some missed IRDA cases... -DaveM ] Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-10-10[PATCH] remove gratuitous space in airo module descriptionBill Nottingham
Currently the modinfo looks like: description: Support for Cisco/Aironet 802.11 wireless ethernet cards. Direct support for ISA/PCI/MPI cards and support for PCMCIA when used with airo_cs. Arguably, it should be cut at the end of the first sentence. This at least makes it somewhat more legible. Signed-off-by: Bill Nottingham <notting@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-17Freezer: make kernel threads nonfreezable by defaultRafael J. Wysocki
Currently, the freezer treats all tasks as freezable, except for the kernel threads that explicitly set the PF_NOFREEZE flag for themselves. This approach is problematic, since it requires every kernel thread to either set PF_NOFREEZE explicitly, or call try_to_freeze(), even if it doesn't care for the freezing of tasks at all. It seems better to only require the kernel threads that want to or need to be frozen to use some freezer-related code and to remove any freezer-related code from the other (nonfreezable) kernel threads, which is done in this patch. The patch causes all kernel threads to be nonfreezable by default (ie. to have PF_NOFREEZE set by default) and introduces the set_freezable() function that should be called by the freezable kernel threads in order to unset PF_NOFREEZE. It also makes all of the currently freezable kernel threads call set_freezable(), so it shouldn't cause any (intentional) change of behaviour to appear. Additionally, it updates documentation to describe the freezing of tasks more accurately. [akpm@linux-foundation.org: build fixes] Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Nigel Cunningham <nigel@nigel.suspend2.net> Cc: Pavel Machek <pavel@ucw.cz> Cc: Oleg Nesterov <oleg@tv-sign.ru> Cc: Gautham R Shenoy <ego@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-10[PATCH] airo: start with radio offMichal Schmidt
Don't turn the radio on until the interface is up. This saves some power in case the driver is loaded but the card is not used. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-10[PATCH] airo: simpler calling convention for enable_MAC()Michal Schmidt
Callers of enable_MAC() shouldn't have to worry about the bits in the response's status word (and most of them don't). The return value is sufficient information. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-10[PATCH] airo: fix a race causing initialization failuresMichal Schmidt
Matteo Croce reported Aironet initialization failures. They were caused by a race in airo. airo finds a free interface name, then initializes the card and finally registers the interface. Another device may get the same name in the meantime. The reason airo gets its name early is to use it in informative printks and to name the resources it requests. The printks will be just fine without the interface name and the resources can use the driver's name - that's what other network drivers do anyway. One of the talkative functions is setup_card(). It is called once before registration and can be called later again. Let's have an empty dev->name during the first call, so it doesn't print the ugly "airo(eth%d)" message. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-10[PATCH] airo: delay some initialization until the netdev is upMichal Schmidt
airo's kernel thread and the IRQ handler are needed only when the interface is up. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-07-10[PATCH] airo: disable the PCI device when unloading moduleMichal Schmidt
Fix an assymetry between pci_{enable,disable}_device. airo did not disable the PCI device when unloading the module. This caused suspend failures after modprobe -r airo && modprobe airo. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap
Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-04-28[PATCH] airo: Make /sys/bus/pci/drivers/airo/{,un}bind workMichal Schmidt
The way airo.c keeps track of all its devices is complicated and buggy as well (del_airo_dev forgets to free the memory add_airo_dev allocates). It's cleaner to use the standard list primitives. While we're at it, it's not necessary to put PCI cards in the list, because the kernel already keeps track of them. We can take advantage of it and use the .remove callback as it was meant to be. This makes /sys/bus/pci/drivers/airo/{,un}bind work. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-28[PATCH] airo: Don't check for NULL before kfree()Michal Schmidt
It's unnecessary to check for NULL before calling kfree(). Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-04-25[SK_BUFF]: Introduce skb_mac_header()Arnaldo Carvalho de Melo
For the places where we need a pointer to the mac header, it is still legal to touch skb->mac.raw directly if just adding to, subtracting from or setting it to another layer header. This one also converts some more cases to skb_reset_mac_header() that my regex missed as it had no spaces before nor after '=', ugh. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[SK_BUFF]: Introduce skb_reset_mac_header(skb)Arnaldo Carvalho de Melo
For the common, open coded 'skb->mac.raw = skb->data' operation, so that we can later turn skb->mac.raw into a offset, reducing the size of struct sk_buff in 64bit land while possibly keeping it as a pointer on 32bit. This one touches just the most simple case, next will handle the slightly more "complex" cases. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-04-25[ETH]: Make eth_type_trans set skb->dev like the other *_type_transArnaldo Carvalho de Melo
One less thing for drivers writers to worry about. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2007-03-16[PATCH] airo: Fix an error path memory leakMichal Schmidt
The airo driver leaks memory if request_irq() fails. Signed-off-by: Michal Schmidt <mschmidt@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-17Merge branch 'upstream' into upstream-jgarzikJohn W. Linville
Conflicts: net/ieee80211/softmac/ieee80211softmac_module.c net/ieee80211/softmac/ieee80211softmac_wx.c
2007-02-14[PATCH] misc-wireless: Use ARRAY_SIZE macro when appropriateAhmed S. Darwish
A patch to use ARRAY_SIZE macro already defined in kernel.h for some miscellaneous wireless drivers with no specific maintaners. Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2007-02-12[PATCH] mark struct file_operations const 5Arjan van de Ven
Many struct file_operations in the kernel can be "const". Marking them const moves these to the .rodata section, which avoids false sharing with potential dirty data. In addition it'll catch accidental writes at compile time to these shared resources. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2006-12-07[PATCH] Add include/linux/freezer.h and move definitions from sched.hNigel Cunningham
Move process freezing functions from include/linux/sched.h to freezer.h, so that modifications to the freezer or the kernel configuration don't require recompiling just about everything. [akpm@osdl.org: fix ueagle driver] Signed-off-by: Nigel Cunningham <nigel@suspend2.net> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-10-16[PATCH] airo: check if need to freezeDave Kleikamp
The airo driver used to break out of while loop if there were any signals pending. Since it no longer checks for signals, it at least needs to check if it needs to be frozen. Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Cc: Jean Tourrilhes <jt@hpl.hp.com> Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-10-16[PATCH] wireless: More WE-21 potential overflows...Jean Tourrilhes
After the Orinoco issue, I did an audit of other drivers for the same issue. Three drivers were NULL terminating the ESSID, which could cause an overflow in WE-21 when the ESSID has maximum size. Signed-off-by: Jean Tourrilhes <jt@hpl.hp.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>