summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-rx.c
Commit message (Collapse)AuthorAgeFilesLines
* iwlwifi: use iwl_hwrate_get_mac80211_idx where appropriateDaniel C Halperin2009-08-311-5/+4Star
| | | | | | | | | | | | | | | | For HT packets, mac80211 expects the rate_idx to be an MCS number, which is the lower byte of rate_n_flags. However, iwl_hwrate_to_plcp_idx takes the MCS number and reduces it down to the range 0-8 (6 to 60 Mbps), removing the bits that signify multiply streams, HT40 Duplicate mode, or unequal modulation. This version is used for various internal purposes through the driver. Add the function iwl_hwrate_get_mac80211_idx, an alternate version which takes the rate and the band and returns the mac80211 index (MCS, for HT packets, and PLCP rate, for legacy packets). Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: set HT flags in ieee80211_rx_status for received packetsDaniel C Halperin2009-08-281-0/+10
| | | | | | | | | | Add code to set the HT flags (HT, 40 MHz, Short guard interval) in the ieee80211_rx_status field passed to mac80211. This ensures that mac80211 processes these HT packets correctly. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix erroneous use of iwl_rx_packet.len as a lengthDaniel C Halperin2009-08-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The field called 'len' in struct iwl_rx_packet is in fact not just a length field but also includes some flags from the flow handler. In several places throughout the driver, this causes incorrect values to be interpreted as lengths when the field is improperly masked. In most situations the improper use is for debugging output, and simply results in an erroneous message, such as: [551933.070224] ieee80211 phy0: I iwl_rx_statistics Statistics notification received (480 vs -1367342620). which should read '(480 vs 484)'. In at least one case this could case bad things to happen: void iwl_rx_pm_debug_statistics_notif(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) { struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled " "notification for %s:\n", le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, le32_to_cpu(pkt->len) ); } EXPORT_SYMBOL(iwl_rx_pm_debug_statistics_notif); Given the rampant misuse of this field without proper masking throughout the driver (every use but one), this patch renames the field from 'len' to 'len_n_flags' to reduce confusion. It also adds the proper masking when this field is used as a length value. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: refactor packet reception codeDaniel C Halperin2009-08-201-127/+77Star
| | | | | | | | | | | | | | | | | | This patch fixes a number of issues in iwl_rx_reply_rx and iwl_pass_packet_to_mac80211. These issues stem from the complexities of managing two different types of packet commands for different hardware. - Unify code handling rx_phy_res in SKB or cached to eliminate redundancy and remove potential NULL pointer accesses - Replace magic number with proper constant - Optimize functions by moving early exit conditions before computation - Comment code and improve some variable names - Remove redundant computation in iwl_pass_packet_to_mac80211 by passing in the correct, already-computed arguments. Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: Traffic type and counter for debugFsWey-Yi Guy2009-08-141-9/+1Star
| | | | | | | | | | | Break down the traffic type and counter for both Tx and Rx. Enhance the tx_statistics and rx_statistics debugfs function and move to /sys/kernel/debug/ieee80211/phy0/iwlagn/debug directory to help better debugging both driver and uCode related problems. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: new debugging feature for dumping data trafficWey-Yi Guy2009-08-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The traffic buffer will only beallocated and used if either bit 23 (IWL_DX_TX) or bit 24 (IWL_DL_RX) of "debug" is set; example: "debug=0x800000" - log tx data traffic "debug=0x1000000" - log rx data traffic "debug=0x1800000" - log both tx and rx traffic The traffic log will store the beginning portion (64 bytes) of the latest 256 of tx and rx packets in the round-robbin buffer for debugging, user can examine the log through debugfs file. How to display the current logged tx/rx traffic and txfifo and rxfifo read/write point: "cat traffic_log" in /sys/kernel/debug/ieee80211/phy0/iwlagn/debug directory By echo "0" to traffic_log file will empty the traffic log buffer and reset both tx and rx taffic log index to 0. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: name changed from "fat" to "ht40"Wey-Yi Guy2009-08-141-2/+2
| | | | | | | | | Rename "fat" to "ht40" The term "fat channel" is deprecated in favor of "HT40" Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: re-introduce per device debuggingReinette Chatre2009-08-141-3/+3
| | | | | | | | | | | | | | | | | | | | Commit "iwlwifi: make debug level more user friendly" cleaned up the debug level handling. In doing so it created a single global debug level for all devices. Some setups do consits of more that one iwlwifi device and in these setups there is a requirement that debug levels should be unique per device. We now re-introduce the per device debugging while maintaining the cleanup effort of the previous patch. The maintain the global debug level and now introduce a per-device debug level that will be used if it (the per-device debug level) is set. The per-device debug level can be controlled via the debug_level sysfs file while the global debug level is controlled by the debug module parameter. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: don't export symbols not needed in other modulesJohannes Berg2009-08-041-1/+0Star
| | | | | | | | | Even with the split into iwlcore/agn/3945 not all symbols that cross file boundaries are needed in other modules, a few are only used within iwlcore, for example. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: make debug level more user friendlyReinette Chatre2009-07-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Deprecate the "debug50" module parameter used to obtain 5000 series and up debugging. Replace it with "debug" module parameter to match with original driver and be consistent between them. The "debug50" module parameter can still be used, except that the module parameter is not writable in keeping with its previous state. We currently just mark it as "deprecated" and do not have it in the feature-removal-schedule. Some more cleanup of module parameters needs to be done and can then be entered together. * Only make "debug" module parameters visible if the driver is compiled with CONFIG_IWLWIFI_DEBUG. This will eliminate a lot of confusion where users think they have set debug flags but yet cannot see any debug output. * Make module parameters writable. This eliminates the need for the "debug_level" sysfs file, which can now also be deprecated and added to feature-removal-schedule. This file is in significant use though with many iwlwifi documents and text referring users to it. We can thus not take its removal lightly and keep it around. With iwlcore shared between iwlagn and iwl3945 we really do not need debug module parameters for each but can instead have one debug module parameter for the iwlcore module. The same issue is here as with the sysfs file - a lot of iwlwifi documentation and text (like bug reports) rely on iwlagn and iwl3945 having this module parameter, so changing this to a module parameter of iwlcore will have significant impact and we do not do this for that reason. One consequence of this patch is that if a user is running a system with both 3945 and later hardware then the setting of the one module parameter will affect the value of the other. The likelihood of this seems low - and even if this setup is present it does not seem like an issue for both modules to run with the same debug level. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix rx signal quality reporting in dmesgWey-Yi Guy2009-07-241-1/+1
| | | | | | | | Fix quality incorrectly reported as signal strength value. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: drop sw_crypto from hw_params.Tomas Winkler2009-07-101-1/+1
| | | | | | | | | Each HW supported by iwlwifi is capable of hardware crypto so drop this flag from hw_params structure. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: push rx status into skb->cbJohannes Berg2009-07-101-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 <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlcore: Set rb_timeout to 0x10 for devices with ICTMohamed Abbas2009-05-221-1/+4
| | | | | | | | | | rb value should be 0x10 for devices using ICT. RX interrupt was not performing well with 0 value Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlcore: Allow skb allocation from tasklet.Mohamed Abbas2009-05-221-6/+19
| | | | | | | | | | If RX queue becomes empty then we need to restock the queue from tasklet to prevent ucode from starving. A caller to iwl_rx_allocate will decide if allocated buffer should come from GFP_ATOMIC or GFP_KERNEL. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlcore: register locksMohamed Abbas2009-05-221-31/+0Star
| | | | | | | | | | | | | | | Add new lock to be used when accessing some registers. Also move the register lock and iwl_grab_nic_access inside the function for register access. This will prevent from forgetting to hold locks and nic access in the right way and make code easier to maintain. We over use the priv->lock spin lock and I guess we need to add new one for Tx queue after that we might need to change most of these lock to BH and just keep priv->lock as irq type. Signed-off-by: Mohamed Abbas <mohamed.abbas@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: Temperature sensor voltage reading for 5150Wey-Yi Guy2009-05-221-2/+2
| | | | | | | | | | | | | | | | | The temperature measurement by uCode for 5150 and 5000 are different CSR_HW_REV_TYPE_5150: temperature sensor output voltage CSR_HW_REV_TYPE_5000: temperature in Celsius temperature related operation for 5150 is measured by temperature sensor output voltage; additional conversion is required for set and store the temperature. To make sure support different HW design; implement _ops method for temperature related functions (temperature reading and set ct kill threshold) Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor modeWey-Yi Guy2009-04-221-7/+0Star
| | | | | | | | | | | | | | | This patch clean up the code for NL80211_IFTYPE_MONITOR mode, priv->iw_mode is set in add_interface, but add_interface is never called for monitor mode. The only way mac80211 informs us about monitor mode is through configuring filter; since iw_mode will never set to NL80211_IFTYPE_MONITOR, modify and remove all the code refer to NL80211_IFTYPE_MONITOR and replace with iwl_is_monitor_mode() function call. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: don't use implicit priv in IWL_DEBUGTomas Winkler2009-02-091-14/+14
| | | | | | | | | Call IWL_DEBUG macro with explicit priv argument. Signed-off-by: Tomas Winkler <tomas.winkler@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>
* iwl3945: Getting rid of the *39_rxon iwl_priv fieldsSamuel Ortiz2009-02-091-4/+5
| | | | | | | | | | | | | | | | The iwl_rxon_cmd is really just a iwl3945_rxon_cmd structure extension. So, we can use the *_rxon fields from iwl_priv instead of the 3945 specific ones (*39_rxon). We have to then be careful when submitting REPLY_RXON host commands, since the command length as to be set according to the HW. As another precaution the reserved4 and reserved5 fields are cleared before being sent to the 3945. With the *39_rxon removal, a lot of duplicated code can be removed from the 3945 code base. Signed-off-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>
* iwlwifi: update copyright year to 2009Reinette Chatre2009-01-291-1/+1
| | | | | Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: kill iwl3945_rx_queue_restockWinkler, Tomas2009-01-291-7/+7
| | | | | | | | | This patch kills iwl3945_rx_queue_restock function on prise of new hw_params.rx_wrt_ptr_reg which holds per NIC RX write pointer register. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: replace IWL_ERROR with IWL_ERRWinkler, Tomas2009-01-291-2/+2
| | | | | | | | IWL_ERR doesn't use hidden priv pointer. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: clean up printingTomas Winkler2009-01-291-2/+1Star
| | | | | | | | | | Use IWL_ macros where possible to unify debug output usage. Define new unconditional printouts IWL_ERR, IWL_WARN, IWL_INFO, and IWL_CRIT which don't use hidden priv pointer. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwl3945: Remove DRV_NAME dependeniesSamuel Ortiz2009-01-291-2/+2
| | | | | | | | | | | | | As DRV_NAME is defined in 2 different header files, including both is not possible. This patch defines this constant from iwl3945-base.c and iwl-agn.c. It also redefines the IWL_ERROR and IWL_WARNING macros to use dev_printk, as the IWL_DEBUG_* macros do. Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com> Acked-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: use GFP_KERNEL to allocate Rx SKB memoryZhu Yi2008-12-191-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we allocate Rx SKB with GFP_ATOMIC flag. This is because we need to hold a spinlock to protect the two rx_used and rx_free lists operation in the rxq. spin_lock(); ... element = rxq->rx_used.next; element->skb = alloc_skb(..., GFP_ATOMIC); list_del(element); list_add_tail(&element->list, &rxq->rx_free); ... spin_unlock(); After spliting the rx_used delete and rx_free insert into two operations, we don't require the skb allocation in an atomic context any more (the function itself is scheduled in a workqueue). spin_lock(); ... element = rxq->rx_used.next; list_del(element); ... spin_unlock(); ... element->skb = alloc_skb(..., GFP_KERNEL); ... spin_lock() ... list_add_tail(&element->list, &rxq->rx_free); ... spin_unlock(); This patch should fix the "iwlagn: Can not allocate SKB buffers" warning we see recently. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Acked-by: Tomas Winkler <tomas.winkler@intel.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove 4965 from common uCode API structuresTomas Winkler2008-12-121-1/+1
| | | | | | | | | | This patch removes 4965 from common uCode API structures. Also updates iwlagn commands with 3945 specific RX command in preparation for 3945 port. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix build warning (iwl-rx.c)Rami Rosen2008-12-121-6/+0Star
| | | | | | | | | | | | This patch fixes the following build warning when CONFIG_IWLWIFI_DEBUG is not set. /work/src/wireless-testing/drivers/net/wireless/iwlwifi/iwl-rx.c:758: warning: 'iwl_dbg_report_frame' defined but not used Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlifi: remove twice defined SINGLE_FRAME RX FH MASKWinkler, Tomas2008-12-121-1/+1
| | | | | | | | | | | This patch removes second definition of FH_RCSR_CHNL0_RX_CONFIG_SINGLE_FRAME in iwl-fh.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reported-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: change email contact informationWinkler, Tomas2008-12-121-1/+1
| | | | | | | | | | This patch replaces personal emails with hopefully always valid Intel Linux Wireless, which will be routed to a current maintainer Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix build error (iwl-rx.c).Rami Rosen2008-12-121-1/+2
| | | | | | | | | | This patch adds #ifdef CONFIG_IWLWIFI_DEBUG in iwl_rx_reply_rx() method in iwlwifi/iwl-rx.c) to avoid build error caused by "iwlwifi: implement iwl_debug_report_frame for iwlagn". Signed-off-by: Rami Rosen <ramirose@gmail.com> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: iwl_poll_{direct_}bit cleanupZhu, Yi2008-12-121-4/+2Star
| | | | | | | | | | The patch merges implementation of iwl_poll_bit() and iwl_poll_direct_bit() by letting the latter be a special case of the former. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: implement iwl_debug_report_frame for iwlagnHalperin, Daniel C2008-12-121-54/+31Star
| | | | | | | | | | | The old version of this code was copied from 3945 and never updated. This patch cleans up structs that do not apply and accounts for other changes from 3945->iwlagn (e.g., PHY info can come in a separate cmd response from the ucode.) Signed-off-by: Daniel Halperin <daniel.c.halperin@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: consolidate station management codeTomas Winkler2008-11-251-75/+0Star
| | | | | | | | | | | This patch moves code around and group most of the station management code into iwl-sta.c No functional changes (yet) Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: use Rx single frame mode (one Rx frame per RB)Zhu, Yi2008-11-211-2/+2
| | | | | | | | | | | | The RCSR default value for single frame mode is off (a RB contains more than one frames). But the driver assumes single frame mode apparently. This patch enables single frame mode for the hardware. It also adds a BUG_ON to make sure the allocated skb satisfies the hardware alignment requirement and removes a useless check. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move rx queue read pointer into rxqWinkler, Tomas2008-11-211-2/+16
| | | | | | | | | | | This patch moves rx status/read registers into iwl_rx_queue structures. This solution is more memory hungry but is more structured and provides needed RX/TX separation Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-11-211-9/+17
|\ | | | | | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/ixgbe/ixgbe_main.c include/net/mac80211.h net/phonet/af_phonet.c
| * iwlagn: fix RX skb alignmentJohannes Berg2008-11-181-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So I dug deeper into the DMA problems I had with iwlagn and a kind soul helped me in that he said something about pci-e alignment and mentioned the iwl_rx_allocate function to check for crossing 4KB boundaries. Since there's 8KB A-MPDU support, crossing 4k boundaries didn't seem like something the device would fail with, but when I looked into the function for a minute anyway I stumbled over this little gem: BUG_ON(rxb->dma_addr & (~DMA_BIT_MASK(36) & 0xff)); Clearly, that is a totally bogus check, one would hope the compiler removes it entirely. (Think about it) After fixing it, I obviously ran into it, nothing guarantees the alignment the way you want it, because of the way skbs and their headroom are allocated. I won't explain that here nor double-check that I'm right, that goes beyond what most of the CC'ed people care about. So then I came up with the patch below, and so far my system has survived minutes with 64K pages, when it would previously fail in seconds. And I haven't seen a single instance of the TX bug either. But when you see the patch it'll be pretty obvious to you why. This should fix the following reported kernel bugs: http://bugzilla.kernel.org/show_bug.cgi?id=11596 http://bugzilla.kernel.org/show_bug.cgi?id=11393 http://bugzilla.kernel.org/show_bug.cgi?id=11983 I haven't checked if there are any elsewhere, but I suppose RHBZ will have a few instances too... I'd like to ask anyone who is CC'ed (those are people I know ran into the bug) to try this patch. I am convinced that this patch is correct in spirit, but I haven't understood why, for example, there are so many unmap calls. I'm not entirely convinced that this is the only bug leading to the TX reply errors. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: run through spell checkerTomas Winkler2008-11-011-4/+4
|/ | | | | | Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: refactor rx register initializationWinkler, Tomas2008-09-301-11/+19
| | | | | | | | | | The patch adds HW bug W/A FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY so that we can enable again interrupt coalescing. It also uses named constants for open code. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: use nl80211 interface typesJohannes Berg2008-09-151-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 <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵David S. Miller2008-09-091-1/+4
|\ | | | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: net/mac80211/mlme.c
| * iwlwifi: W/A for the TSF correction in IBSSAssaf Krauss2008-09-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a W/A for the TSF sync issue in IBSS merging. HW is not capable to sync TSF (it's constantly little behind). This creates constant IBSS merging upon reception of each beacon, adding and removing station which in turn creates above 50% packet loss and thus dramatically degrade the throughput. The W/A simply stops the driver from declaring it has a reliable TSF value and thus eliminates IBSS merging. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlwifi: use generic mac80211 radiotap headersBruno Randolf2008-08-221-105/+20Star
|/ | | | | | | | | | remove drivers own implementation of radiotap in favor of the generic one provided by mac80211. also remove priv->add_radiotap because it is not used any more. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: implement iwl5000_calc_rssiTomas Winkler2008-08-041-43/+16Star
| | | | | | | This patch implements rssi calculation for 5000 HW. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwif: remove compilation warnings iwl_add_radiotapTomas Winkler2008-07-141-20/+17Star
| | | | | | | Use directly put_unaligned_leX instead of put_unaligned(cpu_to_leX Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: fix iwl4965 temperature callback calibration issueZhu Yi2008-07-021-2/+9
| | | | | | | | | | The patch fixes the temperature calibration issue introduced by the patch "iwlwifi: move RX stats to core, and move temperature to handler". It also remove the second parameter "stats" since it is already copied to priv->statistics. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: adjust TSF in IBSSAssaf Krauss2008-06-301-1/+1
| | | | | | | | | | | | This patch makes the driver, in IBSS mode, comply with TSF requirements in 2 ways: 1. It notifies mac80211 of its TSF timestamp. 2. It uses the given timestamp in the beacon template to update the ucode. Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: move rx aggregation functions to iwl-rx.cRon Rindjunsky2008-06-301-0/+43
| | | | | | | | | This patch moves Rx aggregation functions into iwl-rx.c Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* iwlwifi: remove useless network and duplicate checkingEmmanuel Grumbach2008-06-301-135/+13Star
| | | | | | | | | | | | | | | | | | | The iwlwifi drivers go to great lengths to avoid passing packets to mac80211 they think shouldn't go there, while mac80211 can (of course!) handle them very well. Especially in the case of duplicate packets this is interesting because it's such a performance hog (especially for IBSS networks) while mac80211 does that work on the side without much effort. This patch removes all that and leaves only what is absolutely necessary for the hardware. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>