summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/p54/p54.h
Commit message (Collapse)AuthorAgeFilesLines
* p54: only unregister ieee80211_hw when it has been registeredChristian Lamparter2012-04-091-0/+1
| | | | | | | | | p54_unregister_common may now be called by the backend driver's remove routine, even if the ieee80211_hw device struct was never successfully registered. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: improve site surveyChristian Lamparter2011-08-241-0/+18
| | | | | | | | | | | | | | | | | | | | | | The firmware keeps track of channel usage. This data can be used by the automatic channel selection to find the best channel. Survey data from wlan4 frequency: 5200 MHz [in use] noise: -91 dBm channel active time: 811909 ms channel busy time: 63395 ms channel transmit time: 59636 ms Survey data from wlan4 frequency: 5210 MHz noise: -91 dBm channel active time: 121 ms channel busy time: 119 ms channel transmit time: 0 ms Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: implement multicast filterChristian Lamparter2011-04-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "For best CPU usage and power consumption, having as few frames as possible percolate through the stack is desirable. Hence, the hardware should filter as much as possible." Note: Not all firmwares include the multicast filter feature and the stack does not filter them either. The ARP filter on the other hand was dropped from the patch since it does not work correctly: Quote from: Max Filippov <jcmvbkbc@gmail.com> <http://www.spinics.net/lists/linux-wireless/msg67466.html> "In the ARP case, when there's no other traffic on p54spi, all ARP requests are dropped. But if there's some egress traffic from p54spi, filter seems to work correctly: only ARP requests that match filter pass through. In the multicast case filter seems to work correctly, but it treats broadcast as subject to that filtering too. By default only 01:00:5e:00:00:01 gets into priv->mc_maclist, so we miss all broadcasts. These two filters seem to interfere: - if we set ARP filter and multicast filter without bc => we miss all ARPs if there's no egress traffic; - if we set ARP filter and multicast filter with bc or don't set mc filter at all => we get all ARPs. This effect does not depend on filter setup order." Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Tested-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: implement set_coverage_classChristian Lamparter2011-02-251-0/+1
| | | | | | | | The callback sets slot time as specified in IEEE 802.11-2007 section 17.3.8.6 and raises round trip delay accordingly. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: enhance rssi->dBm database importChristian Lamparter2011-02-141-2/+4
| | | | | | | | | | | | | | | | | | | | This patch fixes several shortcomings of the previous implementation. Features of the rewrite include: * handles undocumented "0x0000" word at the start of the frequency table. (Affected some early? DELL 1450 USB devices and my Symbol 5GHz miniPCI card.) * supports more than just one reference point per band. (Also needed for the Symbol card.) * ships with default values in case the eeprom data is damaged, absent or unsupported. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: remove get_tx_stats() mac80211 opKalle Valo2010-02-081-1/+7
| | | | | | | | | | | | | get_tx_stats() will be removed from mac80211. p54 uses struct ieee80211_tx_queue_stats also internally, so create a new identical struct p54_tx_queue_stats which the driver can use. Compile-tested only. Signed-off-by: Kalle Valo <kalle.valo@iki.fi> Tested-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: fix beaconing related firmware crashChristian Lamparter2009-07-241-0/+1
| | | | | | | | | | This patch fixes a firmware crash which can be provoked by changing operation mode. Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Christian Lamparter <chunkeey@web.de> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: generate channel list dynamicallyChristian Lamparter2009-07-241-0/+1
| | | | | | | | This patch enhances the eeprom parser to generate customized channel list for every device. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: re-enable power save featureChristian Lamparter2009-07-241-0/+1
| | | | | | | | | | | | This patch re-enables p54's power save features and adds a workaround which temporarily alters the device's power state in order to allow ps-polls to be sent and buffered data to be retrieved during psm. (Incorporates patch originally posted as "p54: fix beacon template dtim IE corruption". -- JWL) Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: Modify p54 files for new organizationChristian Lamparter2009-07-101-58/+90
| | | | | | | | Modify the remaining p54 files to account for the new file organization. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: correct merge damage from "p54: more SoftLED updates"John W. Linville2009-05-061-2/+2
| | | | | | Ooops... Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: utilize all available key slots for decryption offloadChristian Lamparter2009-04-221-0/+1
| | | | | | | | | | | | This patch takes care of outstanding TODOs: /* TODO: some devices have 4 more free slots for rx keys */ Now the driver can utilize all available key slots instead of just 4. Obviously, this helps most in AP/IBSS(/MESH) mode, when we have to use more different keys. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: add beacon filtering supportChristian Lamparter2009-04-221-0/+1
| | | | | | | This patch adds beacon filtering support to p54. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: more SoftLED updatesChristian Lamparter2009-04-221-4/+5
| | | | | | | | | | | | | | | This patch hopefully finishes the SoftLED code: - It adds two more LEDs (rx and radio). (the FW claims it can support up to 16 LEDs, but I doubt that any vendor put more than 4 on a board) - update the LEDs in a _delayed_ workqueue. No one reported any more crashes. (see: "PATCH] p54: fix race condition in memory management") So we can stop burning the mm code. Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: clean up p54.h's struct p54_commonChristian Lamparter2009-04-221-25/+42
| | | | | | | | This patch rearrange and regroups most elements in p54_common. Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: replace MAC80211_LEDS with P54_LEDS in p54.hChristian Lamparter2009-04-161-6/+6
| | | | | | | | | | I'm very sorry, as this change belongs to the other patch: "[PATCH] p54: fix SoftLED compile dependencies". however I must have somehow lost "git add" for that file. Signed-off-by: Christian Lamparter <chunkeey@web.de> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: initial SoftLED supportChristian Lamparter2009-03-161-0/+25
| | | | | | | This patch adds SoftLED support for all p54 devices. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: unify ieee80211 device registrationChristian Lamparter2009-03-161-0/+1
| | | | | | | | All three drivers (p54pci, p54usb and p54spi) are implementing the same functionality three times. So, why not put it into the shared library?! Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* wireless: restrict to 32 legacy ratesJohannes Berg2009-01-291-1/+1
| | | | | | | | | | Since the standards only define 12 legacy rates, 32 is certainly a sane upper limit and we don't need to use u64 everywhere. Add sanity checking that no more than 32 rates are registered and change the variables to u32 throughout. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54spi: p54spi driverChristian Lamparter2009-01-291-0/+9
| | | | | | | This patch adds the p54spi driver. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: prepare the eeprom parser routines for longbowChristian Lamparter2009-01-291-3/+10
| | | | | | | This patch adds support to upload pre-calculated calibration data to the firmware. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: upgrade memrecord to p54_tx_infoChristian Lamparter2009-01-291-0/+10
| | | | | | | | | mac80211 reserves 24 bytes in skb->cb for the driver. So far, we only used them to keep track of used and free device memory. But p54spi will need a slice of it, as well as the stuck frame detection. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: refactor p54_alloc_skbChristian Lamparter2009-01-291-0/+2
| | | | | | | | | Old firmwares had no problems processing frames which filled eighth of the memory window. However we have to be a bit more careful with fat frames when we talk to new firmwares. Apart from that, I confess the old logic was a bit weird and not very sophisticated. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: enable rx/tx antenna diversity by eeprom bitsChristian Lamparter2009-01-291-0/+2
| | | | | | | Respect all documented bits in the eeprom about the device diversity features. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: remove free_on_tx parameterChristian Lamparter2008-12-191-2/+8
| | | | | | | | | | | | This patch simplifies the tx code a bit and will be necessary for the upcoming stlc45xx<->p54 port. In detail: we no longer have to tell all back-end drivers directly, if we want to free a frame right after it was send to the firmware, or if we do it in the library callback later. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: more accurate rssi to dBm conversionChristian Lamparter2008-12-191-0/+8
| | | | | | | | This patch replaces the static rssi auto calibration data with more precise values out of the device's eeprom. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: move statistic timer update routine into a workqueueChristian Lamparter2008-12-191-3/+2
| | | | | | | | | | | | | | This patch moves a good chunk of code from the former statistic update timer routine into a workqueue, which is kindly provided by mac80211. Also as a nice side-effect we can lay the foundation for other essential housekeeping features we want to do in the future. e.g: - drain the (clogged) tx_queue. - initiate bursts. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: refactoringChristian Lamparter2008-12-051-2/+0
| | | | | | | | | Thanks to the introduction of "changed" flags, we no longer have to do the bookkeeping of p54's firmware state for everything. Thus we can cut down redundancy code. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: utilize cryptographic acceleratorChristian Lamparter2008-12-051-0/+2
| | | | | | | | | This patch allows p54 to utilize its WEP, TKIP and CCMP accelerator. Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: honour bss_info_changed's basic_rates and other settingsChristian Lamparter2008-11-251-0/+3
| | | | | | | | As was pointed out in "p54: honour bss_info_changed's short slot time settings", bss_info_changed provides more useful settings that can be used by the driver. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: AP & Ad-hoc testingChristian Lamparter2008-11-101-0/+1
| | | | | | | This patch finally adds all necessary code to test Ad-hoc & AP mode with p54. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: integrate parts of lmac_longbow.h and other parts of stlc45xxJohn W. Linville2008-10-311-12/+17
| | | | | | | | | | This patch removes most/all? of the "magic" numbers and unknown structure variables inside the code and replaces them with meaningful prototypes. (Plus a one line warning fix from Larry Finger <Larry.Finger@lwfinger.net>.) Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: borrow some setup code from stlc45xxChristian Lamparter2008-10-311-2/+2
| | | | | | | | This patch initialize all remaining values which are necessary for SPI firmwares. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: fix memory managementChristian Lamparter2008-10-311-3/+4
| | | | | | | | | | We have to be careful if multiple "control frames" are passed in a very short intervals to the device's firmware. As p54_assign_address always put them into same memory location. To guarantee that this won't happen anymore, we have to treat control frames like normal data frames in the devices own memory management. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: broken out edcf changesChristian Lamparter2008-10-311-1/+8
| | | | | | | This patch series hopefully increases p54's "longterm" stability. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: provide sequence numbersJohannes Berg2008-10-311-1/+0
| | | | | | | | | | | | | | | I've come to think that not providing sequence numbers for the normal STA mode case was a mistake, at least two drivers now had to implement code they wouldn't otherwise need, and I believe at76_usb and adm8211 might be broken. This patch makes mac80211 assign a sequence number to all those frames that need one except beacons. That means that if a driver only implements modes that do not do beaconing it need not worry about the sequence number. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: honour bss_info_changed's short slot time settingsChristian Lamparter2008-10-311-0/+1
| | | | | | | | | | | | This patch was made on behalf of Johannes request. "mac80211 and IEEE80211_CONF_SHORT_SLOT_TIME" Of course, bss_info_changed provides some more useful data. e.g.: basic_rates, dtim_period, beacon_int and maybe even more. Everything can be hooked up if it's necessary. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: control output power levelsChristian Lamparter2008-09-111-0/+1
| | | | | | | I hope this patch is enough to cover at least the basic requirements of IEEE 802.11h's TPC. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: add lots of useful rx/tx statisticsChristian Lamparter2008-09-111-0/+5
| | | | | | | | | The firmware can provide lots of useful statistics about noise floor, mac time and lots of numbers about successful transfers and dropped frames. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: add more rx filtersChristian Lamparter2008-09-111-0/+1
| | | | | | | This patch adds new filters settings to make the card more useful in monitor mode. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: 32-bit tsf timestampsChristian Lamparter2008-09-111-0/+2
| | | | | | | | | | | | | | tcpdump: 02:15:42.874518 61112184us tsft 48.0 Mb/s 2437 MHz (0x0480) antenna 1 [0x0000000e] CF +QoS Data IV 02:15:42.874557 >>>4356079526us<<< tsft 24.0 Mb/s 2437 MHz (0x0480) antenna 1 [0x0000000e] Acknowledgment 02:15:42.976844 61214513us tsft 1.0 Mb/s 2437 MHz (0x0480) antenna 0 [0x0000000e] Beacon as one can see on the huge jump, it's very plausible that firmware does not report the full 64-bit mac time, just the lower 32bit and some kinds of flags... Therefore if we want a useful timestamp we have to emulate the high bits. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: better firmware supportChristian Lamparter2008-09-081-2/+13
| | | | | | | | | | | | | | This patch hopefully contains all necessary changes to support firmwares for all devices up to atleast 2.13.3.0. (or: LowerMAC Protocol Rev: 5.5 ) And this is a big win, since: * newer firmwares are more stable and reliable than the old ones. * no problems anymore with packages > 1399 octets (without lowering the MTU). * monitor mode finally works on USB for more than just a few seconds. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: set_filter refactoringChristian Lamparter2008-09-081-0/+2
| | | | | | | | p54_set_filter has a way too many unnecessary "magic" parameters and values. This patch axes all superfluous parameters and gives most of the magic values appropriate names. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54usb: support LM87 firmwaresChristian Lamparter2008-09-051-0/+6
| | | | | | | This patch adds the necessary changes to support LM87 firmwares. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: move eeprom code into common libraryChristian Lamparter2008-09-051-4/+5
| | | | | | | | | | | Both p54pci and p54usb uses a good chunk of device specific code to get the data from the device's eeprom into the drivers memory. So, this patch reduces the code size and will it make life easier if someone wants to implement ethtool eeprom dumping features. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: enhance firmware parser to reduce memory wasteChristian Lamparter2008-09-051-2/+4
| | | | | | | | | | This patch greatly reduces one of biggest memory waste in the driver. The firmware headers provides the right values for extra head-/tailroom and mtu size which are usually much lower than the old hardcoded ones. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: redo queue numberingChr2008-08-291-1/+1
| | | | | | | | | The firmware supports 8 different queues and not only 4. So, let's make some room for further tasks (ap/adhoc support) in this area. Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: rename prism54xyz -> p54xyzChristian Lamparter2008-08-221-3/+3
| | | | | | | | | | | It's been a long time, but fullmac prism54 driver is still around... I think we should rename every prism54* in order to avoid some confusion about "what is actually what" in the future ;-). Thanks-to: Maxi <maxi@daemonizer.de> Signed-off-by: Christian Lamparter <chunkeey@web.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: Fix for TX sequence number problemLarry Finger2008-08-071-0/+1
| | | | | | | | | | | | | | Following "mac80211: fix TX sequence numbers", if a packet has the IEEE80211_TX_CTL_ASSIGN_SEQ assigned, a sequence number must be supplied, either by hardware or software. AFAIK, no such hardware exists for the p54, thus it must be done in software. With this patch, a connection qith p54usb is stable, whereas the interface went off-line in 2-3 hours without this change. Note that this code will have to be reworked for proper sequence numbers on beacons. In addition, the sequence number has been placed in the hardware state, not the vif state. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* p54: Fix potential concurrent access to private dataLarry Finger2008-08-041-0/+1
| | | | | | | | | | Experience with the rtl8187 driver has shown that mac80211 can make calls to the config callback routine in rapid succession. This patch creates a mutex that protects the private data in several of the routines called by mac80211. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud