Commit graph

88915 commits

Author SHA1 Message Date
Johannes Berg 7d1559f173 mac80211: fix sta-info pinning
When a STA is supposed to be unlinked but is pinned, it still needs
to be unlinked from all structures. Only at the end of the unlink
process should we check for pin status and invalidate the callers
reference if it is pinned. Move the pin status check down.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:45 -04:00
Jiri Slaby 4d6141c30a mac80211: fix defined but not used
These two symbols are used only in ifdeffed function. Move them to that
section too.
net/mac80211/sta_info.c:387: warning: `__sta_info_pin' defined but not used
net/mac80211/sta_info.c:397: warning: `__sta_info_unpin' defined but not used

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Michael Wu <flamingice@sourmilk.net>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:45 -04:00
Pavel Machek e764948b1a adm8211: remove commented-out code
Remove some commented-out code from adm8211.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:45 -04:00
Ron Rindjunsky 513a1025fd mac80211: BA session debug prints changes
This patch contains next issues:
1 - prevents "stop BA session" multiple warnings
2 - adds debug print to stop Rx BA session flow
3 - adds EOL in one debug print

Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:44 -04:00
Michael Buesch 8cf6a31e8d b43: use b43_is_mode() call
We must use the b43_is_mode() call to check the current interface
operation mode.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:44 -04:00
Michael Buesch 5042c5070d b43: Fix PHY TX control words in SHM
This fixes the initialization of the PHY TX control words in
shared memory. These control words are used for management frames
like beacons.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:44 -04:00
Michael Buesch c97a4ccc1f b43: Fix beacon BH update
This fixes beacon updating in the bottomhalf.
In case the device is busy, we will defer to later in the IRQ handler.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Mohamed Abbas 84363e6e07 mac80211: notify mac from low level driver (iwlwifi)
Add new API to MAC80211 to allow low level driver to
notify MAC with driver status.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Johannes Berg 380a942b91 mac80211: fix ieee80211_ioctl_giwrate
The ieee80211_ioctl_giwrate() ioctl handler doesn't rcu_read_lock()
its access to the sta table, fix it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Johannes Berg bebb8a5e2c mac80211: make debugfs files root-only
Unfortunately, debugfs can be made to access invalid memory by
open()ing a file and then waiting until the corresponding debugfs
file has been removed (and, probably, the underlying object.)

That could be exploited by any user if the user is able to open
debugfs files and can cause networking devices, STA entries or
similar to disappear which is quite easy to do.

Hence, all debugfs files should be root-only.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Michael Buesch a82d992261 b43: Beaconing fixes
These are some beaconing related fixes. Basically it prevents
the card from triggering the beacon IRQ over and over again.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Johannes Berg 182e2e66ca iwlwifi: honour regulatory restrictions in scan code
When doing firmware-assisted scanning, iwlwifi drivers do not
honour the regulatory control code that might disable channels
that are enabled in the EEPROM, for example when the user is
visiting another country and adjusted the regulatory domain
accordingly. This patch fixes that.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Reinette Chatre 41a7be4858 mac80211: notify upper layers after lower
When drivers receive change notification they may do work that
will enable the changes to take effect. For example, if new association
the device needs to be programmed with this information.
Give the driver chance to make the changes before notifying the
upper layer - thus preventing race condition where upper layer
attempts to utilize state that may not be configured yet.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:43 -04:00
Mohamed Abbas 03d29c6849 iwlwifi: fix rfkill memory error
Do not free reference to device twice. After rfkill registration succeeds
we only need to call rfkill_unregister() and not rfkill_free().
Also add some debugging.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
Reinette Chatre fe00b5a5b7 iwlwifi: ensure led registration complete as part of initialization
After the workqueue is notified the LED code may be accessed. Ensure
that LED registration completes completely as part of initialization
before anything waiting on this is notified.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
Tomas Winkler dc92e49729 iwlwifi: use ieee80211_frequency_to_channel
This patch replaces ieee80211chan2mhz from radiotap with
ieee80211_frequency_to_channel provided by mac80211

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
Tomas Winkler fee1247a30 iwlwifi: move driver status inliners into iwl-core.h
This patch moves inline functions into iwl-core.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
Tomas Winkler 12a81f60b9 iwlwifi: hw names cleanup
This patch make some cleanup in HW names

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
Ivo van Doorn 133adf0826 rt2x00: Use lib->config_filter() during scheduled packet filter config
Now rt2x00lib handles the initial configure_filter() command, we can
directly call lib->config_filter() in scheduled context since the
called function will no longer check if anything has changed (which is
now handled in rt2x00lib as well).

