summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi
AgeCommit message (Collapse)Author
2012-01-11iwlwifi: update SCD BC table for all SCD queuesEmmanuel Grumbach
commit 96f1f05af76b601ab21a7dc603ae0a1cea4efc3d upstream. Since we configure all the queues as CHAINABLE, we need to update the byte count for all the queues, not only the AGGREGATABLE ones. Not doing so can confuse the SCD and make the fw assert. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Id5700ae8cfc1b3243ca9f96f6dd0bbf95b05b5e6 Reviewed-on: http://git-master/r/74227 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11iwlwifi: allow to switch to HT40 if not associatedWey-Yi Guy
commit 78feb35b8161acd95c33a703ed6ab6f554d29387 upstream. My previous patch 34a5b4b6af104cf18eb50748509528b9bdbc4036 iwlwifi: do not re-configure HT40 after associated Fix the case of HT40 after association on specified AP, but it break the association for some APs and cause not able to establish connection. We need to address HT40 before and after addociation. Reported-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Tested-by: Andrej Gelenberg <andrej.gelenberg@udo.edu> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: Idb3be35a9693545112a3d22f35efe31bc6efab06 Reviewed-on: http://git-master/r/74191 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2012-01-11iwlwifi: do not set the sequence control bit is not neededWey-Yi Guy
commit 123877b80ed62c3b897c53357b622574c023b642 upstream. Check the IEEE80211_TX_CTL_ASSIGN_SEQ flag from mac80211, then decide how to set the TX_CMD_FLG_SEQ_CTL_MSK bit. Setting the wrong bit in BAR frame whill make the firmware to increment the sequence number which is incorrect and cause unknown behavior. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Change-Id: I3b610f6383fc35467b8451621b7ce4d154196e4a Reviewed-on: http://git-master/r/74190 Reviewed-by: Varun Wadekar <vwadekar@nvidia.com> Tested-by: Varun Wadekar <vwadekar@nvidia.com>
2011-12-09iwlagn: fix HW crypto for TX-only keysJohannes Berg
commit 274b89ca3b006926cb9b45d78ab5906f4c0fc0aa upstream. Group keys in IBSS or AP mode are not programmed into the device since we give the key to it with every TX packet. However, we do need mac80211 to create the MMIC & PN in all cases. Move the code around to set the key flags all the time. We set them even when the key is removed again but that is obviously harmless. Reported-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09iwlwifi: do not re-configure HT40 after associatedWey-Yi Guy
commit 34a5b4b6af104cf18eb50748509528b9bdbc4036 upstream. The ht40 setting should not change after association unless channel switch This fix a problem we are seeing which cause uCode assert because driver sending invalid information and make uCode confuse Here is the firmware assert message: kernel: iwlagn 0000:03:00.0: Microcode SW error detected. Restarting 0x82000000. kernel: iwlagn 0000:03:00.0: Loaded firmware version: 17.168.5.3 build 42301 kernel: iwlagn 0000:03:00.0: Start IWL Error Log Dump: kernel: iwlagn 0000:03:00.0: Status: 0x000512E4, count: 6 kernel: iwlagn 0000:03:00.0: 0x00002078 | ADVANCED_SYSASSERT kernel: iwlagn 0000:03:00.0: 0x00009514 | uPc kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink1 kernel: iwlagn 0000:03:00.0: 0x00009496 | branchlink2 kernel: iwlagn 0000:03:00.0: 0x0000D1F2 | interruptlink1 kernel: iwlagn 0000:03:00.0: 0x00000000 | interruptlink2 kernel: iwlagn 0000:03:00.0: 0x01008035 | data1 kernel: iwlagn 0000:03:00.0: 0x0000C90F | data2 kernel: iwlagn 0000:03:00.0: 0x000005A7 | line kernel: iwlagn 0000:03:00.0: 0x5080B520 | beacon time kernel: iwlagn 0000:03:00.0: 0xCC515AE0 | tsf low kernel: iwlagn 0000:03:00.0: 0x00000003 | tsf hi kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp1 kernel: iwlagn 0000:03:00.0: 0x29703BF0 | time gp2 kernel: iwlagn 0000:03:00.0: 0x00000000 | time gp3 kernel: iwlagn 0000:03:00.0: 0x000111A8 | uCode version kernel: iwlagn 0000:03:00.0: 0x000000B0 | hw version kernel: iwlagn 0000:03:00.0: 0x00480303 | board version kernel: iwlagn 0000:03:00.0: 0x09E8004E | hcmd kernel: iwlagn 0000:03:00.0: CSR values: kernel: iwlagn 0000:03:00.0: (2nd byte of CSR_INT_COALESCING is CSR_INT_PERIODIC_REG) kernel: iwlagn 0000:03:00.0: CSR_HW_IF_CONFIG_REG: 0X00480303 kernel: iwlagn 0000:03:00.0: CSR_INT_COALESCING: 0X0000ff40 kernel: iwlagn 0000:03:00.0: CSR_INT: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_INT_MASK: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_FH_INT_STATUS: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_GPIO_IN: 0X00000030 kernel: iwlagn 0000:03:00.0: CSR_RESET: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_GP_CNTRL: 0X080403c5 kernel: iwlagn 0000:03:00.0: CSR_HW_REV: 0X000000b0 kernel: iwlagn 0000:03:00.0: CSR_EEPROM_REG: 0X07d60ffd kernel: iwlagn 0000:03:00.0: CSR_EEPROM_GP: 0X90000001 kernel: iwlagn 0000:03:00.0: CSR_OTP_GP_REG: 0X00030001 kernel: iwlagn 0000:03:00.0: CSR_GIO_REG: 0X00080044 kernel: iwlagn 0000:03:00.0: CSR_GP_UCODE_REG: 0X000093bb kernel: iwlagn 0000:03:00.0: CSR_GP_DRIVER_REG: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP1: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_UCODE_DRV_GP2: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_LED_REG: 0X00000078 kernel: iwlagn 0000:03:00.0: CSR_DRAM_INT_TBL_REG: 0X88214dd2 kernel: iwlagn 0000:03:00.0: CSR_GIO_CHICKEN_BITS: 0X27800200 kernel: iwlagn 0000:03:00.0: CSR_ANA_PLL_CFG: 0X00000000 kernel: iwlagn 0000:03:00.0: CSR_HW_REV_WA_REG: 0X0001001a kernel: iwlagn 0000:03:00.0: CSR_DBG_HPET_MEM_REG: 0Xffff0010 kernel: iwlagn 0000:03:00.0: FH register values: kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_STTS_WPTR_REG: 0X21316d00 kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_RBDCB_BASE_REG: 0X021479c0 kernel: iwlagn 0000:03:00.0: FH_RSCSR_CHNL0_WPTR: 0X00000060 kernel: iwlagn 0000:03:00.0: FH_MEM_RCSR_CHNL0_CONFIG_REG: 0X80819104 kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_SHARED_CTRL_REG: 0X000000fc kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_STATUS_REG: 0X07030000 kernel: iwlagn 0000:03:00.0: FH_MEM_RSSR_RX_ENABLE_ERR_IRQ2DRV: 0X00000000 kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_STATUS_REG: 0X07ff0001 kernel: iwlagn 0000:03:00.0: FH_TSSR_TX_ERROR_REG: 0X00000000 kernel: iwlagn 0000:03:00.0: Start IWL Event Log Dump: display last 20 entries kernel: ------------[ cut here ]------------ WARNING: at net/mac80211/util.c:1208 ieee80211_reconfig+0x1f1/0x407() kernel: Hardware name: 4290W4H kernel: Pid: 1896, comm: kworker/0:0 Not tainted 3.1.0 #2 kernel: Call Trace: kernel: [<ffffffff81036558>] ? warn_slowpath_common+0x73/0x87 kernel: [<ffffffff813b8966>] ? ieee80211_reconfig+0x1f1/0x407 kernel: [<ffffffff8139e8dc>] ? ieee80211_recalc_smps_work+0x32/0x32 kernel: [<ffffffff8139e95a>] ? ieee80211_restart_work+0x7e/0x87 kernel: [<ffffffff810472fa>] ? process_one_work+0x1c8/0x2e3 kernel: [<ffffffff810480c9>] ? worker_thread+0x17a/0x23a kernel: [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b kernel: [<ffffffff81047f4f>] ? manage_workers.clone.18+0x15b/0x15b kernel: [<ffffffff8104ba97>] ? kthread+0x7a/0x82 kernel: [<ffffffff813d21b4>] ? kernel_thread_helper+0x4/0x10 kernel: [<ffffffff8104ba1d>] ? kthread_flush_work_fn+0x11/0x11 kernel: [<ffffffff813d21b0>] ? gs_change+0xb/0xb Reported-by: Udo Steinberg <udo@hypervisor.org> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-09iwlwifi: allow pci_enable_msi failWey-Yi Guy
commit 8a39ef8ba0fa0410d71db8e981e887fe4fdeca88 upstream. Continue the init process even fail to enable msi out_iounmap is no longer used, remove it Reported-by: werner <w.landgraf@ru.ru> Tested-by: werner <w.landgraf@ru.ru> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-11iwlagn: do not use interruptible waitsJohannes Berg
commit effd4d9aece9184f526e6556786a94d335e38b71 upstream. Since the dawn of its time, iwlwifi has used interruptible waits to wait for synchronous commands and firmware loading. This leads to "interesting" bugs, because it can't actually handle the interruptions; for example when a command sending is interrupted it will assume the command completed fully, and then leave it pending, which leads to all kinds of trouble when the command finishes later. Since there's no easy way to gracefully deal with interruptions, fix the driver to not use interruptible waits. This at least fixes the error iwlagn 0000:02:00.0: Error: Response NULL in 'REPLY_SCAN_ABORT_CMD' I have seen in P2P testing, but it is likely that there are other errors caused by this. Cc: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-11-11iwlagn: fix priv->cfg->ht_params NULL pointer dereferenceStanislaw Gruszka
commit 107ef97a170dec95893f34614edd92eb8cb9b5d0 upstream. This fix regression introduced by commit: commit 15b3f3b006b42a678523cad989bfd60b76bf4403 Author: Wey-Yi Guy <wey-yi.w.guy@intel.com> Date: Fri Jun 3 07:54:13 2011 -0700 iwlagn: set smps mode after assoc for 1000 device Also remove unneeded brackets on the way. Address: https://bugzilla.redhat.com/show_bug.cgi?id=744155 Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-26iwlagn: fix dangling scan requestJohannes Berg
If iwl_scan_initiate() fails for any reason, priv->scan_request and priv->scan_vif are left dangling. This can lead to a crash later when iwl_bg_scan_completed() tries to run a pending scan request. In practice, this seems to be very rare due to the STATUS_SCANNING check earlier. That check, however, is wrong -- it should allow a scan to be queued when a reset/roc scan is going on. When a normal scan is already going on, a new one can't be issued by mac80211, so that code can be removed completely. I introduced this bug when adding off-channel support in commit 266af4c745952e9bebf687dd68af58df553cb59d. Cc: stable@kernel.org [3.0] Reported-by: Peng Yan <peng.yan@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-16iwlagn: workaround bug crashing some APsDon Fry
This patch reverts commit 9b7688328422b88a7a15dc0dc123ad9ab1a6e22d which was introduced in 2.6.38-rc1. It works around a problem where the iwlagn driver stimulates a bug crashing (requiring power cycle to recover) some APs under heavy traffic. CC: stable@kernel.org #2.6.39, #3.0.0 #3.1.0 Signed-off-by: Don Fry <donald.h.fry@intel.com> SIgned-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13iwlagn: fix command queue timeoutJohannes Berg
If the command queue is constantly busy, which can happen in P2P, the hangcheck timer will frequently find a command in it and will eventually reset the device because nothing sets the timestamp for this queue when commands are processed. Fix this by setting the timestamp when a command completes. Cc: stable@kernel.org #2.6.39, #3.0.0 #3.1.0 Signed-off-by: Johannes Berg <johannes.berg@intel.com> SIgned-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-13iwlagn: fix stack corruptionJohannes Berg
Alexander reported a strange crash in iwlagn that Meenakshi and Wey couldn't reproduce. I just ran into the same issue and tracked it down to stack corruption. This fixes it. The problem was introduced in commit 4b8b99b6e650d0527f3a123744b7459976581d14 Author: Wey-Yi Guy <wey-yi.w.guy@intel.com> Date: Fri Jul 8 14:29:48 2011 -0700 iwlagn: radio sensor offset in le16 format Cc: Wey-Yi Guy <wey-yi.w.guy@intel.com> Cc: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Reported-by: Alexander Diewald <alex@diewald.cc> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-13iwlagn: sysfs couldn't find the priv pointerEmmanuel Grumbach
This bug has been introduced by: d593411084a56124aa9d80aafa15db8463b2d8f7 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Mon Jul 11 10:48:51 2011 +0300 iwlagn: simplify the bus architecture Revert part of the buggy patch: dev_get_drvdata will now return iwl_priv as it did before the patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-13Revert "iwlagn: sysfs couldn't find the priv pointer"Emmanuel Grumbach
This reverts commit cc1a93e68f6c0d736b771f0746e8e4186f483fdc. This fix introduced a bug: bad pointer in unload. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-03Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next ↵John W. Linville
into for-davem
2011-08-02iwlagn: 5000 do not support idle modeWey-Yi Guy
5000 series has issue supporting power save idle mode: commit 9dc2153315650eae220898668b6aa56a25c130be iwlwifi: always support idle mode for agn devices For agn devices, always support idle mode which help power consumption in idle unassociated state. the above changes cause 5000 become not stable when power management is "on" http://bugzilla.intellinuxwireless.org/show_bug.cgi?id=2312 Cc: stable@kernel.org #2.6.39, #3.0.0 Reported-by: Devin J Pohly <djpohly+iwl@gmail.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-02iwlagn: sysfs couldn't find the priv pointerEmmanuel Grumbach
This bug has been introduced by: d593411084a56124aa9d80aafa15db8463b2d8f7 Author: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Date: Mon Jul 11 10:48:51 2011 +0300 iwlagn: simplify the bus architecture Revert part of the buggy patch: dev_get_drvdata will now return iwl_priv as it did before the patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Tested-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-25Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (43 commits) fs: Merge split strings treewide: fix potentially dangerous trailing ';' in #defined values/expressions uwb: Fix misspelling of neighbourhood in comment net, netfilter: Remove redundant goto in ebt_ulog_packet trivial: don't touch files that are removed in the staging tree lib/vsprintf: replace link to Draft by final RFC number doc: Kconfig: `to be' -> `be' doc: Kconfig: Typo: square -> squared doc: Konfig: Documentation/power/{pm => apm-acpi}.txt drivers/net: static should be at beginning of declaration drivers/media: static should be at beginning of declaration drivers/i2c: static should be at beginning of declaration XTENSA: static should be at beginning of declaration SH: static should be at beginning of declaration MIPS: static should be at beginning of declaration ARM: static should be at beginning of declaration rcu: treewide: Do not use rcu_read_lock_held when calling rcu_dereference_check Update my e-mail address PCIe ASPM: forcedly -> forcibly gma500: push through device driver tree ... Fix up trivial conflicts: - arch/arm/mach-ep93xx/dma-m2p.c (deleted) - drivers/gpio/gpio-ep93xx.c (renamed and context nearby) - drivers/net/r8169.c (just context changes)
2011-07-24iwlwifi: Fix build with CONFIG_PM disabled.David S. Miller
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-07-22Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem
2011-07-21iwlagn: probe would crash with DEBUG_SHIRQEmmanuel Grumbach
This is since my patch: iwlagn: introduce transport layer and implement rx_init The IRQ is requested before the locks are initialized, hence the crash. Initialize the tasklet before we request the IRQ on the way. Reported-by: Johannes Berg <johannes.berg@intel.com> Tested-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove "disable otp refresh" W/AWey-Yi Guy
Remove the "disable otp refresh" work-around, not needed anymore. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: rename iwlagn_set_dynamic_keyJohannes Berg
We now have iwlagn_set_dynamic_key() and iwl_set_dynamic_key() which is confusing, rename the former to iwlagn_send_sta_key() to better reflect what it does -- it only sends a command and doesn't change driver state. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: track beacon interval sent to deviceJohannes Berg
Sometimes, when mac80211 changes the beacon interval or when it isn't yet set in mac80211 before association, the uCode will sysassert because we send it confusing RXON timing vs. PAN parameters. To fix this, track the last beacon interval sent to the device and use that in PAN parameter calculations. This fixes a bug during P2P group formation as a client (and possibly association to a regular AP) while connected to another AP. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: write iq invert register for 105/135 deviceWey-Yi Guy
For 105/135 series of devices, we need to do I/Q invert just like 2000 series devices. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: implement WoWLANJohannes Berg
Implement WoWLAN support in iwlagn. The device supports a number of wakeup triggers and can do GTK rekeying when asleep (if HW crypto is used). Unfortunately, we need to disconnect from the AP after resume since we can't yet get all the info out of the wowlan uCode to stay connected safely. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: rewrite HW cryptoJohannes Berg
As I just discovered while doing WoWLAN, HW crypto is done wrong for GTKs: they should be programmed for the AP station ID (in the managed mode case) and the HW can actually deal with multiple group keys per station as well (which is useful in IBSS RSN but that I've chosen not to use this). To fix all this, modify the way keys are sent to the device and key offsets are allocated. After these changes, key offsets are stored into the hw_key_idx which we can then track for the key lifetime, not relying on our sta_cmd array. WEP default keys get special treatment, of course. Additionally, since I had the API for it, we can now pre-fill TKIP phase 1 keys for RX now that we can obtain the P1K from mac80211, a capability I had added for WoWLAN initially. Finally, some keys simply don't need to be added into the device's key cache -- a key that won't be used for RX is only needed in the TX header, so "pretend" to have accepted any key without adding it into the device -- no need to use up key space there for it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove forgotten debugfs functionJohannes Berg
It seems that due to merge issues between different trees or so this function prototype wasn't removed when it should have been, do it now. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove un-necessary "_agn"Wey-Yi Guy
After driver split, extra _agn in priv structure is no needed, remove it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove keyinfo cacheJohannes Berg
iwlagn keeps a copy of key stuff internally but never actually uses it, so remove it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: testmode fixed rate available for testmode onlyWey-Yi Guy
Move tm_fixed_rate inside CONFIG_IWLWIFI_DEVICE_SVTOOL and only available when the option is enable. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: add comment to warn about WoWLAN in resume / suspend flowsEmmanuel Grumbach
WoWLAN may need the NIC even after suspend. One should not do anything to the NIC in the bus level, since one cannot check whether WoWLAN is enabled or not. Same for resume. Add a simple comment to the code to warn about this. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: iwl_bus holds drv_data as void * instead of iwl_privEmmanuel Grumbach
The price to pay is the access to the log system. Therefore logs from bus layer are sent by dev_printk instead of IWL_XXXX. Rename bus->priv to bus->drv_data to make the separation even clearer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: simplify the bus architectureEmmanuel Grumbach
Call iwl_probe with a ready iwl_bus struct. This means that the bus layer assigns the irq, dev and iwl_bus_ops pointers to iwl_bus before giving it to iwl_probe. The device specific struct is allocated together with the common iwl_bus struct by the bus specific layer. The pointer to the aggregate struct is passed to the upper layer that holds a pointer to iwl_bus instead of an embedded iw_bus. The private data given to the PCI subsystem is now iwl_bus and not iwl_priv. Provide bus_* inliners on the way in order to simplify the syntax. Rename iwl-pci.h -> iwl-bus.h since it is bus agnostic and represent the external of the bus layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: transport layer receives struct iwl_trans*Emmanuel Grumbach
It still holds a pointer to iwl_priv. But hopefully this will disappear at some point. Also add the multiple inclusion protection to iwl-trans.h that was forgotten. Move iwl-trans structures to iwl-trans.h Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: move iwl_prepare_card_hw to the transport layerEmmanuel Grumbach
This function is really related to the transport layer - move it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: move more functions from the start flow to the transport layerEmmanuel Grumbach
Basically all the nic_init flow should be in the transport layer. iwl_prepare_card_hw will move to the transport too in a separate patch. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: SCD configuration for AMPDU moves to transport layerEmmanuel Grumbach
All the configurations of the HW for AMPDU are now in the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: radio sensor offset in le16 formatWey-Yi Guy
For temperature offset calibration, send radio sensor offset in le16 format Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: define valid init calibration maskWey-Yi Guy
Use the valid calibration mask for init calibration Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: remove legacy calibration commandWey-Yi Guy
IWL_PHY_CALIBRATE_DIFF_GAIN_CMD is for legacy device, remove it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: set correct calibration flagWey-Yi Guy
Set calibration config flag for complete notification Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-21iwlagn: kill iwlagn_setup_deferred_workEmmanuel Grumbach
Since iwlagn_setup_deferred_work is always called, fold it into iwl_setup_deferred_work. BT related works are setup by the new bt_setup_deferred_work lib_ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21iwlagn: kill iwlagn_rx_handler_setupEmmanuel Grumbach
Since iwlagn_rx_handler_setup is always called, fold it into iwl_rx_handler_setup. BT related handlers are setup by the new bt_rx_handler_setup lib_ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21iwlagn: add kick_nic API to transport layerEmmanuel Grumbach
kick_nic means to remove the RESET bit from the embedded CPU Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-21treewide: fix potentially dangerous trailing ';' in #defined values/expressionsPhil Carmody
All these are instances of #define NAME value; or #define NAME(params_opt) value; These of course fail to build when used in contexts like if(foo $OP NAME) while(bar $OP NAME) and may silently generate the wrong code in contexts such as foo = NAME + 1; /* foo = value; + 1; */ bar = NAME - 1; /* bar = value; - 1; */ baz = NAME & quux; /* baz = value; & quux; */ Reported on comp.lang.c, Message-ID: <ab0d55fe-25e5-482b-811e-c475aa6065c3@c29g2000yqd.googlegroups.com> Initial analysis of the dangers provided by Keith Thompson in that thread. There are many more instances of more complicated macros having unnecessary trailing semicolons, but this pile seems to be all of the cases of simple values suffering from the problem. (Thus things that are likely to be found in one of the contexts above, more complicated ones aren't.) Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-07-16iwlagn: add tx start API to transport layerEmmanuel Grumbach
tx start will start the tx queues: basically configure the SCD Remove the IWLAGN prefix to SCD defines on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16iwlagn: move all the ICT related functions to iwl-trans-rx-pcie.cEmmanuel Grumbach
Since the ICT is transport related, move all its functions to the transport layer. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-07-16iwlagn: move iwlagn_stop_device to transport layerEmmanuel Grumbach
Since iwlagn_stop_device was the only caller to the rx_stop / tx_stop, these two don't need to be API any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.guy@intel.com>
2011-07-16iwlagn: move tx transport functions to iwl-trans-tx-pcie.cEmmanuel Grumbach
There are still a few functions here and there that should be put in the transport layer. Mainly the functions that are related to the reclaim flow. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>