dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

132734 Commits

Author SHA1 Message Date
Luis R. Rodriguez 761cf7ecff cfg80211: add assert_cfg80211_lock() to ensure proper protection
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:56 -05:00
Luis R. Rodriguez bcf4f99b7b cfg80211: propagate -ENOMEM during regulatory_init()
Calling kobject_uevent_env() can fail mainly due to out of
memory conditions. We do not want to continue during such
conditions so propagate that as well instead of letting
cfg80211 load as if everything is peachy.

Additionally lets clarify that when CRDA is not called during
cfg80211's initialization _and_ if the error is not an -ENOMEM
its because kobject_uevent_env() failed to call CRDA, not because
CRDA failed. For those who want to find out why we also let you
do so by enabling the kernel config CONFIG_CFG80211_REG_DEBUG --
you'll get an actual stack trace.

So for now we'll treat non -ENOMEM kobject_uevent_env() failures as
non fatal during cfg80211's initialization.

CC: Greg KH <greg@kroah.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:55 -05:00
Luis R. Rodriguez ba25c14142 cfg80211: add regulatory_hint_core() to separate the core reg hint
This makes the core hint path more readable and allows for us to
later make it obvious under what circumstances we need locking or not.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:55 -05:00
Luis R. Rodriguez 80778f18c0 nl80211: disallow user requests prior to regulatory_init()
If cfg80211 is built into the kernel there is perhaps a small
time window betwen nl80211_init() and regulatory_init() where
cfg80211_regdomain hasn't yet been initialized to let the
wireless core do its work. During that rare case and time
frame (if its even possible) we don't allow user regulatory
changes as cfg80211 is working on enabling its first regulatory
domain.

To check for cfg80211_regdomain we now contend the entire operation
using the cfg80211_mutex.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:55 -05:00
Luis R. Rodriguez a1794390f1 cfg80211: rename cfg80211_drv_mutex to cfg80211_mutex
cfg80211_drv_mutex is protecting more than the driver list,
this renames it and documents what its currently supposed to
protect.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:55 -05:00
Luis R. Rodriguez 85fd129a72 cfg80211: add wiphy_idx_valid to check for wiphy_idx sanity
This will later be used by others, for now make use of it in
cfg80211_drv_by_wiphy_idx() to return early if an invalid
wiphy_idx has been provided.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:54 -05:00
Luis R. Rodriguez b5850a7a4f cfg80211: rename cfg80211_registered_device's idx to wiphy_idx
Makes it clearer to read when comparing to ifidx

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:54 -05:00
Alina Friedrichsen 79f6440c52 mac80211: Introduce a generic commit() to apply changes
This patch introduces a generic commit() function which initiate a
new network joining process. It should be called after some interface
config changes, so that the changes get applied more cleanly. Currently
set_ssid() and set_bssid() call it. Others can be added in future
patches.

In version 1 the header files was forgotten, sorry.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:54 -05:00
Michael Buesch 5f9724dd94 b43: Convert usage of b43_radio_maskset()
This patch converts code to use the new b43_radio_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_radio_write16(dev, addr, (b43_radio_read16(dev, addr) & mask) | set);
+b43_radio_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 3718582a66 b43: Convert usage of b43_radio_mask()
This patch converts code to use the new b43_radio_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) & mask);
+b43_radio_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 4cf507696a b43: Convert usage of b43_radio_set()
This patch converts code to use the new b43_radio_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_radio_write16(dev, addr, b43_radio_read16(dev, addr) | set);
+b43_radio_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:53 -05:00
Michael Buesch 76e190cd4b b43: Convert usage of b43_phy_maskset()
This patch converts code to use the new b43_phy_maskset() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask, set;
@@

-b43_phy_write(dev, addr, (b43_phy_read(dev, addr) & mask) | set);
+b43_phy_maskset(dev, addr, mask, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch ac1ea3959f b43: Convert usage of b43_phy_mask()
This patch converts code to use the new b43_phy_mask() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, mask;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) & mask);
+b43_phy_mask(dev, addr, mask);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Michael Buesch e59be0b529 b43: Convert usage of b43_phy_set()
This patch converts code to use the new b43_phy_set() API.

The semantic patch that makes this change is as follows:

// <smpl>
@@
expression dev, addr, set;
@@

