aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/rt2x00/rt2x00dev.c
AgeCommit message (Collapse)AuthorFilesLines
2010-01-05rt2x00: Properly request tx headroom for alignment operations.Gertjan van Wingerde1-1/+11
Current rt2x00 drivers may result in a "ieee80211_tx_status: headroom too small" error message when a frame needs to be properly aligned before transmitting it. This is because the space needed to ensure proper alignment isn't requested from mac80211. Fix this by adding sufficient amount of alignment space to the amount of headroom requested for TX frames. Reported-by: David Ellingsworth <[email protected]> Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-12-21rt2x00: Only remove L2 padding in received frames if there is payload.Gertjan van Wingerde1-1/+3
L2 padding will only be present when there is actual payload present. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-12-21rt2x00 : trim the skb after having the l2pad removed.Alban Browaeys1-3/+3
Otherwise we end up truncating the skb before removing the l2pad thus we might have the truncated part become garbage while getting it back in remove_l2pad. For the same issue: remove the skb_trim from the rt2800 fill_rxdone (it is done after l2pad removal in rt2x00lib_rxdone). Signed-off-by: Alban Browaeys <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-28rt2x00: Centralize setting of extra TX headroom requested by rt2x00.Gertjan van Wingerde1-0/+5
Set the value of extra_tx_headroom in a central place, rather than in each of the drivers. This is preparatory for taking alignment space into account in the TX headroom requested by rt2x00. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-19mac80211: request TX status where neededJohannes Berg1-5/+6
Right now all frames mac80211 hands to the driver have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set to request TX status. This isn't really necessary, only the injected frames need TX status (the latter for hostapd) so move setting this flag. The rate control algorithms also need TX status, but they don't require it. Also, rt2x00 uses that bit for its own purposes and seems to require it being set for all frames, but that can be fixed in rt2x00. This doesn't really change anything for any drivers but in the future drivers using hw-rate control may opt to not report TX status for frames that don't have the IEEE80211_TX_CTL_REQ_TX_STATUS flag set. Signed-off-by: Johannes Berg <[email protected]> Acked-by: Ivo van Doorn <[email protected]> [rt2x00 bits] Signed-off-by: John W. Linville <[email protected]>
2009-11-11rt2x00: Update copyright statements.Gertjan van Wingerde1-1/+1
As mentioned on the linux-wireless mailing list, the current copyright statements in the rt2x00 are meaningless, as the rt2x00 project is not even a formal legal entity. Therefore it is better to replace the existing copyright statements with copyright statements for the people that actually wrote the code. Note: Updated to the best of my knowledge with respect to who contributed considerable amounts of code. Signed-off-by: Gertjan van Wingerde <[email protected]> Acked-by: Ivo van Doorn <[email protected]> CC: Bartlomiej Zolnierkiewicz <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-11rt2x00: Remove deprecated ieee80211_rx_status->qual usageIvo van Doorn1-1/+0
ieee80211_rx_status->qual has been marked deprecated. This allows us to remove several functions and fields which were used to calculate a reasonable value for it. Signed-off-by: Ivo van Doorn <[email protected]> Acked-by: Gertjan van Wingerde <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-11-06rt2x00: Don't queue ieee80211 work after USB removalSean Cross1-2/+2
This prevents the rt2x00 driver from queueing ieee80211 work after the   USB card has been removed, preventing a kernel panic. Signed-off-by: Sean Cross <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-31rt2x00: Reorganize padding & L2 paddingIvo van Doorn1-5/+5
The old function rt2x00queue_payload_align() handled both adding and removing L2 padding and some basic frame alignment. The entire function was being abused because it had multiple functions and the header length argument was somtimes used to align the header instead of the payload. Additionally there was a bug when inserting L2 padding that only the payload was aligned but not the header. This happens when the header wasn't aligned properly by mac80211, but rt2x00lib only moves the payload. A secondary problem was that when removing L2 padding during TXdone or RX the skb wasn't resized to the proper size. Split the function into seperate functions each handling its task as it should. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-31rt2x00: Fix TX status reportingIvo van Doorn1-12/+16
Not all values of the TX status enumeration were covered during updating of the TX statistics. This could lead to wrong bitrate tuning but also wrong behavior in tools like hostapd. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-20rt2x00: bss_info_changed() callback is allowed to sleepIvo van Doorn1-8/+0
The bss_info_changed() callback function no longer needs to be atomic. Remove the scheduled work structure and call into the driver directly. Additionaly this makes the DRIVER_REQUIRE_SCHEDULED flag redundant so it can be removed. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-20rt2x00: configure_filter() callback is allowed to sleepIvo van Doorn1-10/+0
The configure_filter() callback function no longer needs to be atomic. Remove the scheduled work structure and call into the driver configure_filter() directly. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-20rt2x00: Add support for retry ratesBenoit PAPILLAULT1-5/+17
rt2800pci can handle different retry rates, it will always step 1 rate down after a failed transmission so creating the retry rate list for mac80211 is quite simple. Signed-off-by: Benoit PAPILLAULT <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-14rt2x00: Fix for race condition while update beaconIgor Perminov1-7/+0
The patch "Implement set_tim callback for all drivers" can cause kernel oops in rt73usb_write_beacon. The oops is caused by one of the following race conditions: * In case of two near calls to set_tim: rt2x00lib_beacondone_iter is cleaning the beacon skb, whereas rt73usb_write_beacon is still using it. * In case of two near updates of beacon: first as the result of set_tim and second as the result of a call from an application (e.g. hostapd). This patch fixes the race condition by rearranging the update logic and guarding rt2x00_intf->beacon->skb with a mutex. Signed-off-by: Igor Perminov <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-14rt2x00: Remove usage of deprecated radio_enabled & ↵Ivo van Doorn1-0/+7
IEEE80211_CONF_CHANGE_RADIO_ENABLED In the config() callback function the fields radio_enabled and the change flag IEEE80211_CONF_CHANGE_RADIO_ENABLED have been deprecated. This removes the usage of those fields by improving antenna change detection in the antenna configuration function. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-04rt2x00: cancel all work on disconnectPavel Roskin1-0/+6
Signed-off-by: Pavel Roskin <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-08-04mac80211: redefine usage of the mac80211 workqueueLuis R. Rodriguez1-1/+1
The mac80211 workqueue exists to enable mac80211 and drivers to queue their own work on a single threaded workqueue. mac80211 takes care to flush the workqueue during suspend but we never really had requirements on drivers for how they should use the workqueue in consideration for suspend. We extend mac80211 to document how the mac80211 workqueue should be used, how it should not be used and finally move raw access to the workqueue to mac80211 only. Drivers and mac80211 use helpers to queue work onto the mac80211 workqueue: * ieee80211_queue_work() * ieee80211_queue_delayed_work() These helpers will now warn if mac80211 already completed its suspend cycle and someone is trying to queue work. mac80211 flushes the mac80211 workqueue prior to suspend a few times, but we haven't taken the care to ensure drivers won't add more work after suspend. To help with this we add a warning when someone tries to add work and mac80211 already completed the suspend cycle. Drivers should ensure they cancel any work or delayed work in the mac80211 stop() callback. Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-07-24rt2x00: Remove DEVICE_STATE_DISABLED_RADIO_HWIvo van Doorn1-2/+1
The DEVICE_STATE_DISABLED_RADIO_HW flag is only read but never set, it is an ancient part of one of the many versions of the rfkill implementations in rt2x00. It is about time is disappears. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-07-10rt2x00: use wiphy rfkill interfaceIvo van Doorn1-2/+0
Remove the input_polldev from rt2x00 and replace it with the rfkill interface offered by the wiphy structure. This simplifies the entire rfkill handling in rt2x00 and allows us to remove the CONFIG_RT2X00_LIB_RFKILL option and always enables rfkill capabilities. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-07-10mac80211: push rx status into skb->cbJohannes Berg1-1/+2
Within mac80211, we often need to copy the rx status into skb->cb. This is wasteful, as drivers could be building it in there to start with. This patch changes the API so that drivers are expected to pass the RX status in skb->cb, now accessible as IEEE80211_SKB_RXCB(skb). It also updates all drivers to pass the rx status in there, but only by making them memcpy() it into place before the call to the receive function (ieee80211_rx(_irqsafe)). Each driver can now be optimised on its own schedule. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-05-20rt73usb: fix for master modeAlexandre Becholey1-3/+6
Report status unknown as if there were successfully transmitted. This will avoid hostapd to disassociate because it doesn't understand what a status unknown is. Signed-off-by: Alexandre Becholey <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-05-06rt2x00: Implement support for 802.11nIvo van Doorn1-25/+67
Extend rt2x00lib capabilities to support 802.11n, it still lacks aggregation support, but that can be added in the future. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-05-06rt2x00: Add support for L2 padding during TX/RXIvo van Doorn1-15/+18
Some hardware require L2 padding between header and payload because both must be aligned to a 4-byte boundary. This hardware also is easier during the RX path since we no longer need to move the entire payload but rather only the header to remove the padding (mac80211 only wants the payload to be 4-byte aligned). Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-04-16rt2x00: prevent double kfree when failing to register hardwareHerton Ronaldo Krzesinski1-3/+1
In a scenario where there isn't any firmware available, we will have a double kfree of rt2x00dev->spec.channels_info when ieee80211_register_hw returns an error status inside rt2x00lib_probe_hw. The problem is that if ieee80211_register_hw fails, we call rt2x00lib_remove_hw twice: * first inside rt2x00lib_probe_hw upon failure of ieee80211_register_hw * error status is returned to rt2x00lib_probe_dev, which then sees it and calls in this case rt2x00lib_remove_dev that will again run rt2x00lib_remove_hw Prevent this avoiding calling rt2x00lib_remove_hw inside rt2x00lib_probe_hw Problem was detected with CONFIG_DEBUG_PAGEALLOC=y, CONFIG_SLUB_DEBUG=y, CONFIG_SLUB_DEBUG_ON=y, that dumps this with no firmware available: rt61pci 0000:00:07.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19 wmaster0 (rt61pci): not using net_device_ops yet phy0: Selected rate control algorithm 'pid' phy0: Failed to initialize wep: -2 phy0 -> rt2x00lib_probe_dev: Error - Failed to initialize hw. ============================================================================= BUG kmalloc-128: Object already free ----------------------------------------------------------------------------- INFO: Allocated in rt61pci_probe_hw+0x3e5/0x6e0 [rt61pci] age=340 cpu=0 pid=21 INFO: Freed in rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] age=0 cpu=0 pid=21 INFO: Slab 0xc13ac3e0 objects=23 used=10 fp=0xdd59f6e0 flags=0x400000c3 INFO: Object 0xdd59f6e0 @offset=1760 fp=0xdd59f790 Bytes b4 0xdd59f6d0: 15 00 00 00 b2 8a fb ff 5a 5a 5a 5a 5a 5a 5a 5a ....².ûÿZZZZZZZZ Object 0xdd59f6e0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f6f0: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f700: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f710: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f720: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f730: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f740: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b kkkkkkkkkkkkkkkk Object 0xdd59f750: 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b 6b a5 kkkkkkkkkkkkkkk¥ Redzone 0xdd59f760: bb bb bb bb »»»» Padding 0xdd59f788: 5a 5a 5a 5a 5a 5a 5a 5a ZZZZZZZZ Pid: 21, comm: stage1 Not tainted 2.6.29.1-desktop-1.1mnb #1 Call Trace: [<c01abbb3>] print_trailer+0xd3/0x120 [<c01abd37>] object_err+0x37/0x50 [<c01acf57>] __slab_free+0xe7/0x2f0 [<c01ad1de>] kfree+0x7e/0xd0 [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] [<e0e4a239>] ? rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] [<e0e4a239>] rt2x00lib_remove_hw+0x59/0x70 [rt2x00lib] [<e0e4acc7>] rt2x00lib_remove_dev+0x37/0x50 [rt2x00lib] [<e0e4b087>] rt2x00lib_probe_dev+0x1a7/0x3b0 [rt2x00lib] [<e0eb288f>] rt2x00pci_probe+0xdf/0x1ee [rt2x00pci] [<c026b9ee>] local_pci_probe+0xe/0x10 [<c026c750>] pci_device_probe+0x60/0x80 [<c02d5c2a>] driver_probe_device+0x9a/0x2e0 [<c02d5ef9>] __driver_attach+0x89/0x90 [<c02d541b>] bus_for_each_dev+0x4b/0x70 [<c026c690>] ? pci_device_remove+0x0/0x40 [<c02d59d9>] driver_attach+0x19/0x20 [<c02d5e70>] ? __driver_attach+0x0/0x90 [<c02d4cef>] bus_add_driver+0x1cf/0x2a0 [<c026c690>] ? pci_device_remove+0x0/0x40 [<c02d60c9>] driver_register+0x69/0x140 [<c026c9b0>] __pci_register_driver+0x40/0x80 [<e0ecc000>] ? rt61pci_init+0x0/0x19 [rt61pci] [<e0ecc017>] rt61pci_init+0x17/0x19 [rt61pci] [<c0101116>] do_one_initcall+0x26/0x1c0 [<c01ab90c>] ? slab_pad_check+0x3c/0x120 [<c01ab90c>] ? slab_pad_check+0x3c/0x120 [<c01ac8da>] ? check_object+0xda/0x210 [<c01b0026>] ? percpu_free+0x46/0x50 [<c01ad09e>] ? __slab_free+0x22e/0x2f0 [<c01b0026>] ? percpu_free+0x46/0x50 [<c01b0026>] ? percpu_free+0x46/0x50 [<c01b0026>] ? percpu_free+0x46/0x50 [<c01687ec>] ? stop_machine_destroy+0x3c/0x40 [<c015e515>] ? load_module+0xa5/0x1c50 [<e0ec5000>] ? rt61pci_eepromregister_read+0x0/0x40 [rt61pci] [<e0eb2000>] ? rt2x00pci_write_tx_data+0x0/0x90 [rt2x00pci] [<c03ac2fb>] ? mutex_lock+0xb/0x20 [<c03ac2fb>] ? mutex_lock+0xb/0x20 [<c017ad16>] ? tracepoint_update_probe_range+0x76/0xa0 [<c017ad6f>] ? tracepoint_module_notify+0x2f/0x40 [<c03b02ed>] ? notifier_call_chain+0x2d/0x70 [<c014f0ed>] ? __blocking_notifier_call_chain+0x4d/0x60 [<c014f11a>] ? blocking_notifier_call_chain+0x1a/0x20 [<c0160156>] sys_init_module+0x96/0x1d0 [<c019dad6>] ? sys_munmap+0x46/0x60 [<c0105546>] syscall_call+0x7/0xb FIX kmalloc-128: Object at 0xdd59f6e0 not freed rt61pci 0000:00:07.0: PCI INT A disabled rt61pci: probe of 0000:00:07.0 failed with error -2 Signed-off-by: Herton Ronaldo Krzesinski <[email protected]> Acked-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-02-09rt2x00: Add kill_tx_queue callback functionIvo van Doorn1-2/+3
provide rt2x00lib the possibility to kill a particular TX queue. This can be useful when disabling the radio, but more importantly will allow beaconing to be disabled when mac80211 requests this (during scanning for example) Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-02-09rt2x00: Move intf_work to mac82011 workqueueIvo van Doorn1-1/+1
ieee80211_iterate_active_interfaces() no longer acquires the RTNL lock which means the intf_work handler can be safely used from the mac80211 workqueue again. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Simplify suspend/resume handlingIvo van Doorn1-88/+5
With mac80211 handling all open interfaces during suspend and resume we can simplify suspend/resume within rt2x00lib. The only thing rt2x00 needs to do is free up memory during suspend and bring back the minimal required components during resume. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Update copyright year to 2009Ivo van Doorn1-1/+1
Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Introduce RXDONE_SIGNAL_MASK maskIvo van Doorn1-2/+2
Improve error message reporting when a frame was received with unknown rate. Instead of using the boolean check if the frame is supposed to be a PLCP value or not, we should add a new mask (RXDONE_SIGNAL_MASK) which returns the type identification for a signal value (i.e. PLCP). At the moment we only have 2 different types, but more will arrive when support for 11n is added. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Allow drivers to pass the noise value during rxdoneIvo van Doorn1-0/+1
Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Implement WDS supportIvo van Doorn1-3/+6
WDS support should be very easy to handle, mac80211 handles everything for us, so all that is needed is to set the support flags and handle it in the add_interface() callback. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Add mesh supportAndrey Yurovsky1-4/+7
This adds initial support for Mesh Point mode. For this we tell mac80211 that we support NL80211_IFTYPE_MESH_POINT. We also need to send beacons. mac80211 will configure our RX filter accordingly. Signed-off-by: Andrey Yurovsky <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-29rt2x00: Move link tuning into seperate fileIvo van Doorn1-295/+8
Move link and antenna tuning into a seperate file named rt2x00link.c, this makes the interface to the link tuner a lot cleaner. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2009-01-12rt2x00: Fix TX short preamble detectionIvo van Doorn1-5/+3
The short preamble mode was not correctly detected during TX, rt2x00 used the rate->hw_value_short field but mac80211 is not using this field that way. Instead the flag IEEE80211_TX_RC_USE_SHORT_PREAMBLE should be used to determine if the frame should be send out using short preamble or not. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-12-05rt2x00: Add RXDONE_CRYPTO_IV/ICV flagsIvo van Doorn1-1/+2
Drivers should notify rt2x00lib when they provide the IV/ICV data. This adds some flexibility to drivers which can't provide all information. * rt2500usb provides ICV inside the frame * rt2800pci doesn't provide IV/ICV * rt2800usb doesn't provide IV/ICV Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-21rt2x00: Fix race condition when using inderect registersIvo van Doorn1-0/+2
Indirect registers require multiple calls to the CSR register in order to access the indirect registers. This must be protected under a lock to prevent race conditions which could cause invalid data to be returned when reading from the indirect register or silent failures when writing data to the indirect register. USB drivers where already protected under a mutex, so rename the mutex and make PCI drivers use the mutex as well. This now means that BBP and RF registers are no longer accessible in interrupt context. That is not a bad situation since the slow behavior of accessing those registers means we don't _want_ to access them in interrupt context either. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-21rt2x00: Cleanup TX/RX entry handlingIvo van Doorn1-4/+3
Merge the callback functions init_txentry() and init_rxentry(). This makes life in rt2x00lib a lot simpler and we can cleanup several functions. rt2x00pci contained "fake" FIELD definitions for descriptor words. This is not flexible since it assumes the driver will always have the same field to indicate if a driver is available or not. This should be dependent on the driver, and we should add a callback function for this. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-21rt2x00: Fix BUG_ON() with antenna handlingIvo van Doorn1-10/+12
With the new configuration handling, and more specifically splitting the configuration of the antenna from the normal configuration steps allowed a BUG_ON() to be triggered in the driver because the SW_DIVERSITY was send to the driver. This fixes that by catching the value early in rt2x00config.c and replacing it with a sensible value. This also fixes a problem where the antenna is not being initialized at all when the radio is enabled. Since it no longer is part of the mac80211 configuration the only place where rt2x00 configured it was the SW diversity handler. Obviously this is broken for all non-diversity hardware and breaks SW diversity due to a broken initialization. When the radio is enabled the antenna will be configured once as soon as the config() callback function is called. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-21rt2x00: Remove RATE_BASIC flagIvo van Doorn1-7/+7
mac80211 is in charge of determining the basic rates, so we are not using the RATE_BASIC flag anymore. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-10rt2x00: Improve interface_modes initializationIvo van Doorn1-4/+10
All operating modes which require beaconing should depend on the availability of beacon entries from the hardware. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-11-10rt2x00: Remove ieee80211_bss_conf from rt2x00_intfIvo van Doorn1-1/+1
We can safely remove ieee80211_bss_conf from rt2x00_intf, it is provided by mac80211 in ieee80211_vif as well. (rt2x00_intf is the drv_priv field of ieee80211_vif). Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-10-31mac80211/drivers: rewrite the rate control APIJohannes Berg1-4/+10
So after the previous changes we were still unhappy with how convoluted the API is and decided to make things simpler for everybody. This completely changes the rate control API, now taking into account 802.11n with MCS rates and more control, most drivers don't support that though. Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-10-31mac80211: introduce hw config change flagsJohannes Berg1-1/+1
This makes mac80211 notify the driver which configuration actually changed, e.g. channel etc. No driver changes, this is just plumbing, driver authors are expected to act on this if they want to. Also remove the HW CONFIG debug printk, it's incorrect, often we configure something else. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-10-31mac80211: kill hw.conf.antenna_sel_{rx,tx}Johannes Berg1-4/+2
Never actually used. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-15mac80211: use nl80211 interface typesJohannes Berg1-4/+4
There's really no reason for mac80211 to be using its own interface type defines. Use the nl80211 types and simplify the configuration code a bit: there's no need to translate them any more now. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-09-05cfg80211: keep track of supported interface modesLuis R. Rodriguez1-0/+5
It is obviously good for userspace to know up front which interface modes a given piece of hardware might support (even if adding such an interface might fail later because of concurrency issues), so let's make cfg80211 aware of that. For good measure, disallow adding interfaces in all other modes so drivers don't forget to announce support for one mode when they add it. Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Stephen Blackheath <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: Luis R. Rodriguez <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29rt2x00: Add Signal type flagIvo van Doorn1-1/+1
Instead of using the PLCP flag to indicate if the signal value is plcp or the bitrate we should add a new flag to mark the bitrate type explicitely. This is usefull when new types are added later for rt2800. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29rt2x00: Only configure hardware when radio is enabledMattias Nissler1-10/+0
Some hardware configuration registers such as antenna and channel configuration can only be written when the radio is enabled. Previously, we didn't consider this, so some configuration items could be set inconsistently after reenabling the radio. This patch changes the config() handler to only reprogram the hardware when the radio is enabled. Configuration changes that are made while the radio is off are postponed until the radio is switched back on. We also leave the radio turned off during initialization and only enable it when requested by mac80211. This allows us to get rid of the DIRTY_CONFIG flag, because the device is now guaranteed to be completely initialized when brought up by mac80211. Signed-off-by: Mattias Nissler <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-29rt2x00: Fix race conditions in flag handlingIvo van Doorn1-28/+30
Some of the flags should be accessed atomically to prevent race conditions. The flags that are most important are those that can change often and indicate the actual state of the device, queue or queue entry. The big flag rename was done to move all state flags to the same naming type as the other rt2x00dev flags and made sure all places where the flags were used were changed. ;) Thanks to Stephen for most of the queue flags updates, which fixes some of the most obvious consequences of the race conditions. Among those the notorious: rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0. rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0. rt2x00queue_write_tx_frame: Error - Arrived at non-free entry in the non-full queue 0. Signed-off-by: Stephen Blackheath <[email protected]> Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>
2008-08-22rt2x00: Gather channel information in structureIvo van Doorn1-14/+4
Channel information which is read from EEPROM should be read into an array containing per-channel information. This removes the requirement of multiple arrays and makes the channel handling a bit cleaner and easier to expand. Signed-off-by: Ivo van Doorn <[email protected]> Signed-off-by: John W. Linville <[email protected]>