This fixes a endless loop with USB drivers where the config_filter
command was scheduled time and time again without sending any command
to the device.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:42 -04:00
John W. Linville 253898c417 cfg80211: default to regulatory max power for channel
If the driver does not specify a maximum power output, default to the
regulatory max.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Michael Buesch d59f720d88 b43: Fix TBTT and PU timings
This fixes some timings for pre-TBTT and synthetic PU.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Michael Buesch 7b58416397 b43: Add more N-PHY stuff
This adds some minor stuff for N-PHY support. Nothing special.
Adds Analog switching and some TODOs for RSSI processing.
Just a patch I had floating around for quite some time now.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Johannes Berg 9cfb0009da mac80211: clean up IEEE80211_FC use
Really doesn't need to be defined four times.

Also, while at it, remove a useless macro (IEEE80211_ALIGN32_PAD)
and a function prototype for a function we don't actually have
(ieee80211_set_compression.)

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Johannes Berg 49ec6fa220 mac80211: fix possible sta-debugfs work lockup
Because we queue the sta-debugfs-adding work on our mac80211
workqueue (which needs to be flushed under RTNL) and that work
needs the RTNL, it can currently deadlock, thanks to Reinette
Chatre for pointing out the lockdep warning about this.

This patch fixes it by moving this work to the common kernel
workqueue (using schedule_work) and canceling it as appropriate.

It also fixes a related problem: When a STA is pinned by the
debugfs adding work and sta_info_flush() runs concurrently
it is not guaranteed that all STAs are removed from the driver
before the corresponding interface is removed which may lead
to bugs.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Michael Buesch d8c17e1597 b43: Use SSB block-I/O to do PIO
This changes the b43-PIO code to use the new SSB block-I/O.
This reduces the overhead by removing lots of function calls, pointer
dereferencing, if-conditionals any byteswapping for each packet data word.

This also fixes a harmless sparse endianness warning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Reinette Chatre 36316126e9 iwl4965: use IWLWIFI_LEDS config variable
Fix error reported by Miles Lane <miles.lane@gmail.com>

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Miles Lane <miles.lane@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:41 -04:00
Michael Buesch d625a29ba6 ssb: Add support for block-I/O
This adds support for block based I/O to SSB.
This is needed in order to efficiently support PIO data
transfers to the card.
The block-I/O support is only compiled, if it's selected by the
weird driver that needs it. So there's no overhead for sane devices.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
John W. Linville 93af261451 drivers/net/wireless/iwlwifi/iwl-3945.h: correct CONFIG_IWL4965_LEDS typo
Thakns to Winfried Tilanus <winfried@tilanus.com> for identifying the
problem!

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Michael Buesch d72bb40fe3 ssb: Fix build for non-PCIhost
This fixes a build error when PCMCIA-host support is built,
but PCI-host support is disabled.
Hell, who on earth would use such a weird configuration. :D

drivers/built-in.o: In function `ssb_attr_sprom_store':
(.text+0x1c4b79): undefined reference to `ssb_devices_freeze'
drivers/built-in.o: In function `ssb_attr_sprom_store':
(.text+0x1c4bb3): undefined reference to `ssb_devices_thaw'
make[1]: *** [.tmp_vmlinux1] Error 1

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Holger Schurig fb14a7e086 libertas: remove lbs_get_fwversion()
It was used only at one place anyway.

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Holger Schurig 73ab1f25d4 libertas: move lbs_update_channel out of assoc.c
... as it has nothing to do with pure association

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Holger Schurig 245bf20f9c libertas: move association code from scan.c into assoc.c
Besides code moving, I did the following changes:

* made some functions static
* removed some unneeded #include's
* made patch checkpatch.pl clean

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
Holger Schurig 697900ac14 libertas: move association code from join.c into scan.c
Besides code moving, I did the following changes:

* made some functions static
* removed some unneeded #include's
* made patch checkpatch.pl clean

Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:40 -04:00
John W. Linville 53f36d70f0 iwlwifi/Kconfg: make IWLWIFI_LEDS invisible
Select IWLWIFI_LEDS automatically when either IWL3945_LEDS or
IWL4965_LEDS is selected.  This avoids potential misconfigurations
which lead to build failures for iwl-led.c.

Cc: Miles Lane <miles.lane@gmail.com>
Cc: reinette.chatre@intel.com
Signed-off-by: John w. Linville <linville@tuxdriver.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:44:39 -04:00
Johannes Berg a0b484fee7 iwlwifi: fix some warnings
This fixes all kinds of warnings in iwlwifi.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 16:43:50 -04:00
John W. Linville 16788599a9 drivers/net/wireless/iwlwifi/iwl-debugfs.c: fix another '%llu' warning
drivers/net/wireless/iwlwifi/iwl-debugfs.c: In function ‘iwl_dbgfs_stations_read’:
drivers/net/wireless/iwlwifi/iwl-debugfs.c:247: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘u64’