-b43_phy_write(dev, addr, b43_phy_read(dev, addr) | set);
+b43_phy_set(dev, addr, set);
// </smpl>

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:52 -05:00
Dan Williams 9b02f419a7 libertas: use private SDIO workqueue to avoid scheduling latency
The libertas SDIO interface scheduled the packet worker, resulting in
unwanted latency for every data packet or command sent to the firmware.
Fix a bug on the SDIO probe error path too.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 25d3ef59a2 b43: Implement sw scan callbacks
This implements the new sw scan callbacks in b43.
They are currently used to turn CFP update in the microcode off while scanning.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 80e775bf08 mac80211: Add software scan notifiers
This adds optional notifier functions for software scan.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:51 -05:00
Michael Buesch 8821905cfb b43: Enable PCI slow clock workaround, if needed.
Enable the PCI slow clock workaround, if we're running a PCI core rev <= 10.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 1cc8f476f1 b43: Honor the no-slow-clock boardflag
Do not turn off the crystal, if the boardflags tell us so.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 969d15cfab b43: Fix radio host flags
This fixes initialization of some radio related hostflags.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Michael Buesch 2d071ca50e b43: Add slot count compiletime assertion
This adds a compiletime assertion for a recently introduced
assumption on the slot counts.
The tx header cache handling code assumes that the TX slot count
can be divided evenly by the number of TX slots per frame.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:50 -05:00
Sujith 20977d3e68 ath9k: Add appropriate ANI values for AP mode
The short calibration interval is different for AP
mode, fix this. Also, the timer should be rearmed in
the calibration routine during scanning.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith db0f41f556 ath9k: Fix PCI shutdown sequence
pci_release_region() has to be called after the device
has been disabled. Also remove a stray __init attribute.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 8147f5de7a ath9k: Fix bug in EEPROM chainmask retrieval
Using wrong chainmasks would have an adverse impact on performance.
This patch fixes chainmask retrieval for non-PCIE cards.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith 9e71279084 ath9k: Add PER to RC debug statistics
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:49 -05:00
Sujith d9ae96d94a ath9k: Remove multiple macro occurrences
OLC_FOR_AR9280_20_LATER is defined in multiple places,
move it to a common location.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Alina Friedrichsen f452a63d1e ath9k: Don't reset TSF after scanning automatically
Reset automatically the TSF on re-enabling beaconing after scanning
in IBSS mode causes several problems. For example a new created IBSS
network can't age before an other node has joined, because scans are
done automatically in that case. And several other strange bugs more...

The TSF reset is done manually in the higher level mac80211 code in
the cases were it's needed, so we don't need to do it here.

Signed-off-by: Alina Friedrichsen <x-alina@gmx.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch bdceeb2dad b43: Optimize DMA buffers
In the old days we used one slot per frame. But when we changed that to 2,
we didn't raise the overall slot count. Which resulted in an effective
division of two to the number of slots.

Double the number of TX slots, so we have an effective hardware queue
of 128 frames per QoS queue.

Also optimize the TX header cache handling. We don't need a cached TX header
for slots that will never carry an actual header.
So we reduce the memory consumption of the cache by 50%.

So as a net result we end up with more or less the same memory usage before
and after this patch (except a few tiny meta structures), but have twice
the number of TX slots available.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:48 -05:00
Michael Buesch 8eccb53f1b b43: Fix DMA buffer size handling
This fixes hidden bugs in the size handling of the DMA buffers.
This sets the RX buffer size to the theoretical max packet size and
fixes passing of the size values to the device (must not subtract the header offset).

