summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [NETNS]: Namespace stop vs 'ip r l' race.Denis V. Lunev2008-01-283-19/+18
| | | | | | | | | | | | | | | | | | | | During network namespace stop process kernel side netlink sockets belonging to a namespace should be closed. They should not prevent namespace to stop, so they do not increment namespace usage counter. Though this counter will be put during last sock_put. The raplacement of the correct netns for init_ns solves the problem only partial as socket to be stoped until proper stop is a valid netlink kernel socket and can be looked up by the user processes. This is not a problem until it resides in initial namespace (no processes inside this net), but this is not true for init_net. So, hold the referrence for a socket, remove it from lookup tables and only after that change namespace and perform a last put. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Consolidate kernel netlink socket destruction.Denis V. Lunev2008-01-2816-26/+34
| | | | | | | | | | Create a specific helper for netlink kernel socket disposal. This just let the code look better and provides a ground for proper disposal inside a namespace. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Memory leak on network namespace stop.Denis V. Lunev2008-01-282-2/+2
| | | | | | | | | | Network namespace allocates 2 kernel netlink sockets, fibnl & rtnl. These sockets should be disposed properly, i.e. by sock_release. Plain sock_put is not enough. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [NETNS]: Double free in netlink_release.Denis V. Lunev2008-01-281-3/+7
| | | | | | | | | | | | Netlink protocol table is global for all namespaces. Some netlink protocols have been virtualized, i.e. they have per/namespace netlink socket. This difference can easily lead to double free if more than 1 namespace is started. Count the number of kernel netlink sockets to track that this table is not used any more. Signed-off-by: Denis V. Lunev <den@openvz.org> Tested-by: Alexey Dobriyan <adobriyan@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
* [IPV6]: Fix ip6_frag ctlDaniel Lezcano2008-01-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Alexey Dobriyan reported an oops when unsharing the network indefinitely inside a loop. This is because the ip6_frag is not per namespace while the ctls are. That happens at the fragment timer expiration: inet_frag_secret_rebuild function is called and this one restarts the timer using the value stored inside the sysctl field. "mod_timer(&f->secret_timer, now + f->ctl->secret_interval);" When the network is unshared, ip6_frag.ctl is initialized with the new sysctl instances, but ip6_frag has only one instance. A race in this case will appear because f->ctl can be modified during the read access in the timer callback. Until the ip6_frag is not per namespace, I discard the assignation to the ctl field of ip6_frags in ip6_frag_sysctl_init when the network namespace is not the init net. Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* net: NEWEMAC: Fix problem with mtu > 4080 on non TAH equipped 4xx PPC'sStefan Roese2008-01-281-10/+4
| | | | | | | | | | | | | Currently, all non TAH equipped 4xx PPC's call emac_start_xmit() upon xmit. This routine doesn't check if the frame length exceeds the max. MAL buffer size. This patch now changes the driver to call emac_start_xmit_sg() on all GigE platforms and not only the TAH equipped ones (440GX). This enables an MTU of 9000 instead 4080. Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* add driver for enc28j60 ethernet chipClaudio Lanconelli2008-01-284-0/+1928
| | | | | Signed-off-by: Claudio Lanconelli <lanconelli.claudio@eptar.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* SGISEEQ: fix oops when doing ifconfig down; ifconfig upThomas Bogendoerfer2008-01-281-1/+1
| | | | | | | | When doing init_ring checking whether a new skb needs to be allocated was wrong. Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: version 1.21Stephen Hemminger2008-01-281-1/+1
| | | | | | | Update driver version reflects new hardware support. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* sky2: support for Yukon SupremeStephen Hemminger2008-01-282-21/+46
| | | | | | | | | Add support from sk98lin vendor driver 10.50.1.3 for 88E8055 and 88E8075 chips. I don't have this hardware to test, so this changes are untested. Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* qla3xxx annotationsAl Viro2008-01-282-61/+38
| | | | | | | stop the byteswap-in-place, annotate Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* slhc annotationsAl Viro2008-01-281-6/+6
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* eepro100 annotationsAl Viro2008-01-281-48/+42
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* annotate the rest of drivers/net/wanAl Viro2008-01-287-8/+8
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* annotate tunAl Viro2008-01-282-2/+4
| | | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* NET: ns83820.c remove fastcall macroDavid Miller2008-01-281-5/+4
| | | | | Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* SGISEEQ: use cached memory access to make driver work on IP28Thomas Bogendoerfer2008-01-282-31/+35
| | | | | | | | | - Use inline functions for dma_sync_* instead of macros - added Kconfig change to make selection for similair SGI boxes easier Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* Add me as maintainer of the RDC r6040 driverFlorian Fainelli2008-01-281-0/+6
| | | | | | | | This patch adds me as maintainer of the RDC R6040 Fast Ethernet driver. Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu> -- Signed-off-by: Jeff Garzik <jeff@garzik.org>
* iwlwifi: skip mac80211 conf during a hardware scan and replay it afterwardsZhu Yi2008-01-284-51/+15
| | | | | | | | | This patch skips mac80211 configuration setting during a hardware scan and replays it afterwards for the iwlwifi drivers. Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: proper monitor supportZhu Yi2008-01-286-261/+238
| | | | | | | | | | | | This patch changes the iwlwifi driver to properly support monitor interfaces after the filter flags change. The patch is originally created by Johannes Berg for iwl4965. I fixed some of the comments and created a similar patch for iwl3945. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: remove check for driver_lock in lbs_interrupt()David Woodhouse2008-01-281-5/+0
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert SUBSCRIBE_EVENT to a direct commandDavid Woodhouse2008-01-284-226/+135
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: change inference about buffer size in lbs_cmd()David Woodhouse2008-01-281-6/+8
| | | | | | | | | | | | sizeof(*cmd) is going to give the total size of the data structure that we allocated, more often than not. But the size of the command to be _sent_ could be a lot smaller, as it is in the KEY_MATERIAL and SUBSCRIBE_EVENT commands for example. So swap them round; let the caller set the _command_ size explicitly in the header, and infer the maximum response size from the data structure. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert ENABLE_RSN to a direct commandDavid Woodhouse2008-01-285-54/+23
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert SET_WEP to a direct commandDavid Woodhouse2008-01-285-59/+34
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert SLEEP_PARAMS to a direct commandDavid Woodhouse2008-01-286-98/+74
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert INACTIVITY_TIMEOUT to a direct commandDavid Woodhouse2008-01-284-26/+21
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: convert RADIO_CONTROL to a direct commandDavid Woodhouse2008-01-283-52/+29
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: submit RSSI command on tx timeout, to check whether module is deadDavid Woodhouse2008-01-281-0/+7
| | | | | | | | | | | We don't necessarily want to reset the device on a TX timeout. But more often than not, the real cause is that the firmware has crapped itself, not just that the network is busy. So submit any harmless command, and if _that_ times out, then the error handling code will reset the module, as appropriate. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: make lbs_submit_command always 'succeed' and set command timerDavid Woodhouse2008-01-281-22/+20
| | | | | | | | | Even if it fails, we want to wait a while and try again, with an ultimate timeout if it the condition persists. So again, just use the standard command timeout behaviour. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: discard DEFER responses to commands; let the timeout triggerDavid Woodhouse2008-01-281-0/+10
| | | | | | | | | When the firmware returns 0x0004, it wants us to try again later. We can achieve that simply by throwing out the response and letting the command timeout code kick in. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: use priv->upld_buf for command responsesDavid Woodhouse2008-01-284-30/+4
| | | | | | | | If we don't scribble over the command we sent, then we can retry it when the firmware responds with 0x0004 (which means -EAGAIN). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: reduce explicit references to priv->cur_cmd->cmdbufDavid Woodhouse2008-01-281-4/+4
| | | | | | | | | | | We have a local variable 'resp' which we use for this. So use it, instead of typing the whole thing. In preparation for actually using priv->upld_buf for the responses instead... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: Check for PS mode support on USB devicesDavid Woodhouse2008-01-281-6/+22
| | | | | | | | Move the various firmware setup bits into a separate function, which used to do just boot2 version. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: allow for PS mode to be disabled when firmware doesn't support itDavid Woodhouse2008-01-283-0/+13
| | | | | | | | | | Otherwise, we go into an endless busy loop trying to enable PS mode when the command queue is empty, dealing with the error response, and then trying to enable PS mode again because the command queue is empty.... it doesn't really save much power. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: handle HOST_AWAKE event by sending WAKEUP_CONFIRM commandDavid Woodhouse2008-01-283-1/+31
| | | | | | | | lbs_send_confirmwake() is a bit ugly but matches the way we confirm sleep. We'll deal with that whole thing later. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: don't clear priv->dnld_sent after sending sleep confirmDavid Woodhouse2008-01-281-1/+0
| | | | | | | | | | | | DNLD_RES_RECEIVED is a bit of a misnomer -- we never wait for the result to be received; it's purely representing the state of the TX path, and in this case the TX path is definitely busy. Of course, that means that we don't actually care about DATA_SENT vs. CMD_SENT either, but that's a can of worms for another day... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: fix buffer handling of PS_MODE commands and responsesDavid Woodhouse2008-01-282-3/+3
| | | | | | | | | | | | | | Commit 5b8845345e7385d2eb37fac22ba9ab6905988be5 (or, in case the git workflow is broken and patches get recommitted, the commit entitled 'libertas: rename and re-type bufvirtualaddr to cmdbuf' by dcbw), introduced a number of bugs where we once had a pointer to a command _payload_, but now we use the pointer to the command header instead. The fix isn't wonderfully pretty for now, but it'll get better when we finish converting all commands so the structures include the header. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: add SLEEP_PERIOD and FW_WAKE_METHOD command definitionsDavid Woodhouse2008-01-282-0/+16
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: fix return from lbs_update_channel()David Woodhouse2008-01-281-6/+10
| | | | | | | | | If we return the channel number in a 'ret' variable where anything non-zero is later interpreted as an error, that isn't nice. It breaks WPA, for a start. OLPC trac #5485 Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: kill 'addtail' argument to lbs_queue_cmd() and make it staticDavid Woodhouse2008-01-282-13/+5
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: handle command timeout in main thread instead of directly in timerDavid Woodhouse2008-01-283-22/+38
| | | | | | | | And handle the case where it times out more than once, too, instead of locking up for ever. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: ensure response buffer size is always set for lbs_cmd_with_responseDavid Woodhouse2008-01-283-1/+8
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: add __lbs_cmd_async() for asynchronous command submissionDavid Woodhouse2008-01-282-30/+36
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: store command result in cmdnode instead of priv->cur_cmd_retcodeDavid Woodhouse2008-01-283-6/+8
| | | | | | | ... at least for users of __lbs_cmd(). Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: kill pdata_buf member of struct cmd_ctrl_nodeDavid Woodhouse2008-01-283-17/+14
| | | | | | | We can use the callback_arg for it; that's the way we're heading anyway... Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: let __lbs_cmd() free its own cmdnodeDavid Woodhouse2008-01-281-1/+3
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: kill cleanup_cmdnode()David Woodhouse2008-01-281-22/+17
| | | | | | | | | | | Move the wakeup into lbs_complete_command(), and leave the other bits in __lbs_cleanup_and_insert_cmd() which was the only caller now anyway. There are two remaining direct callers of lbs_cleanup_and_insert_cmd(), and they are both fine without the wakeup. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: don't re-initialise cmdnode when taking it off the free queueDavid Woodhouse2008-01-281-3/+0
| | | | | | | We initialise it when we add it to the queue. No need to do it again. Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* libertas: introduce and use lbs_complete_command() for command completionDavid Woodhouse2008-01-283-17/+23
| | | | | Signed-off-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>