aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi (follow)
AgeCommit message (Collapse)AuthorFilesLines
2010-06-14iwlwifi: print warning about disconnected antennasJohannes Berg1-0/+7
When we detect that not all antennas are properly connected, we simply disable the associated chains, but never notify the user at all. Print out a warning so it is obvious that happened and we know where to start looking for related issues. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: rename iwl4965_rx_mpdu_res_startEmmanuel Grumbach2-3/+3
iwl4965_rx_mpdu_res_start is not 4695 specific, so rename it to more general name iwl_rx_mpdu_res_start. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: rename rxq->dma_addrEmmanuel Grumbach5-8/+8
Rename rxq->dma_addr to rxq->bd_dma to better emphasize that the physical address stands for the receive buffer descriptor's address. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: cancel run time calibration work when going downWey-Yi Guy1-0/+1
Cancel scheduled run time calibration work when interface is going down. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: Fix null pointer referencing in iwl_dbgfs_rx_queue_read.Dor Shaish1-1/+6
Test for null pointer prior to access. Print "Not Allocated" if null pointer. Signed-off-by: Dor Shaish <dor.shaish@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-14iwlwifi: trace full RXJohannes Berg2-4/+10
The length contained in the status word doesn't include the status word's length itself, so we need to account for that for tracing. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-07Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6John W. Linville6-190/+256
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h
2010-06-07iwlwifi: fix-up botched revertJohn W. Linville1-1/+1
In the revert of "iwlwifi: move _agn statistics related structure", I need to use CONFIG_IWLWIFI_DEBUGFS instead of CONFIG_IWLWIFI_DEBUG in the private structure definition. Without this patch, it is possible to get this: drivers/net/wireless/iwlwifi/iwl-rx.c: In function 'iwl_accumulative_statistics': drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named 'delta_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named 'max_delta' drivers/net/wireless/iwlwifi/iwl-rx.c:321: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:323: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:325: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:327: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:329: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:331: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c: In function 'iwl_reply_statistics': drivers/net/wireless/iwlwifi/iwl-rx.c:484: error: 'struct iwl_priv' has no member named 'accum_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:486: error: 'struct iwl_priv' has no member named 'delta_statistics' drivers/net/wireless/iwlwifi/iwl-rx.c:488: error: 'struct iwl_priv' has no member named 'max_delta' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-05iwlwifi: fix wrapping when handling aggregated batchesDaniel Halperin1-6/+45
Fairly complex code in iwlagn_tx_status_reply_tx handle the status reports for aggregated packet batches sent by the NIC. This code aims to handle the case where the NIC retransmits failed packets from a previous batch; the status information for these packets can sometimes be inserted in the middle of a batch and are actually not in order by sequence number! (I verified this can happen with printk's in the function.) The code in question adaptively identifies the "first" frame of the batch, taking into account that it may not be the one corresponding to the first agg status report, and also handles the case when the set of sent packets wraps the 256-character entry buffer. It generates the agg->bitmap field of sent packets which is later compared to the BlockAck response from the receiver to see which frames of those sent in this batch were ACKed. A small logic error (wrapping by 0xff==255 instead of 0x100==256) was causing the agg->bitmap to be set incorrectly. Fix this wrapping code, and add extensive comments to clarify what is going on. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: parse block ack responses correctlyDaniel Halperin1-5/+8
Compressed BlockAck frames store the ACKs/NACKs in a 64-bit bitmap that starts at the sequence number of the first frame sent in the aggregated batch. Note that this is a selective ACKnowledgement following selective retransmission; e.g., if frames 1,4-5 in a batch are ACKed then the next transmission will include frames 2-3,6-10 (7 frames). In this latter case, the Compressed BlockAck will not have all meaningful information in the low order bits -- the semantically meaningful bits of the BA will be 0x1f3 (where the low-order frame is seq 2). The driver code originally just looked at the lower (in this case, 7) bits of the BlockAck. In this case, the lower 7 bits of 0x1f3 => only 5 packets, maximum, could ever be ACKed. In reality it should be looking at all of the bits, filtered by those corresponding to packets that were actually sent. This flaw meant that the number of correctly ACked packets could be significantly underreported and might result in asynchronous state between TX and RX sides as well as driver and uCode. Fix this and also add a shortcut that doesn't require the code to loop through all 64 bits of the bitmap but rather stops when no higher packets are ACKed. In my experiments this fix greatly reduces throughput swing, making throughput stable and high. It is also likely related to some of the stalls observed in aggregation mode and maybe some of the buffer underruns observed, e.g., http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1968 http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2098 http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2018 Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove unused parameterWey-Yi Guy1-1/+0
framecnt_to_us is not used, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: queue user-initiated scan when doing internal scanJohannes Berg3-11/+31
The internal scanning created a problem where when userspace tries to scan, the scan gets rejected. Instead of doing that, queue up the user-initiated scan when doing an internal scan. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: generic scan TX antenna forcingJohannes Berg6-11/+19
In "iwlwifi: make scan antenna forcing more generic" I introduced generic scan RX antenna forcing, which here I rename to make it more evident. Also add scan TX antenna forcing, since I will need that as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: do not use huge command buffer for channel switchWey-Yi Guy2-2/+2
Channel switch host command do not need to allocate huge command buffer since its size is already included in the iwl_device_cmd structure. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: reduce memory allocationJohannes Berg7-34/+35
Currently, the driver allocates up to 19 skb pointers for each TFD, of which we have 256 per queue. This means that for each TX queue, we allocate 19k/38k (an order 4 or 5 allocation on 32/64 bit respectively) just for each queue's "txb" array, which contains only the SKB pointers. However, due to the way we use these pointers only the first one can ever be assigned. When the driver was initially written, the idea was that it could be passed multiple SKBs for each TFD and attach all those to implement gather DMA. However, due to constraints in the userspace API and lack of TCP/IP level checksumming in the device, this is in fact not possible. And even if it were, the SKBs would be chained, and we wouldn't need to keep pointers to each anyway. Change this to only keep track of one SKB per TFD, and thereby reduce memory consumption to just one pointer per TFD, which is an order 0 allocation per transmit queue. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: kzalloc txb arrayJohannes Berg1-1/+1
When we allocate queues, we currently don't use kzalloc() right now. When we then free those queues again without having used all entries, we may end up trying to free random pointers found in the txb array since it was never initialised. This fixes it simply by using kzalloc(). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlagn: fix bug in txq freeingJohannes Berg1-2/+9
The iwl_hw_txq_free_tfd() function can be called from contexts with IRQs disabled, so it must not call dev_kfree_skb() but rather dev_kfree_skb_any() instead. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwl3945: fix bugs in txq freeingJohannes Berg1-6/+8
When we free a txq that had no txb array allocated, we still try to access it. Fix that, and also free all SKBs that may be in the txb array (although it can just be a single one). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove inaccurate commentWey-Yi Guy1-1/+1
REPLY_REMOVE_STA command is used Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove priv->mac_addrJohannes Berg2-5/+2
This variable is now no longer used, so it can be removed completely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: beacon internal time unitWey-Yi Guy1-2/+2
use TIME_UNIT define for beacon internal calculation Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: support channel switch offload in driverWey-Yi Guy6-51/+257
Support channel switch in driver as a separated mac80211 callback function instead of part of mac_config callback; by moving to this approach, uCode can have more control of channel switch timing. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: beacon format related helper functionWey-Yi Guy10-53/+113
Move the ucode beacon formation related helper function from 3945 to iwlcore, so both _3945 and _agn devices can utilize those functions. When driver pass the beacon related timing information to uCode in both spectrum measurement and channel switch commands, the beacon timing parameter require in uCode beacon format; those helper functions will do the conversation from uSec to the correct uCode format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove unused parameter in iwl_privWey-Yi Guy3-7/+0
restrict_refcnt is no longer used, remove it from iwl_priv structure Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: do not clear data after chain noise calibShanyu Zhao2-18/+23
Chain noise calibration data are cleared after the calibration is done in iwlagn_gain_computation() and iwl4965_gain_computation(). This cause the debugfs entries for those data useless. To provide valid debugging info, clear those data right before starting the calibration instead. Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove debug frame dumpingJohannes Berg2-285/+0
This can now be much better achieved using tracing and post-processing of the trace, rather than doing the processing in place in the driver, so remove a lot of code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: use virtual interface address for scanJohannes Berg4-5/+9
For probe request frames sent during scan, we should use the virtual interface's mac address that the scan was initiated on to avoid issues when the wrong address is used. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: set MAC address in RXON from interfaceJohannes Berg1-1/+4
When we do not have an interface, priv->mac_addr is all zeroes, so the memcpy() is not useful as the RXON buffer has been cleared previously. Therefore, use the interface's address that we are setting up the RXON for, if available. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove mac_addr assignmentJohannes Berg2-6/+6
priv->mac_addr is the address of the operating interface, not the permanent MAC address. They are usually the same, but the user can override the operating address, so we shouldn't set the variable to the permanent one, it is assigned when an interface is added. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove unused wlap_bssid_addr assignmentJohannes Berg1-1/+0
There's no microcode that actually uses this variable, and it is reserved for functionality that the driver doesn't support anyway, so we shouldn't be setting it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: remove useless node_addr assignmentsJohannes Berg2-4/+0
iwl_connection_init_rx_config() will already have set up the entire RXON command, so these assignments are duplicate. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwlwifi: move sysfs_create_group to post request firmwareEmmanuel Grumbach1-159/+159
Move the sysfs_create_group to iwl_ucode_callback after we have safely got the firmware. The motivation to do this comes from a warning from lockdep which detected that we request priv->mutex while holding s_active during a sysfs request (show_statistics in the example copy pasted). The reverse order exists upon request_firmware: request_firmware which is a sysfs operation that requires s_active is run under priv->mutex. This ensures that we don't get sysfs request before we finish to request the firmware, avoiding this deadlock. ======================================================= [ INFO: possible circular locking dependency detected ] ------------------------------------------------------- cat/2595 is trying to acquire lock: (&priv->mutex){+.+.+.}, at: [<facfa598>] show_statistics+0x48/0x100 [iwlagn] but task is already holding lock: (s_active){++++.+}, at: [<c0580ebd>] sysfs_get_active_two+0x1d/0x50 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (s_active){++++.+}: [<c0489b74>] __lock_acquire+0xc44/0x1230 [<c048a1ed>] lock_acquire+0x8d/0x110 [<c0581499>] sysfs_addrm_finish+0xe9/0x180 [<c057f64a>] sysfs_hash_and_remove+0x4a/0x80 [<c05829d4>] sysfs_remove_group+0x44/0xd0 [<c0714b75>] dpm_sysfs_remove+0x15/0x20 [<c070dac8>] device_del+0x38/0x170 [<c070dc1e>] device_unregister+0x1e/0x60 [<c071838d>] _request_firmware+0x29d/0x550 [<c07186c7>] request_firmware+0x17/0x20 [<fad01bf1>] iwl_mac_start+0xb1/0x1230 [iwlagn] [<fa46ba06>] ieee80211_open+0x436/0x6f0 [mac80211] [<c0808cd2>] dev_open+0x92/0xf0 [<c0808b2b>] dev_change_flags+0x7b/0x190 [<c08148e8>] do_setlink+0x178/0x3b0 [<c0815169>] rtnl_setlink+0xf9/0x130 [<c081453b>] rtnetlink_rcv_msg+0x1bb/0x1f0 [<c0827ce6>] netlink_rcv_skb+0x86/0xa0 [<c081436c>] rtnetlink_rcv+0x1c/0x30 [<c08279c3>] netlink_unicast+0x263/0x290 [<c0828768>] netlink_sendmsg+0x1c8/0x2a0 [<c07f85fd>] sock_sendmsg+0xcd/0x100 [<c07f964d>] sys_sendmsg+0x15d/0x290 [<c07f9e6b>] sys_socketcall+0xeb/0x2a0 [<c040ad9f>] sysenter_do_call+0x12/0x38 -> #0 (&priv->mutex){+.+.+.}: [<c0489f84>] __lock_acquire+0x1054/0x1230 [<c048a1ed>] lock_acquire+0x8d/0x110 [<c08bb358>] __mutex_lock_common+0x58/0x470 [<c08bb84a>] mutex_lock_nested+0x3a/0x50 [<facfa598>] show_statistics+0x48/0x100 [iwlagn] [<c070d219>] dev_attr_show+0x29/0x50 [<c057fecd>] sysfs_read_file+0xdd/0x190 [<c052880f>] vfs_read+0x9f/0x190 [<c0528d22>] sys_read+0x42/0x70 [<c040ad9f>] sysenter_do_call+0x12/0x38 other info that might help us debug this: 3 locks held by cat/2595: #0: (&buffer->mutex){+.+.+.}, at: [<c057fe25>] sysfs_read_file+0x35/0x190 #1: (s_active){++++.+}, at: [<c0580ecd>] sysfs_get_active_two+0x2d/0x50 #2: (s_active){++++.+}, at: [<c0580ebd>] sysfs_get_active_two+0x1d/0x50 stack backtrace: Pid: 2595, comm: cat Not tainted 2.6.33-tp-rc4 #2 Call Trace: [<c08b99ab>] ? printk+0x1d/0x22 [<c0487752>] print_circular_bug+0xc2/0xd0 [<c0489f84>] __lock_acquire+0x1054/0x1230 [<c0478d81>] ? sched_clock_cpu+0x121/0x180 [<c048a1ed>] lock_acquire+0x8d/0x110 [<facfa598>] ? show_statistics+0x48/0x100 [iwlagn] [<c08bb358>] __mutex_lock_common+0x58/0x470 [<facfa598>] ? show_statistics+0x48/0x100 [iwlagn] [<c08bb84a>] mutex_lock_nested+0x3a/0x50 [<facfa598>] ? show_statistics+0x48/0x100 [iwlagn] [<facfa598>] show_statistics+0x48/0x100 [iwlagn] [<c0580cf9>] ? sysfs_get_active+0x69/0xb0 [<facfa550>] ? show_statistics+0x0/0x100 [iwlagn] [<c070d219>] dev_attr_show+0x29/0x50 [<c057fecd>] sysfs_read_file+0xdd/0x190 [<c05ff314>] ? security_file_permission+0x14/0x20 [<c0528242>] ? rw_verify_area+0x62/0xd0 [<c052880f>] vfs_read+0x9f/0x190 [<c047745b>] ? up_read+0x1b/0x30 [<c057fdf0>] ? sysfs_read_file+0x0/0x190 [<c04af3b4>] ? audit_syscall_entry+0x1f4/0x220 [<c0528d22>] sys_read+0x42/0x70 [<c040ad9f>] sysenter_do_call+0x12/0x38 Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwl3945: fix internal scanAbhijeet Kolekar4-31/+96
Port of internal scan to iwl3945 missed introduction of iwl3945_get_single_channel_for_scan. Fix the following bug by introducing the iwl3945_get_single_channel_for_scan http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2208 Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-05iwl3945: enable stuck queue detection on 3945Reinette Chatre1-0/+1
We learn from http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=1834 and https://bugzilla.redhat.com/show_bug.cgi?id=589777 that 3945 can also suffer from a stuck command queue. Enable stuck queue detection for iwl3945 to enable recovery in this case. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-06-04iwlwifi: use the DMA state API instead of the pci equivalentsFUJITA Tomonori6-18/+18
This can be cleanly applied to wireless-2.6 and iwlwifi git trees. = From: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Subject: [PATCH] iwlwifi: use the DMA state API instead of the pci equivalents This replace the PCI DMA state API (include/linux/pci-dma.h) with the DMA equivalents since the PCI DMA state API will be obsolete. No functional change. For further information about the background: http://marc.info/?l=linux-netdev&m=127037540020276&w=2 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-03mac80211: clean up ieee80211_stop_tx_ba_sessionJohannes Berg1-2/+1
There's no sense in letting anything but internal mac80211 functions set the initiator to anything but WLAN_BACK_INITIATOR, since WLAN_BACK_RECIPIENT is only valid when we have received a frame from the peer, which we react to directly in mac80211. The debugfs code I recently added got this wrong as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-03mac80211: remove tx status ampdu_ack_mapJohannes Berg1-1/+0
There's a single use of this struct member, but as it is write-only it clearly not necessary. Thus we can free up some space here, even if we don't need it right now it seems pointless to carry around the variable. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-03Revert "iwlwifi: move _agn statistics related structure"John W. Linville7-84/+82
This reverts commit a2064b7a4a22d118087898e4308670da7ac07911. when CONFIG_IWLAGN=n: drivers/net/wireless/iwlwifi/iwl-rx.c:254: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:303: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:304: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:305: error: 'struct iwl_priv' has no member named '_agn' drivers/net/wireless/iwlwifi/iwl-rx.c:306: error: 'struct iwl_priv' has no member named '_agn' and many more. Conflicts: drivers/net/wireless/iwlwifi/iwl-agn-debugfs.c drivers/net/wireless/iwlwifi/iwl-debugfs.c drivers/net/wireless/iwlwifi/iwl-dev.h drivers/net/wireless/iwlwifi/iwl-rx.c Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-02drivers/net/wireless: Storage class should be before const qualifierTobias Klauser1-2/+2
The C99 specification states in section 6.11.5: The placement of a storage-class specifier other than at the beginning of the declaration specifiers in a declaration is an obsolescent feature. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Acked-by: Reinette Chatre <reinette.chatre@intel.com> Acked-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-06-02Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6John W. Linville24-458/+916
2010-05-24iwlwifi: testing the wrong variable in iwl_add_bssid_station()Dan Carpenter1-1/+1
The intent here is to test that "sta_id_r" is a valid pointer. We do this same test later on in the function. Btw iwl_add_bssid_station() is called from two places and "sta_id_r" is a valid pointer from both callers. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-24wireless: update gfp/slab.h includesTejun Heo1-0/+1
Implicit slab.h inclusion via percpu.h is about to go away. Make sure gfp.h or slab.h is included as necessary. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-21iwlwifi: fix internal scan raceReinette Chatre1-3/+18
It is possible for internal scan to race against itself if the device is not returning the scan results from first requests. What happens in this case is the cleanup done during the abort of the first internal scan also cleans up part of the new scan, causing it to access memory it shouldn't. Here are details: * First internal scan is triggered and scan command sent to device. * After seven seconds there is no scan results so the watchdog timer triggers a scan abort. * The scan abort succeeds and a SCAN_COMPLETE_NOTIFICATION is received for failed scan. * During processing of SCAN_COMPLETE_NOTIFICATION we clear STATUS_SCANNING and queue the "scan_completed" work. ** At this time, since the problem that caused the internal scan in first place is still present, a new internal scan is triggered. The behavior at this point is a bit different between 2.6.34 and 2.6.35 since 2.6.35 has a lot of this synchronized. The rest of the race description will thus be generalized. ** As part of preparing for the scan "is_internal_short_scan" is set to true. * At this point the completion work for fist scan is run. As part of this there is some locking missing around the "is_internal_short_scan" variable and it is set to "false". ** Now the second scan runs and it considers itself a real (not internal0 scan and thus causes problems with wrong memory being accessed. The fix is twofold. * Since "is_internal_short_scan" should be protected by mutex, fix this in scan completion work so that changes to it can be serialized. * Do not queue a new internal scan if one is in progress. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=15824 Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-05-17drivers/net: remove useless semicolonsJoe Perches1-1/+1
switch and while statements don't need semicolons at end of statement [ Fixup minor conflicts with recent wimax merge... -DaveM ] Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-17Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6David S. Miller24-939/+1308
2010-05-17Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davemJohn W. Linville24-939/+1308
2010-05-14drivers/net: Remove unnecessary returns from void function()sJoe Perches6-9/+0
This patch removes from drivers/net/ all the unnecessary return; statements that precede the last closing brace of void functions. It does not remove the returns that are immediately preceded by a label as gcc doesn't like that. It also does not remove null void functions with return. Done via: $ grep -rP --include=*.[ch] -l "return;\n}" net/ | \ xargs perl -i -e 'local $/ ; while (<>) { s/\n[ \t\n]+return;\n}/\n}/g; print; }' with some cleanups by hand. Compile tested x86 allmodconfig only. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2010-05-13iwlwifi: add new PCI IDs for 6000g2 devicesShanyu Zhao3-0/+59
Add new PCI IDs for 6000 Series Gen2 devices and also defines a new sku of device: 6000g2b 2x2 bgn. Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-13iwlwifi: move ucode related function to iwl-agn-ucode.cWey-Yi Guy4-125/+124
Cleanup the code and move all the uCode related functions specific to _agn devices to iwl-agn-ucode.c Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-05-13iwlwifi: use proper short slot/preamble settingsJohannes Berg3-31/+9
The short preamble setting might change on the fly, and then we already use the right mac80211 variable. However, in other places we don't, which is especially wrong in the AP code since in that case the assoc_capability is invalid. Also, the IBSS special case is not needed since "use_short_slot" will be properly cleared, but the "assoc_capability" might be invalid (which must be the reason for the special case). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>