Separate wireless handlers of mshX and ethX. ethX remains as before.
For mshX, it has been disabled set/get essid, wap and set mode. Get mode always
returns "Repeater" and by now we use the Nickname to show if the mesh is active
("Mesh") or not (empty). The rest remains as before.
Signed-off-by: Luis Carlos Cobo Rus <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Sat, 26 May 2007 03:01:24 +0000 (23:01 -0400)]
[PATCH] libertas: Make WPA work through supplicant handshake
Fix WPA so it works up through the supplicant 4-Way handshake process.
Doesn't successfully pass traffic yet; may be problems installing
the GTK to the firmware.
- RSN needs to be enabled before the association command is sent
- Use keys from the association request not the adapter structure
- cmd_act_mac_strict_protection_enable != IW_AUTH_DROP_UNENCRYPTED
- Fix network filtering logic in is_network_compatible() WPA helpers
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Sat, 26 May 2007 02:30:48 +0000 (22:30 -0400)]
[PATCH] libertas: honor specific channel requests during association
Previously if a fixed channel was specified along with an SSID,
the channel request would be ignored during the association
process. Instead, when searching for an adhoc or infrastructure
network to join, allow filtering results based on channel so
that the driver doesn't pick a BSS on a different channel than
requested.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Update signal quality before the locked scan result translation loop,
because calling libertas_prepare_and_send_command() with the
'waitforrsp' option grabs adapter->lock in the command return processing,
leading to the deadlock.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 25 May 2007 21:09:41 +0000 (17:09 -0400)]
[PATCH] libertas: make association paths consistent
The BSS to associate with (in either Infrastructure or IBSS join
operations) is now stored in _one_ place in the association request (the
bss member), not two places as before (pattemptedbss and
curbssparams->bssdescriptor).
Association requests are passed to the necessary association functions
to (a) give them access to the bss member and (b) ensure that
association/join/start setup uses settings from the request, not the
current adapter settings (which may not be valid for the requested
settings).
Because the 'bss' member of the association request is used now, the
command return functions from associate and adhoc join/start need access
to the in-progress association request to update curbssparams when
everything is done. The association worker moves the request from
pending to in-progress for the duration of the association attempt.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 25 May 2007 20:46:33 +0000 (16:46 -0400)]
[PATCH] libertas: move channel changing into association framework
Handle channel changes through the deferred association framework
rather than directly. Fixes errors when setting channels along
with other parameters like mode and SSID.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
[PATCH] libertas: cleanup of fwt_list_route processing
Signed-off-by: Luis Carlos Cobo Rus <luisca@cozybit.com> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Do not clear the scan list except under specific conditions, such as
when (a) user-requested, or (b) joining/starting an adhoc network.
Furthermore, only clear entries which match the SSID or BSSID of the
request, not the whole scan list.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 25 May 2007 20:15:56 +0000 (16:15 -0400)]
[PATCH] libertas: make scan result handling more flexible
- use a linked list for scan results
- age scan results
- pass bss_descriptors around instead of indexes into the scan table
- lock access to the scan results
- stop returning EAGAIN from SIOCGIWSCAN handler
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Luis Carlos Cobo [Fri, 25 May 2007 17:53:26 +0000 (13:53 -0400)]
[PATCH] libertas: updated mesh commands for 5.220.9.p11
Updated commands fwt_add and fwt_list, bt_list.
New commands: bt_get_invert, bt_set_invert, to invert the blinding table,
i.e., receive only frames from nodes listed in the BT.
This patch needs/is needed for firmware 5.220.9.p11.
Signed-off-by: Luis Carlos Cobo <luisca@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
[PATCH] libertas: version bump (321p0) and cmds update for new fw (5.220.10.p0)
This patch along with the previous commands update one, is necessary for
mesh and fwt ioctls to work properly with firmware version 5.220.10.p0
and later.
Signed-off-by: Luis Carlos Cobo Rus <luiscarlos@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 25 May 2007 17:36:57 +0000 (13:36 -0400)]
[PATCH] libertas: don't tear down netdev in libertas_activate_card
libertas_activate_card() doesn't create the netdev, and shouldn't
free it on error. The caller of libertas_activate_card() is
responsible for cleaning up errors from libertas_add_card(),
not libertas_activate_card().
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Dan Williams [Fri, 25 May 2007 17:13:25 +0000 (13:13 -0400)]
[PATCH] libertas: call SET_NETDEV_DEV from common code
Move usage of SET_NETDEV_DEV into common code since it has nothing
to do with bus-specific devices. Also fixes a bug where the mesh
device was getting SET_NETDEV_DEV called after register_netdevice,
resulting in no 'device' link in /sys/class/net/mshX/.
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 17:05:16 +0000 (13:05 -0400)]
[PATCH] libertas: remove unused variables in wlan_dev_t
Actually, this patch removev wlan_dev_t totally and puts the used variables
of it directly into wlan_private. That reduces one level of indirection and
looks a little bit simpler. It's now "priv->card" and not
"priv->wlan_dev.card" and "priv->dev" instead of "priv->wlan_dev.netdev"
Changed two occurences of "((wlan_private *) dev->priv)->wlan_dev.netdev"
into "dev", because I didn't see the point in doing pointer-ping-pong.
The variables "ioport", "upld_rcv" and "upld_type" where unused. They have
been removed.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 16:41:52 +0000 (12:41 -0400)]
[PATCH] libertas: fix RESET logic at unload time
Previously, we had a fixed array of 5 elements where we remembered all
initialized devices. This has been changed to use a "struct list_head"
organization, which is IMHO cleaner.
Also renamed usb_cardp to cardp, as in the reset of the code.
Renamed reset_device() to if_usb_reset_device() like many other functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 16:37:58 +0000 (12:37 -0400)]
[PATCH] libertas: split module into two (libertas.ko and usb8xxx.ko)
* add CONFIG_LIBERTAS to Kconfig
* remove global variable libertas_fw_name, the USB module might want to
use a different default FW name than the CF module, so libertas_fw_name
is now local to if_usb.c
* exported some symbols as GPL
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 16:17:06 +0000 (12:17 -0400)]
[PATCH] libertas: indirect all hardware access via hw_XXXX functions
This functions makes all libertas_sbi_XXX functions static to the
if_usb.c file and renames them to if_usb_XXXX(). The get called from
other places of the source code via priv->hw_XXXX().
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 16:04:31 +0000 (12:04 -0400)]
[PATCH] libertas: split wlan_add_card()
Split wlan_add_card() into a part that just setups kernel parameters and
into the function libertas_activate_card(), which will implizitly use
hardware functions by the started thread.
Holger Schurig [Fri, 25 May 2007 15:49:19 +0000 (11:49 -0400)]
[PATCH] libertas: single out mesh code
This patches adds the two functions wlan_add_mesh() and wlan_remove_mesh(),
which are responsible for the mshX interface. In a CF driver with a non-
mesh-aware firmware you can omit the calls to this functions.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 15:32:07 +0000 (11:32 -0400)]
[PATCH] libertas: tune debug code
* renamed module parameter back to libertas_debug
* change from bit shifts to constants, that way it's easier to look at the
source and specify the libertas_debug=0xXXXX module parameter
* moved module_param from fw.c to main.c, where it belongs better
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 15:27:16 +0000 (11:27 -0400)]
[PATCH] libertas: make debug configurable
The debug output of libertas was either not present or it was overwhelming.
This patch adds the possibility to specify a bitmask for the area of
interest. One should then only get the desired output.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Holger Schurig [Fri, 25 May 2007 03:47:34 +0000 (23:47 -0400)]
[PATCH] libertas: fix removal of all debugfs files
rmmod did not remove /sys/kernel/debug/libertas_wireless/eth1/
subscribed_events/high_snr. After I fixed this, I noticed that
it also didn't remove /sys/kernel/debug/libertas_wireless/eth1
as well.
Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Linus Torvalds [Tue, 5 Jun 2007 00:54:09 +0000 (17:54 -0700)]
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6:
[JFFS2] Fix obsoletion of metadata nodes in jffs2_add_tn_to_tree()
[MTD] Fix error checking after get_mtd_device() in get_sb_mtd functions
[JFFS2] Fix buffer length calculations in jffs2_get_inode_nodes()
[JFFS2] Fix potential memory leak of dead xattrs on unmount.
[JFFS2] Fix BUG() caused by failing to discard xattrs on deleted files.
[MTD] generalise the handling of MTD-specific superblocks
[MTD] [MAPS] don't force uclinux mtd map to be root dev
Tejun Heo [Sun, 27 May 2007 13:10:40 +0000 (15:10 +0200)]
libata: always use polling SETXFER
Several people have reported LITE-ON LTR-48246S detection failed
because SETXFER fails. It seems the device raises IRQ too early after
SETXFER. This is controller independent. The same problem has been
reported for different controllers.
So, now we have pata_via where the controller raises IRQ before it's
ready after SETXFER and a device which does similar thing. This patch
makes libata always execute SETXFER via polling. As this only happens
during EH, performance impact is nil. Setting ATA_TFLAG_POLLING is
also moved from issue hot path to ata_dev_set_xfermode() - the only
place where SETXFER can be issued.
Note that ATA_TFLAG_POLLING applies only to drivers which implement
SFF TF interface and use libata HSM. More advanced controllers ignore
the flag. This doesn't matter for this fix as SFF TF controllers are
the problematic ones.
Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] JAZZ ESP and SUN ESP need SPI_ATTRS
[SCSI] atari_NCR5380: update_timeout removal
[SCSI] aacraid: fix shutdown handler to also disable interrupts.
[SCSI] qla2xxx: fix timeout in qla2x00_down_timeout
[SCSI] fix CONFIG_SCSI_WAIT_SCAN=m
Linus Torvalds [Mon, 4 Jun 2007 20:27:33 +0000 (13:27 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: reduce raciness when input handlers disconnect
Input: ucb1x00 - do not access input_dev->private directly
Input: logips2pp - fix typo in Kconfig
Input: db9 - do not ignore dev2 module parameter
Linus Torvalds [Mon, 4 Jun 2007 20:26:49 +0000 (13:26 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[ICMP]: Fix icmp_errors_use_inbound_ifaddr sysctl
[IPV4]: Fix "ipOutNoRoutes" counter error for TCP and UDP
[NET] gso: Fix GSO feature mask in sk_setup_caps
[TCP]: Fix GSO ignorance of pkts_acked arg (cong.cntrl modules)
[NET]: Fix comparisons of unsigned < 0.
[NET]: Make net watchdog timers 1 sec jiffy aligned.
[ATM]: Fix warning.
[TCP]: Use default 32768-61000 outgoing port range in all cases.
[AF_UNIX]: Fix datagram connect race causing an OOPS.
[TG3]: Fix link problem on Dell's onboard 5906.
[AF_UNIX]: Make socket locking much less confusing.
Linus Torvalds [Mon, 4 Jun 2007 20:25:59 +0000 (13:25 -0700)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[ATA]: Don't allow to enable this for SPARC64 without PCI.
[VIDEO]: XVR500 and XVR2500 require FB=y
Andrew Morton [Sun, 3 Jun 2007 20:50:41 +0000 (13:50 -0700)]
vanishing ioctl handler debugging
We've had several reoprts of the CPU jumping to 0x00000000 is do_ioctl(). I
assume that there's a race and someone is zeroing out the ioctl handler while
this CPU waits for the lock_kernel().
The patch adds code to detect this, then emits stuff which will hopefuly lead
us to the culprit.
Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Brownell [Sun, 3 Jun 2007 20:50:40 +0000 (13:50 -0700)]
SPI dynamic busid generation bugfix
Fix SPI dynamic bus ID assignment to start at 2^15-1 rather than a negative
number. Valid bus ids are supposed to be positive, and are (now) stored in
an 's16' value.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Dmitry Torokhov [Mon, 4 Jun 2007 03:29:36 +0000 (23:29 -0400)]
Input: reduce raciness when input handlers disconnect
There is a race between input handler's release() and disconnect()
methods: when input handler disconnects it wakes up all regular
users and then process to walk user list to wake up async. users.
While disconnect() walks the list release() removes elements of
the same list causing oopses.
While this is not a substibute for proper locking we can reduce
odds of getting an oops if we wake up normal readers after walking
the list.
Patrick McHardy [Fri, 1 Jun 2007 18:45:04 +0000 (11:45 -0700)]
[ICMP]: Fix icmp_errors_use_inbound_ifaddr sysctl
Currently when icmp_errors_use_inbound_ifaddr is set and an ICMP error is
sent after the packet passed through ip_output(), an address from the
outgoing interface is chosen as ICMP source address since skb->dev doesn't
point to the incoming interface anymore.
Fix this by doing an interface lookup on rt->dst.iif and using that device.
Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Herbert Xu [Fri, 1 Jun 2007 05:15:50 +0000 (22:15 -0700)]
[NET] gso: Fix GSO feature mask in sk_setup_caps
This isn't a bug just yet as only TCP uses sk_setup_caps for GSO.
However, if and when UDP or something else starts using it this is
likely to cause a problem if we forget to add software emulation
for it at the same time.
The problem is that right now we translate GSO emulation to the
bitmask NETIF_F_GSO_MASK, which includes every protocol, even
ones that we cannot emulate.
This patch makes it provide only the ones that we can emulate.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Fri, 1 Jun 2007 04:37:55 +0000 (21:37 -0700)]
[TCP]: Fix GSO ignorance of pkts_acked arg (cong.cntrl modules)
The code used to ignore GSO completely, passing either way too
small or zero pkts_acked when GSO skb or part of it got ACKed.
In addition, there is no need to calculate the value in the loop
but simple arithmetics after the loop is sufficient. There is
no need to handle SYN case specially because congestion control
modules are not yet initialized when FLAG_SYN_ACKED is set.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Jeff Garzik [Fri, 1 Jun 2007 04:26:23 +0000 (21:26 -0700)]
[ATM]: Fix warning.
The compiler warning
drivers/atm/firestream.c: In function ‘top_off_fp’:
drivers/atm/firestream.c:1505: warning: cast to pointer from integer of different size
does indicate a bug, albeit a minor one. Fixed, by using a 32-bit
temporary prior to the call to bus_to_virt().
The larger bug is still present: the entire driver assumes that machine
pointers are 32-bit, as it stores pointers in 32-bit hardware registers.
This is obvious to anyone who knows the driver well, but for the casual
readers it is helpfully noted with FIXME.
Signed-off-by: Jeff Garzik <jeff@garzik.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Mark Glines [Thu, 31 May 2007 22:44:48 +0000 (15:44 -0700)]
[TCP]: Use default 32768-61000 outgoing port range in all cases.
This diff changes the default port range used for outgoing connections,
from "use 32768-61000 in most cases, but use N-4999 on small boxes
(where N is a multiple of 1024, depending on just *how* small the box
is)" to just "use 32768-61000 in all cases".
I don't believe there are any drawbacks to this change, and it keeps
outgoing connection ports farther away from the mess of
IANA-registered ports.
Signed-off-by: Mark Glines <mark@glines.org> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 31 May 2007 22:19:20 +0000 (15:19 -0700)]
[AF_UNIX]: Fix datagram connect race causing an OOPS.
Based upon an excellent bug report and initial patch by
Frederik Deweerdt.
The UNIX datagram connect code blindly dereferences other->sk_socket
via the call down to the security_unix_may_send() function.
Without locking 'other' that pointer can go NULL via unix_release_sock()
which does sock_orphan() which also marks the socket SOCK_DEAD.
So we have to lock both 'sk' and 'other' yet avoid all kinds of
potential deadlocks (connect to self is OK for datagram sockets and it
is possible for two datagram sockets to perform a simultaneous connect
to each other). So what we do is have a "double lock" function similar
to how we handle this situation in other areas of the kernel. We take
the lock of the socket pointer with the smallest address first in
order to avoid ABBA style deadlocks.
Once we have them both locked, we check to see if SOCK_DEAD is set
for 'other' and if so, drop everything and retry the lookup.
Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Thu, 31 May 2007 21:49:51 +0000 (14:49 -0700)]
[TG3]: Fix link problem on Dell's onboard 5906.
The bug is caused by code that always set
(TG3_FLAG_USE_MI_INTERRUPT | TG3_FLAG_USE_LINKCHG_REG) on all Dell's
onboard devices. With these 2 flags set, the link status is polled
by tg3_timer() and will only work when the PHY is set up to interrupt
the MAC on link changes. This breaks 5906 because the 5906 PHY does
not support TG3_FLAG_USE_MI_INTERRUPT the same as other PHYs.
For correctness, only Dell's onboard 5701 needs these 2 flags to be
set. This change will fix the 5906 problem and will change other
Dell devices except 5700 and 5701 to use the more efficient
interrupt-driven link changes.
Update version to 3.77.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 31 May 2007 20:24:26 +0000 (13:24 -0700)]
[AF_UNIX]: Make socket locking much less confusing.
The unix_state_*() locking macros imply that there is some
rwlock kind of thing going on, but the implementation is
actually a spinlock which makes the code more confusing than
it needs to be.
So use plain unix_state_lock and unix_state_unlock.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Sun, 3 Jun 2007 19:29:15 +0000 (12:29 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
[POWERPC] Fix zImage.coff generation for 32-bit pmac
[POWERPC] Fix compile breakage for IBM/AMCC 4xx arch/ppc platforms
[POWERPC] Don't allow PMAC_APM_EMU for 64-bit
[POWERPC] Compare irq numbers with NO_IRQ not IRQ_NONE
[POWERPC] Fix return from pte_alloc_one() in out-of-memory case
[POWERPC] Fix compile warning in pseries xics code
[POWERPC] Don't use HOSTCFLAGS in BOOTCFLAGS
[POWERPC] Create a zImage for legacy iSeries
[POWERPC] pasemi idle uses hard_smp_processor_id
[POWERPC] ps3/interrupt.c uses get_hard_smp_processor_id
[POWERPC] Fix possible access to free pages
[POWERPC] Fix compiler/assembler flags for Ebony platform boot files
[POWERPC] Fix ppc32 single-stepping out of syscalls
[POWERPC] Update documentation for of_find_node_by_type()