These bugs are hidden and don't actually trigger due to the magic +100
offset for the buffer size.

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Michael Buesch ca2d559e1a b43: Move DMA stop sanity check
Move the DMA stop sanity check up a few lines, so it's actually
theoretically possible to trigger. (But it still shouldn't trigger, of course).

Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Vasanthakumar Thiagarajan dbaaa147d6 ath9k: Filter out beacons from other BSS in STA mode
Passing beacons received from other BSS to s/w in non-scanning
state is unnecessary in STA mode. This patch filters them out in
h/w.

Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:47 -05:00
Fenghua Yu 96891ceeda iwlwifi: dma mapping read and write changes
When iwlwifi runs on IOMMU, IOMMU generates a lot of PTE write faults
because PTE write bit is not set on some of PTE's. This is because iwlwifi
driver calls DMA mapping with PCI_DMA_TODEVICE which is read only in mapping
PTE. But iwlwifi device actually writes to the mapped page to update its contents.
This issue is not exposed in swiotlb. But VT-d hardware can capture this fault and
stop the fault transaction.

The iwl TX command contains a scratch field that is updated by uCode to
indicate retry counts. For 5000 series the patch is required also for
regular frames, but this patch does not differenciate.

Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Acked-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>
2009-02-27 14:52:47 -05:00
Abhijeet Kolekar 7dc45f25d3 iwl3945: use SW rfkill from iwlwifi
Patch unifies use of SW rfkill between 3945 and agn driver.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar f17d08a657 iwl3945: use iwl_isr
iwl3945 uses iwl_isr and deletes duplicated iwl3945_isr.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar ed3b932e01 iwl3945: remove duplicate interrupt code
Patch removes duplicate code to enable and disable interrupt.
iwl3945 now uses iwlwifi's functions.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:46 -05:00
Abhijeet Kolekar 261b9c3398 iwl3945: use iwl_rx_reply_error notification
Patch removes duplicate code from iwl3945 and uses
iwl_rx_reply_error and spectrum notifications from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar 030f05eda6 iwl3945: use iwl rx handlers
Patch removes duplicate rx handlers(pm_sleep and pm_debug) from 3945 and
uses handlers from iwlwifi.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar e9dde6f6ed iwl3945: use iwl_mac_hw_scan callback
3945 can use iwl_mac_hw_scan callback instead of
iwl3945_mac_hw_scan callback.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Abhijeet Kolekar cade0eb2c7 iwl3945: use iwl_rx_scan handlers
Patch makes use of iwl_rx_scan handler for 3945.

Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:45 -05:00
Jason Andryuk 2ce4f9d861 at76c50x-usb: convert at76_debug to an unsigned int
at76_debug should be an unsigned int as it used as a bit field.  In
fact, modprobe fails when trying to set at76_debug's high bit.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Jason Andryuk 19e8bc7fa7 at76c50x-usb: update to latest mac80211 hw scan api
With the latest mac80211 stack, the driver needs to be updated for
cfg80211 scanning.  I based the changes off of modifications for
at76_usb found here:

http://johannes.sipsolutions.net/patches/old/all/2008-09-19-13:35/020-cfg80211-scan.patch

The trick was that max_signal also needs to be set to avoid a divide
by zero Oops.  I just guessed and used the value 100 for now.

kvalo: handpicked the change from two different patches

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Kalle Valo 1264b95146 at76c50x-usb: add driver
This is a driver for usb devices based on at76c50x chipset. This is
a mac80211 port of the original at76_usb driver.

Signed-off-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
John W. Linville 41d2f291d7 iwlagn: default to MAX_UCODE_BEACON_INTERVAL in iwl_adjust_beacon_interval
Default to MAX_UCODE_BEACON_INTERVAL if the output of
iwl_adjust_beacon_interval would otherwise be zero.  This prevents a
division by zero on my iwl5300-equipped Lenovo T400 with kernels that
include "mac80211: use cfg80211s BSS infrastructure".

This patch is a bit of a hack -- I'm not sure why iwl_setup_rxon_timing
is giving iwl_adjust_beacon_interval a zero input (which is the only way
it would output zero).  I would be happy to have a better fix.  But for
now, this makes my box boot...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:44 -05:00
Roel Kluin c493b017e0 b43: Fix LO calibration txctl reg value
This patch expands the parenthesis in the txctl reg write
of the LO calibration to enforce precedence rules.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
Roel Kluin e05eac3794 p54: misplaced parentheses
Only FIF_FCSFAIL is set due to parentheses

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
Dan Williams c3d72b9681 ipw2x00: age scan results on resume
Scanned BSS entries are timestamped with jiffies, which doesn't
increment across suspend and hibernate.  On resume, every BSS in the
scan list looks like it was scanned within the last 10 seconds,
irregardless of how long the machine was actually asleep.  Age scan
results on resume with the time spent during sleep so userspace has a
clue how old they really are.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:43 -05:00
John W. Linville bc8263f1d8 airo: correct improper initialization of local variable
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:42 -05:00
Johannes Berg 4aa188e1a8 mac80211/cfg80211: move iwrange handler to cfg80211
The previous patch made cfg80211 generally aware of the signal
type a given hardware will give, so now it can implement
SIOCGIWRANGE itself, removing more wext stuff from mac80211.
Might need to be a little more parametrized once we have
more hardware using cfg80211 and new hardware capabilities.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:42 -05:00
Johannes Berg 77965c970d cfg80211: clean up signal type
It wasn't a good idea to make the signal type a per-BSS option,
although then it is closer to the actual value. Move it to be
a per-wiphy setting, update mac80211 to match.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:42 -05:00
Johannes Berg 630e64c487 nl80211: remove admin requirement from station get
There's no particular reason to not let untrusted users see
this information -- it's just the stations we're talking to,
packet counters for them and possibly some mesh things.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-27 14:52:41 -05:00