aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/airo.c
Commit message (Collapse)AuthorAge
* drivers/net: Convert unbounded kzalloc calls to kcallocJoe Perches2010-08-17
| | | | | | | | | | | | | These changes may be slightly safer in some instances. There are other kzalloc calls with a multiply, but those calls are typically "small fixed #" * sizeof(some pointer)" and those are not converted. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2010-07-23
|\ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
| * wireless: airo: delete netdev from list after it is freedKulikov Vasiliy2010-07-14
| | | | | | | | | | | | | | | | We must call del_airo_dev() before free_netdev() since we call add_airo_dev() exactly after alloc_netdev(). Signed-off-by: Kulikov Vasiliy <segooon@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * drivers/net/wireless: Remove unnecessary casts of private_dataJoe Perches2010-07-14
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | drivers/net: use __packed annotationEric Dumazet2010-06-03
| | | | | | | | | | | | | | | | | | cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | drivers: wireless: use new hex_to_bin() methodAndy Shevchenko2010-05-25
|/ | | | | | | | | Instead of using own implementation involve hex_to_bin() function. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Acked-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* airo : Print of firmware versionmatthieu castet2010-03-15
| | | | | | | | | | | For the firmware version 5.30.17 the log file shows: Firmware version 5.30.11 The variable softSubVer is binary. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: Jose Alonso <joalonsof@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo : fix printing status infomatthieu castet2010-03-15
| | | | | | | | | For some status, reason is encoded in the low byte, but airo_print_status forgot tp mask low byte in status parsing. This make it only work when reason is 0. Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: return from set_wep_key() when key length is zeroStanislaw Gruszka2010-03-02
| | | | | | | | Even if keylen == 0 is a bug and should not really happen, better avoid possibility of passing bad value to firmware. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2010-02-26
|\ | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h drivers/net/wireless/rt2x00/rt2800pci.c
| * wireless: airo_cs build fixesRandy Dunlap2010-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When WEXT_PRIV is not enabled, airo_cs has build errors. It needs to include net/iw_handler.h and it should select WEXT_PRIV, like the airo driver does. drivers/net/wireless/airo.c:7655: error: unknown field 'num_private' specified in initializer drivers/net/wireless/airo.c:7655: warning: initialization makes pointer from integer without a cast drivers/net/wireless/airo.c:7656: error: unknown field 'num_private_args' specified in initializer drivers/net/wireless/airo.c:7656: warning: excess elements in struct initializer drivers/net/wireless/airo.c:7656: warning: (near initialization for 'airo_handler_def') drivers/net/wireless/airo.c:7658: error: unknown field 'private' specified in initializer drivers/net/wireless/airo.c:7658: warning: initialization makes integer from pointer without a cast drivers/net/wireless/airo.c:7658: error: initializer element is not computable at load time drivers/net/wireless/airo.c:7658: error: (near initialization for 'airo_handler_def.num_standard') drivers/net/wireless/airo.c:7659: error: unknown field 'private_args' specified in initializer drivers/net/wireless/airo.c:7659: warning: initialization from incompatible pointer type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | net: use netdev_mc_count and netdev_mc_empty when appropriateJiri Pirko2010-02-12
| | | | | | | | | | | | | | | | | | | | | | This patch replaces dev->mc_count in all drivers (hopefully I didn't miss anything). Used spatch and did small tweaks and conding style changes when it was suitable. Jirka Signed-off-by: Jiri Pirko <jpirko@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | Merge branch 'master' of ↵David S. Miller2010-02-04
|\| | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
| * airo: fix setting zero length WEP keyStanislaw Gruszka2010-02-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch prevents call set_wep_key() with zero key length. That fix long standing regression since commit c0380693520b1a1e4f756799a0edc379378b462a "airo: clean up WEP key operations". Additionally print call trace when someone will try to use improper parameters, and remove key.len = 0 assignment, because it is in not possible code path. Reported-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu> Bisected-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu> Tested-by: Chris Siebenmann <cks@cs.toronto.edu> Cc: Dan Williams <dcbw@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | drivers/net/: use DEFINE_PCI_DEVICE_TABLE()Alexey Dobriyan2010-01-08
|/ | | | | | | | Use DEFINE_PCI_DEVICE_TABLE() so we get place PCI ids table into correct section in every case. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* airo: Fix integer overflow warningMichael Buesch2009-12-04
| | | | | | | | | | | On BigEndian gcc complains: drivers/net/wireless/airo.c: In function ‘sniffing_mode’: drivers/net/wireless/airo.c:4809: warning: integer overflow in expression Fix this by doing the bitwise AND on the host-endian value. Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2009-10-30
|\ | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
| * airo: Reorder tests, check bounds before elementRoel Kluin2009-10-27
| | | | | | | | | | | | | | Test whether index is within bounds before reading the element Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | airo : allow supend with card without power managementmatthieu castet2009-10-27
|/ | | | | | | | | | | | | | | Some airo card don't support power Management [1]. Don't abort suspend with those cards. 00:06.0 Network controller: AIRONET Wireless Communications PC4800 (rev 01) Flags: medium devsel, IRQ 17 Memory at dffffe00 (32-bit, non-prefetchable) [size=128] I/O ports at d000 [size=128] I/O ports at cc00 [size=64] Kernel driver in use: airo Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: convert drivers to netdev_tx_tStephen Hemminger2009-09-01
| | | | | | | | | | | Mostly just simple conversions: * ray_cs had bogus return of NET_TX_LOCKED but driver was not using NETIF_F_LLTX * hostap and ipw2x00 had some code that returned value from a called function that also had to change to return netdev_tx_t Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2009-07-30
|\ | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/wireless/iwlwifi/iwl-3945.h drivers/net/wireless/iwlwifi/iwl-tx.c drivers/net/wireless/iwlwifi/iwl3945-base.c
| * airo: Buffer overflowRoel Kluin2009-07-27
| | | | | | | | | | | | | | | | | | SSID_rid has space for only 3 ssids. txPowerLevels[i] is read before the bounds check for i Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | net: use NETDEV_TX_OK instead of 0 in ndo_start_xmit() functionsPatrick McHardy2009-07-05
|/ | | | | | | | | | | This patch is the result of an automatic spatch transformation to convert all ndo_start_xmit() return values of 0 to NETDEV_TX_OK. Some occurences are missed by the automatic conversion, those will be handled in a seperate patch. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: use symbolic values for ndo_start_xmit() return codesPatrick McHardy2009-06-13
| | | | | | | | | | Convert magic values 1 and -1 to NETDEV_TX_BUSY and NETDEV_TX_LOCKED respectively. 0 (NETDEV_TX_OK) is not changed to keep the noise down, except in very few cases where its in direct proximity to one of the other values. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: fix network drivers ndo_start_xmit() return values (part 3)Patrick McHardy2009-06-13
| | | | | | | | | | | | | | | | | | | net: fix network drivers ndo_start_xmit() return values (part 3) Fix up wireless drivers that return an errno value to qdisc_restart(), causing qdisc_restart() to print a warning an requeue/retransmit the skb. - airo: transmission not implemented for chip, intention is to free and abort - ipw2200: transmission not implemented for promiscous mode, intention is to drop - prism54: intention is to drop - wl3501_cs: intention appears to be to drop - zd1201: error counter indicates intention is to drop All drivers compile tested. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* airo: fix airo_get_encode{,ext} buffer overflow like I mean it...John W. Linville2009-05-20
| | | | | | | | "airo: airo_get_encode{,ext} potential buffer overflow" was actually a no-op, due to an unrecognized type overflow in an assignment. Oddly, gcc only seems to tell me about it when using -Wextra...grrr... Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: airo_get_encode{,ext} potential buffer overflowJohn W. Linville2009-05-11
| | | | | | | | Feeding the return code of get_wep_key directly to the length parameter of memcpy is a bad idea since it could be -1... Reported-by: Eugene Teo <eugeneteo@kernel.sg> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: queue SIOCSIWAUTH-requested auth mode change for next commitDan Williams2009-04-16
| | | | | | | | | Code was clearly wrong, plus callers expect the mode change to happen as soon as possible, not dropped on the floor until the next time some other config value changes and a commit happens. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6Linus Torvalds2009-03-30
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: wireless: remove duplicated .ndo_set_mac_address netfilter: xtables: fix IPv6 dependency in the cluster match tg3: Add GRO support. niu: Add GRO support. ucc_geth: Fix use-after-of_node_put() in ucc_geth_probe(). gianfar: Fix use-after-of_node_put() in gfar_of_init(). kernel: remove HIPQUAD() netpoll: store local and remote ip in net-endian netfilter: fix endian bug in conntrack printks dmascc: fix incomplete conversion to network_device_ops gso: Fix support for linear packets skbuff.h: fix missing kernel-doc ni5010: convert to net_device_ops
| * wireless: remove duplicated .ndo_set_mac_addressAlexander Beregalov2009-03-29
| | | | | | | | | | | | Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | proc 2/2: remove struct proc_dir_entry::ownerAlexey Dobriyan2009-03-30
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting ->owner as done currently (pde->owner = THIS_MODULE) is racy as correctly noted at bug #12454. Someone can lookup entry with NULL ->owner, thus not pinning enything, and release it later resulting in module refcount underflow. We can keep ->owner and supply it at registration time like ->proc_fops and ->data. But this leaves ->owner as easy-manipulative field (just one C assignment) and somebody will forget to unpin previous/pin current module when switching ->owner. ->proc_fops is declared as "const" which should give some thoughts. ->read_proc/->write_proc were just fixed to not require ->owner for protection. rmmod'ed directories will be empty and return "." and ".." -- no harm. And directories with tricky enough readdir and lookup shouldn't be modular. We definitely don't want such modular code. Removing ->owner will also make PDE smaller. So, let's nuke it. Kudos to Jeff Layton for reminding about this, let's say, oversight. http://bugzilla.kernel.org/show_bug.cgi?id=12454 Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
* airo: convert to net_device_opsStephen Hemminger2009-03-22
| | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* airo: reduce stack memory footprintFrank Seidel2009-03-05
| | | | | | | | | Applying kernel janitors todos (reduce stack footprint where possible) to airo wireless driver. (Before 1124 bytes on i386, now 876) Signed-off-by: Frank Seidel <frank@f-seidel.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: correct improper initialization of local variableJohn W. Linville2009-02-27
| | | | Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net/wireless: fix sparse warnings: fix signednessHannes Eder2009-02-17
| | | | | | | | | | | Fix this sparse warnings: drivers/net/wireless/airo.c:2102:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2126:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2167:21: warning: incorrect type in initializer (different signedness) drivers/net/wireless/airo.c:2191:21: warning: incorrect type in initializer (different signedness) Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* drivers/net/wireless: fix sparse warnings: symbol shadows an earlier oneHannes Eder2009-02-17
| | | | | | | | | | | | | | | | | | | | Impact: Move variable closer to usage resp. remove redundant variables resp. rename function scope variable. Fix this sparse warnings: drivers/net/wireless/airo.c:3840:29: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/airo.c:3847:29: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/airo.c:3861:21: warning: symbol 'i' shadows an earlier one drivers/net/wireless/airo.c:3751:13: originally declared here drivers/net/wireless/wavelan.c:43:13: warning: symbol 'irq' shadows an earlier one drivers/net/wireless/wavelan.p.h:692:17: originally declared here Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* airo: remove useless #definesDan Williams2009-01-29
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: clean up and clarify micinit()Dan Williams2009-01-29
| | | | | | | Fix some endian issues too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: use __attribute__ ((packed)) not #pragmaDan Williams2009-01-29
| | | | | Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: clean up WEP key operationsDan Williams2009-01-29
| | | | | | | | | | get_wep_key() and set_wep_key() combind both get/set of the actual WEP key and get/set of the transmit index into the same functions. Split those out so it's clearer what is going one where. Add error checking to WEP key hardware operations too. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: simplify WEP index and capability checksDan Williams2009-01-29
| | | | | | | | Do the computation once at init time; don't ask the hardware every time. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: re-arrange WPA capability checksDan Williams2009-01-29
| | | | | | | | | | The capability register has to be read for other (upcoming) stuff, so fold the WPA test function back into _init_airo_card() and move the netdevice registration stuff above it so that the netdevice has a name by the time the card's capabilities are printed out. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* airo: clean up and clarify interrupt-time task handlingDan Williams2009-01-29
| | | | | | | | Split each specific interrupt-time task out into its own function to make airo_interrupt() actually readable. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: Add channel/frequency conversions to ieee80211.hDavid Kilroy2009-01-29
| | | | | | | | | | | | | | | | Added mappings for FHSS, DSSS and OFDM channels - with macros to point HR DSSS and ERP to the DSSS mappings. Currently just static inline functions. Use the new functions in the older fullmac drivers. This eliminates a number of const static buffers and removes a couple of range checks that are now redundant. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com> Acked-by: Richard Farina <sidhayn@gmail.com> Acked-by: Jeroen Vreeken <pe1rxq@amsat.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net/wireless: fix sparse warnings: make symbols staticHannes Eder2008-12-26
| | | | | | | | | | | Fix this sparse warnings: drivers/net/wireless/airo.c:3610:6: warning: symbol 'mpi_receive_802_11' was not declared. Should it be static? drivers/net/wireless/atmel.c:3183:6: warning: symbol 'atmel_join_bss' was not declared. Should it be static? drivers/net/wireless/ray_cs.c:831:5: warning: symbol 'ray_dev_init' was not declared. Should it be static? Signed-off-by: Hannes Eder <hannes@hanneseder.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* don't use net/ieee80211.hJohannes Berg2008-11-10
| | | | | | | | | | | | Convert all the drivers using net/ieee80211.h to use linux/ieee80211.h. Contains a bugfix in libertas where the SSID parsing could overrun the buffer when the AP sends invalid information. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Acked-by: Dan Williams <dcbw@redhat.com> [airo, libertas] Acked-by: Pavel Roskin <proski@gnu.org> [orinoco] Acked-by: David Kilroy <kilroyd@googlemail.com> [orinoco] Signed-off-by: John W. Linville <linville@tuxdriver.com>
* drivers/net: Kill now superfluous ->last_rx stores.David S. Miller2008-11-04
| | | | | | | | | | | | | The generic packet receive code takes care of setting netdev->last_rx when necessary, for the sake of the bonding ARP monitor. Drivers need not do it any more. Some cases had to be skipped over because the drivers were making use of the ->last_rx value themselves. Signed-off-by: David S. Miller <davem@davemloft.net>
* airo: Kill directly reference of netdev->privWang Chen2008-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We have some reasons to kill netdev->priv: 1. netdev->priv is equal to netdev_priv(). 2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously netdev_priv() is more flexible than netdev->priv. But we cann't kill netdev->priv, because so many drivers reference to it directly. OK, becasue Dave S. Miller said, "every direct netdev->priv usage is a bug", and I want to kill netdev->priv later, I decided to convert all the direct reference of netdev->priv first. In this driver, I don't simply use netdev_priv() to replace netdev->priv. The reason is: Pointer netdev->priv was changed in this driver, but it shouldn't. Because the memory was allocated when alloc_netdev() and netdev->priv should always point to that memory. So I use netdev->ml_priv to replace netdev->priv. After replacing, both ai and ai->wifidev->ml_priv point to the same memory. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Cc: John W. Linville <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* net: convert print_mac to %pMJohannes Berg2008-10-27
| | | | | | | | | | | | This converts pretty much everything to print_mac. There were a few things that had conflicts which I have just dropped for now, no harm done. I've built an allyesconfig with this and looked at the files that weren't built very carefully, but it's a huge patch. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: David S. Miller <davem@davemloft.net>
* wireless: Read scan flags correctly on x86-64David Kilroy2008-09-24
| | | | | | | | | | | | | | | | | | | The SIOCSIWSCAN handler is passed data in an iw_point structure. Some drivers erronously use an iw_param instead. On 32 bit architectures the difference isn't noticed as the flags parameter tends to be the only one used by scan handlers and is at the same offset. On 64 bit architectures the pointer in the iw_point structure means the flag parameter is at different offsets in these structures. Thanks to Jean Tourrilhes for tracking this down for orinoco, and Pavel Roskin for confirming the fix and identifying other suspect handlers. Signed-off-by: David Kilroy <kilroyd@googlemail.com> Acked-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>