- Aug 02, 2011
-
-
Stanislaw Gruszka authored
We may call rt2x00queue_pause_queue(queue) with queue == NULL. Bug was introduced by commit 62fe7784 "rt2x00: Fix stuck queue in tx failure case" . Cc: stable@kernel.org # 3.0+ Signed-off-by:
Stanislaw Gruszka <sgruszka@redhat.com> Acked-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jul 07, 2011
-
-
Gertjan van Wingerde authored
Implementing this callback function will cause mac80211 refrain from going to powersave state when there are still untransmitted TX frames in the queues. This would exactly mimic the behaviour of the legacy vendor driver which also doesn't go in powersave mode if there are still TX frames that are not transmitted. This should make powersaving and rt2x00 a better couple. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Apr 19, 2011
-
-
Ivo van Doorn authored
Implement the get_antenna and set_antenna callback functions, which will allow clients to control the antenna for all non-11n hardware (Antenna handling in rt2800 is still a bit magical, so we can't use the set_antenna for those drivers yet). To best support the set_antenna callback some modifications are needed in the diversity handling. We should never look at the default antenna settings to determine if software diversity is enabled. Instead we should set the diversity flag when possible, which will allow the link_tuner to automatically pick up the tuning. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
With the get_ringparam callback function we can export ring parameters to ethtool through the mac80211 interface. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
The number of flags defined for the rt2x00dev->flags field, has been growing over the years. Currently we are approaching the maximum number of bits which are available in the field. A secondary problem, is that one part of the field are initialized only during boot, because the driver requirements are initialized or device requirements are loaded from the EEPROM. In both cases, the flags are fixed and will not change during device operation. The other flags are the device state, and will change frequently. So far this resulted in the fact that for some flags, the atomic bit accessors are used, while for the others the non-atomic variants are used. By splitting the flags up into a "flags" and "cap_flags" we can put all flags which are fixed inside "cap_flags". This field can then be read non-atomically. In the "flags" field we keep the device state, which is going to be read atomically. This adds more room for more flags in the future, and sanitizes the field access methods. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
Since commit 0b7fde54 "rt2x00: Protect queue control with mutex" rt2x00 used rt2x00queue_pause_queue for stopping a tx queue in mac80211. But in case of a failure in the tx path rt2x00 still called ieee80211_stop_queue which stopped the queue but prevented rt2x00queue_unpause_queue to wake the queue up again resulting in a stuck tx queue. Fix this by also using rt2x00queue_pause_queue in case of tx failures. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Mar 04, 2011
-
-
Gertjan van Wingerde authored
In the spirit of optimizing the code to get the queue structure of TX queues, also optimize the code to get beacon queues. We can simply use the bcn queue field of the rt2x00_dev structure instead of using the rt2x00queue_get_queue function. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Gertjan van Wingerde authored
The ATIM queue is considered to be a TX queue by the drivers that support the queue. Therefore include support for the ATIM queue to the rt2x00queue_get_tx_queue function so that the drivers that support the ATIM queue can also use that function. Add the support in such a way that drivers that do not support the ATIM queue are not penalized in their efficiency. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
rt2x00queue_write_tx_frame is unlikely to fail. Tell the compiler. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
In some cases (tx path for example) we don't need to check for non-tx queues in rt2x00queue_get_queue. Hence, introduce a new method rt2x00queue_get_tx_queue that is only valid for tx queues and use it in places where only tx queues are valid. Furthermore, this new method is quite short and as such can be inlined to avoid the function call overhead. This only converts the txdone functions of drivers that don't use an ATIM queue and the generic tx path. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Feb 25, 2011
-
-
Johannes Berg authored
The return value of the tx operation is commonly misused by drivers, leading to errors. All drivers will drop frames if they fail to TX the frame, and they must also properly manage the queues (if they didn't, mac80211 would already warn). Removing the ability for drivers to return a BUSY value also allows significant cleanups of the TX TX handling code in mac80211. Note that this also fixes a bug in ath9k_htc, the old "return -1" there was wrong. Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Tested-by: Sedat Dilek <sedat.dilek@googlemail.com> [ath5k] Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> [rt2x00] Acked-by: Larry Finger <Larry.Finger@lwfinger.net> [b43, rtl8187, rtlwifi] Acked-by: Luciano Coelho <coelho@ti.com> [wl12xx] Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Feb 21, 2011
-
-
Helmut Schaa authored
Only devices that don't have RTS/CTS offload need to check for IEEE80211_TX_RC_USE_RTS_CTS and IEEE80211_TX_RC_USE_CTS_PROTECT. By swapping both conditions we keep the same number of needed conditionals for devices without RTS/CTS offload but save one conditional on devices with RTS/CTS offload. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jan 31, 2011
-
-
Helmut Schaa authored
Currently there are two places that trigger a beacon update on PCI devices. The bss_info_changed callback and the periodic update triggered by the TBTT or PRETBTT interrupt. Since the next TBTT or PRETBTT interrupt will periodically fetch an updated beacon remove the update_beacon call in the bss_info_changed callback for PCI devices. In the worst case it will take one beacon interval longer to fetch the new beacon then before. For devices that have a PRETBTT interrupt there should be no change at all. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
This patch allows to dynamically remove beaconing interfaces without shutting beaconing down on all interfaces. The only place to start and stop beaconing are now the start- and stop_queue callbacks. Hence, we can remove some register writes during interface bring up (config_intf) and only write the correct sync mode to the register there. When multiple beaconing interfaces are present we should enable beaconing as soon as mac80211 enables beaconing on at least one of them. The beacon queue gets stopped when the last beaconing interface was stopped by mac80211. Therefore, introduce another interface counter to keep track ot the number of enabled beaconing interfaces and start or stop the beacon queue accordingly. To allow single interfaces to stop beaconing, add a new driver callback clear_beacon to clear a single interface's beacon without affecting the other interfaces. Don't overload the clear_entry callback for clearing beacons as that would introduce additional overhead (check for each TX queue) into the clear_entry callback which is used on the drivers TX/RX hotpaths. Furthermore, the write beacon callback doesn't need to enable beaconing anymore but since beaconing should be disabled while a new beacon is written or cleared we still disable beacon generation and enable it afterwards again in the driver specific callbacks. However, beacon related interrupts should not be disabled/enabled here, that's solely done from the start- and stop queue callbacks. It would be nice to stop the beacon queue just before the beacon update and enable it afterwards in rt2x00queue itself instead of the current implementation that relies on the driver doing the right thing. However, since start- and stop_queue are mutex protected we cannot use them for atomic beacon updates. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jan 04, 2011
-
-
Helmut Schaa authored
The comment doesn't match the code anymore. Fix that. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
Since the last user of intf->lock is gone we can safely remove it. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
Instead of protecting delayed_flags with a spinlock use atomic bitops to make the code more readable. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Gertjan van Wingerde authored
Fix some pointer errors in the various calls to memcpy, memset and memmove. Although none of these errors are fatal (the expression used now results in the same pointer value) it is better to use the proper expression. All errors are having to deal with arrays. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Gertjan van Wingerde authored
The mac field of the rt2x00_intf structure is written to once and used twice. In both these uses the mac address is available via other means. Remove this field as it does not appear to be necessary. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Gertjan van Wingerde authored
The bssid field in struct rt2x00_intf is only written to once, and is never read from. Remove this field, as it appears to not be needed. Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 13, 2010
-
-
Ivo van Doorn authored
Add a new command to the queue handlers: "flush", this moves the flush() callback from mac80211 into rt2x00queue and adds support for flushing the RX queue as well. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
Add wrapper functions in rt2x00queue.c to start & stop queues. This control must be protected using a mutex. Queues can also be paused which will halt the flow of packets between the driver and mac80211. This doesn't require a mutex protection. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
As part of the queue refactoring, change the queue callback function names to have 3 different actions: start, kick & stop. We can now also remove the STATE_RADIO_RX_ON/STATE_RADIO_RX_OFF device_state flags, and replace the usage with using the start_queue/stop_queue callback functions. This streamlines the RX queue handling to the similar approach as all other queues. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johannes Stezenbach authored
Signed-off-by:
Johannes Stezenbach <js@sig21.net> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Nov 15, 2010
-
-
Ivo van Doorn authored
As part of the queue refactoring, the rt2x00lib_toggle_rx can be removed and replaced with the call directly to the set_device_state callback function. We can remove the STATE_RADIO_RX_ON_LINK and STATE_RADIO_RX_OFF_LINK, as it was only used for special behavior inside rt2x00lib rather then the drivers. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Helmut Schaa authored
The BSSID register shouldn't be set in AP mode on some older devices (like rt73usb) as it breaks hw crypto on these. However, rt2800 devices explicitly need the BSSID register set to the same value as our own MAC address (only in AP mode). Hence, don't set the BSSID from rt2x00lib but move it down into rt2800 to avoid problems on older devices. This fixes a regression (at least for rt73usb) and avoids a new regression for rt2800 devices in 2.6.36. Reported-by:
Johannes Stezenbach <js@sig21.net> Reported-by:
Lee <lee-in-berlin@web.de> Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
Implement a basic flush callback function, which simply loops over all TX queues and waits until all frames have been transmitted and the status reports have been gathered. At this moment we don't support dropping any frames during the flush, but mac80211 will only send 'false' for this argument anyway, so this is not important at this time. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Nov 01, 2010
-
-
Uwe Kleine-König authored
"gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by:
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by:
Jiri Kosina <jkosina@suse.cz>
-
- Oct 05, 2010
-
-
Helmut Schaa authored
Update the HT operation mode when mac80211 sends it to us and set the different HT protection modes and rates accordingly. For now only use CTS-to-self with OFDM 24M or CCK 11M when protection is required. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Sep 14, 2010
-
-
Helmut Schaa authored
Previously rt2x00 was always updating all erp related config variables even though mac80211 might only have changed one. Hence, pass the changed flags to the config_erp driver callback so that the driver can limit the changes to the correct values. This fixes an issue in AP mode where the beacon interval is not initialized (and thus zero) but still sent to the hardware causing an interrupt storm on rt2800pci hanging the system. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jul 26, 2010
-
-
Ivo van Doorn authored
Since commit: commit f1aa4c54 Author: Ivo van Doorn <ivdoorn@gmail.com> Date: Tue Jun 29 21:38:55 2010 +0200 rt2x00: Write the BSSID to register when interface is added mananged mode in rt2500pci was broken, due to intf->bssid containing random data rather then the expected 00:00:00:00:00:00 This is corrected by sending the BSSID to rt2x00lib_config_intf only in AP mode where the bssid is set to a valid value. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jul 12, 2010
-
-
Helmut Schaa authored
Since all rt2x00 PCI drivers use threaded interrupts now we don't need to schedule a work just to update the beacon. The only place where the beacon still gets updated in atomic context is from the set_tim callback. Hence, move the work scheduling there. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
While scanning the link tuner must be disabled. Otherwise it will interfere with receiving all beacons for each channel due to changing sensitivity levels. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Jun 30, 2010
-
-
Ivo van Doorn authored
The update_bssid is set only when BSS_CHANGED_BSSID is used, but the check if that field is true is done later in the function but also only when BSS_CHANGED_BSSID is set. This makes the variable useless, as it can never result in a negative check. Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Helmut Schaa <helmut.schaa@googlemail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Ivo van Doorn authored
For the Master mode case, we initialized the BSSID as the MAC address, but never wrote it into the registers. This causes Hardware crypto to break in Master mode when receiving frames which require the BSSID to be filled in. This is safe for STA mode since the BSSID will be initialized to 00:00:00:00:00 at this point, but will be set to the correct value later when the device associates. Signed-off-by:
Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by:
Ivo van Doorn <IvDoorn@gmail.com> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Feb 08, 2010
-
-
Kalle Valo authored
get_tx_stats() will be removed from mac80211. Compile-tested only. Signed-off-by:
Kalle Valo <kalle.valo@iki.fi> Acked-by:
Gertjan van Wingerde <gwingerde@gmail.com> Acked-by:
Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Dec 28, 2009
-
-
Johannes Berg authored
All its members (vif, mac_addr, type) are now available in the vif struct directly, so we can pass that instead of the conf struct. I generated this patch (except the mac80211 and header file changes) with this semantic patch: @@ identifier conf, fn, hw; type tp; @@ tp fn(struct ieee80211_hw *hw, -struct ieee80211_if_init_conf *conf) +struct ieee80211_vif *vif) { <... ( -conf->type +vif->type | -conf->mac_addr +vif->addr | -conf->vif +vif ) ...> } Signed-off-by:
Johannes Berg <johannes@sipsolutions.net> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Nov 28, 2009
-
-
Gertjan van Wingerde authored
As additional fallout also remove the also unused variable ieee80211hdr. Reported-by:
Johannes Stezenbach <js@sig21.net> Signed-off-by:
Gertjan van Wingerde <gwingerde@gmail.com> Acked-by:
Ivo van Doorn <ivdoorn@gmail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
- Nov 19, 2009
-
-
Johannes Berg authored
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 <johannes@sipsolutions.net> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> [rt2x00 bits] Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-