Cc: Reinette Chatre <reinette.chatre@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Chr fff7710937 mac80211: add station aid into ieee80211_tx_control
This patch is necessary for the upcoming Accesspoint patch for p54.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Denys Vlasenko 2aee82de52 wavelan_cs: stop inlining largish static functions
Hi John,

Can you please take a look at this patch?

drivers/net/wireless/wavelan_cs.c has unusually large number
of static inline functions - 27.

I looked through them and 20 of them do not seem to warrant inlining.
Some are really big; others call mdelay(1) or busy-wait for a bit
to be set in a hardware register - it's pointless
to optimize such functions for speed.

This patch removes "inline" from these static function
(regardless of number of callsites - gcc nowadays auto-inlines
statics with one callsite).

Size difference for 32bit x86:

   text    data     bss     dec     hex filename
  17020     372       8   17400    43f8 linux-2.6-ALLYES/drivers/net/wireless/wavelan_cs.o
  14032     356       8   14396    383c linux-2.6.inline-ALLYES/drivers/net/wireless/wavelan_cs.o

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
--
vda
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Luis R. Rodriguez 7b463ced63 prism54: set carrier flags correctly
> prism54 should set the carrier flags correctly when it thinks the
> link can be used.

Agreed, so sure, this is OK but I rather we turn the carrier on
or off *before* sending an event, like this.

Signed-off-by: Roy Marples <uberlord@gentoo.org>
Signed-off-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Michael Buesch 8fe2b65a18 ssb: Turn suspend/resume upside down
Turn the SSB bus suspend mechanism upside down.
Instead of deciding by an internal reference count when to suspend/resume,
let the parent bus call us in their suspend/resume routine.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:57 -04:00
Michael Buesch 5100d5ac81 b43: Add PIO support for PCMCIA devices
This adds PIO support back (D'oh!) for PCMCIA devices.
This is a complete rewrite of the old PIO code. It does actually work
and we get reasonable performance out of it on a modern machine.
On a PowerBook G4 I get a few MBit for TX and a few more for RX.
So it doesn't work as well as DMA (of course), but it's a _lot_ faster
than the old PIO code (only got a few kBit with that).

The limiting factor is the host CPU speed. So it will generate 100%
CPU usage when the network interface is heavily loaded. A voluntary preemption
point in the RX path makes sure Desktop Latency isn't hurt.

PIO is needed for 16bit PCMCIA devices, as we really don't want to poke with
the braindead DMA mechanisms on PCMCIA sockets. Additionally, not all
PCMCIA sockets do actually support DMA in 16bit mode (mine doesn't).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Tomas Winkler 3109ece111 iwlwifi: Eliminate association from beacon
This patch removes association from beacon
using bss_info_change handler for association

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Tomas Winkler 21c0cbe760 mac80211: add association capabilty and timing info into bss_conf
This patch adds assocation capability, timestamp (tsf) and beacon interval
to bss_conf. This is required for successful assocation of iwlwifi drivers

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Tomas Winkler 98952d5dec iwlwifi: eliminate conf_ht
This patch eliminates the use of conf_ht in iwlwifi driver, replacing it
with bss_info_changed.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Tomas Winkler 38668c059f mac80211: eliminate conf_ht
This patch eliminates the use of conf_ht, replacing it with
bss_info_changed.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
Michael Buesch 9788ba7500 ssb-pcmcia: IRQ and DMA related fixes
Here come some IRQ and DMA related fixes for the ssb PCMCIA-host code.
Not much to say, actually. I think the patch explains itself.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 15:05:56 -04:00
John W. Linville 2473670163 Revert "mac80211: use a struct for bss->mesh_config"
This reverts commit 6c4711b469.

That patch breaks mesh config comparison between beacons/probe reponses, so
every beacon from a mesh network would be added as a new bss. Since the
comparison has to be performed for every received beacon I believe it is best to
save the mesh config in a format easy to compare, rather than do a bunch of
unaligned accesses to compare field by field.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-08 14:15:46 -04:00
David S. Miller 8eefca4888 Merge branch 'net-2.6.26-isatap-20080403' of git://git.linux-ipv6.org/gitroot/yoshfuji/linux-2.6-dev 2008-04-08 02:33:36 -07:00
YOSHIFUJI Hideaki 549e028d01 [IPV6] MROUTE: Use skb_tail_pointer(skb) instead of skb->tail.
This bug resulted in compilation error on 64bit machines.
Pointed out by Rami Rosen <roszenrami@gmail.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-04-05 22:35:14 +09:00
YOSHIFUJI Hideaki 12802d058a [IPV6]: Comment MRT6_xxx sockopts in include/linux/in6.h.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
2008-04-05 22:33:40 +09:00