aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-hcmd.c
AgeCommit message (Collapse)Author
2010-04-02iwlwifi: remove trailing space in messagesFrans Pop
Includes minor improvements in debugging messages in iwl-4965.c, function iwl4965_is_temp_calib_needed(). Signed-off-by: Frans Pop <elendil@planet.nl> Cc: Zhu Yi <yi.zhu@intel.com> Cc: Reinette Chatre <reinette.chatre@intel.com> Cc: Intel Linux Wireless <ilw@linux.intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
2010-02-19iwlwifi: enable serialization of synchronous commandsReinette Chatre
Until now it was only possible to have one synchronous command running at any time. If a synchronous command is in progress when a second request arrives then the second command will fail. Create a new mutex specific for this purpose to only allow one synchronous command at a time, but enable other commands to wait instead of fail if a synchronous command is in progress. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-19iwlwifi: update copyright year to 2010Reinette Chatre
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-01-12iwlwifi: remove obsoleted host commandWey-Yi Guy
"RADAR_NOTIFICATION" host command is not used and not supported by uCode, remove it from driver code. 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>
2009-12-21iwlwifi: allocated rx page accounting cleanupZhu Yi
In iwlwifi, priv->alloc_rxb_page is used to keep track of the Rx pages allocated by the driver. This cleans up the page free routines by introducing __iwl_free_pages/iwl_free_pages so that the accounting is more accurate and less error prone. This also fixes two instances where the counter was not updated. 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>
2009-11-18Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/sfc/sfe4001.c drivers/net/wireless/libertas/cmd.c drivers/staging/Kconfig drivers/staging/Makefile drivers/staging/rtl8187se/Kconfig drivers/staging/rtl8192e/Kconfig
2009-11-11iwlwifi: change debug message to error in failure caseReinette Chatre
Since these messages indicate failure we would be interested in seeing them always. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-11-02iwlwifi: coex API data structureWey-Yi Guy
Add data structure define for COEX_MEDIUM_NOTIFICATION and COEX_EVENT_CMD host commands. COEX_MEDIUM_NOTIFICATION is notification from uCode to host to indicate medium changes. COEX_EVENT_CMD is from host to uCode for coex event request. 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>
2009-10-27iwlwifi: add missing commands to syslog messagesJay Sternberg
Two commands missing from list of commands such that when debug is enabled, these commands are shown as UNKNOWN. Missing commands are TX_ANT_CONFIGURATION_CMD and TEMPERATURE_NOTIFICATION. Signed-off-by: Jay Sternberg <jay.e.sternberg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-27iwlwifi: use paged RxZhu Yi
This switches the iwlwifi driver to use paged skb from linear skb for Rx buffer. So that it relieves some Rx buffer allocation pressure for the memory subsystem. Currently iwlwifi (4K for 3945) requests 8K bytes for Rx buffer. Due to the trailing skb_shared_info in the skb->data, alloc_skb() will do the next order allocation, which is 16K bytes. This is suboptimal and more likely to fail when the system is under memory usage pressure. Switching to paged Rx skb lets us allocate the RXB directly by alloc_pages(), so that only order 1 allocation is required. It also adjusts the area spin_lock (with IRQ disabled) protected in the tasklet because tasklet guarentees to run only on one CPU and the new unprotected code can be preempted by the IRQ handler. This saves us from spawning another workqueue to make skb_linearize/__pskb_pull_tail happy (which cannot be called in hard irq context). Finally, mac80211 doesn't support paged Rx yet. So we linearize the skb for all the management frames and software decryption or defragmentation required data frames before handed to mac80211. For all the other frames, we __pskb_pull_tail 64 bytes in the linear area of the skb for mac80211 to handle them properly. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-10-11headers: remove sched.h from interrupt.hAlexey Dobriyan
After m68k's task_thread_info() doesn't refer to current, it's possible to remove sched.h from interrupt.h and not break m68k! Many thanks to Heiko Carstens for allowing this. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
2009-08-14iwlwifi: Traffic type and counter for debugFsWey-Yi Guy
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>
2009-07-27iwlwifi: remove command callback return valueJohannes Berg
No existing callbacks use anything other than the return value 1, which means that the caller should free the reply skb, so it seems safer in terms of not introducing memory leaks to simply remove the return value and let the caller always free the skb. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-07-27iwlwifi: fix up command sendingJohannes Berg
The current command sending in iwlwifi is a bit of a mess: 1) there is a struct, iwl_cmd, that contains both driver and device data in a single packed structure -- this is very confusing 2) the on-stack data and the command metadata share a structure by embedding the latter in the former, which is also rather confusing because it leads to weird unions and similarly odd constructs 3) each txq always has enough space for 256 commands, even if only 32 end up being used This patch fixes these things: 1) rename iwl_cmd to iwl_device_cmd and keep track of command metadata and device command separately, in two arrays in each tx queue 2) remove the 'meta' member from iwl_host_cmd and only put in the required members 3) allocate the cmd/meta arrays separately instead of embedding them into the txq structure Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-02-09iwlwifi: don't use implicit priv in IWL_DEBUGTomas Winkler
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>
2009-01-29iwlwifi: update copyright year to 2009Reinette Chatre
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-29iwlwifi: replace IWL_ERROR with IWL_ERRWinkler, Tomas
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>
2009-01-16iwlwifi: remove CMD_WANT_SKB flag if send_cmd_sync failureZhu Yi
In function iwl_send_cmd_sync(), if the flag CMD_WANT_SKB is set but we are not provided with a valid SKB (cmd->meta.u.skb == NULL), we need to remove the CMD_WANT_SKB flag from the TX cmd queue. Otherwise in case the cmd comes in later, it will possibly set an invalid address. Thus it causes an invalid memory access. This fixed the bug http://bugzilla.kernel.org/show_bug.cgi?id=11326. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2009-01-12iwlwifi: Fix get_cmd_string() for REPLY_3945_RXSamuel Ortiz
0x1b is a 3945 specific command, we should print it too when debugging. 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>
2008-12-12iwlwifi: change email contact informationWinkler, Tomas
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>
2008-11-25iwlwifi : fix checkpatch.pl errorsAbhijeet Kolekar
Patch fixes checkpatch.pl errors for iwlwifi. Signed-off-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>
2008-08-22iwlwifi: add level for debugging host commandEsti Kummer
This patch adds another level for debugging host command. This adds an option to suppress the debug prints for sensitivity and link quality commands. Signed-off-by: Esti Kummer <ester.kummer@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>
2008-08-18removed unused #include <version.h>Huang Weiyi
The drivers below do not use LINUX_VERSION_CODE nor KERNEL_VERSION. drivers/net/wireless/ath5k/base.c drivers/net/wireless/b43/main.c drivers/net/wireless/ipw2100.c drivers/net/wireless/ipw2200.c drivers/net/wireless/iwlwifi/iwl-3945.c drivers/net/wireless/iwlwifi/iwl-4965.c drivers/net/wireless/iwlwifi/iwl-5000.c drivers/net/wireless/iwlwifi/iwl-agn.c drivers/net/wireless/iwlwifi/iwl-core.c drivers/net/wireless/iwlwifi/iwl-eeprom.c drivers/net/wireless/iwlwifi/iwl-hcmd.c drivers/net/wireless/iwlwifi/iwl-power.c drivers/net/wireless/iwlwifi/iwl3945-base.c This patch removes the said #include <version.h>. Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-08-04iwlwifi: memory allocation optimizationGregory Greenman
This patch optimizes memory allocation. The cmd member of iwl_tx_queue was allocated previously as a continuous block of memory. This patch allocates separate memory chunks for each command and maps/unmaps these chunks in the run time. Signed-off-by: Gregory Greenman <gregory.greenman@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>
2008-06-30iwlwifi: add REPLY_TX_POWER_DBM_CMD to get_cmd_stringEmmanuel Grumbach
This patch adds REPLY_TX_POWER_DBM_CMD to get_cmd_string. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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>
2008-06-03iwlwifi-5000: implement initial calibration for 5000Tomas Winkler
This patch adds initial calibration framework for 5000 HW faimily. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Gregory Greenman <gregory.greenman@intel.com> Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-21iwlwifi: move TX code into iwl-tx.cTomas Winkler
This patch moves the sending part of the TX code into iwl-tx.c including sending host commands. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-14iwlwifi: remove 4965 from rx_packetTomas Winkler
This patch removes 4965 mark from rx_packet. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-05-07iwlwifi: rename iwl-4965.h to iwl-dev.hTomas Winkler
This patch renames iwl-4965.h to iwl-dev.h Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-16iwlwifi: add default WEP key host commandEmmanuel Grumbach
This patch adds declaration for static WEP host command. This command will be used for default WEP group keys when no key mapping keys are used. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-04-01iwlwifi: Fix synchronous host commandTomas Winkler
This patch replaces static variable from send_cmd_sync with flag in priv->status. It was used for reentrance protection but clearly made it impossible to stuck more cards into the same machine In addition it force check of return values of synchronous commands commands that doesn't requires return value async commands have to be used Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Yi Zhu <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-27iwlwifi: allow a default callback for ASYNC host commandsEmmanuel Grumbach
This patch provides a default callback for ASYNC host commands instead of calling to BUG_ON. Most of the callbacks are now just empty functions Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-03-25iwlwifi: move host command sending functions to core moduleTomas Winkler
1. Host command sending functions moved from iwl4965-base.c to iwl-hcmd.c in iwlcore module 2. enqueue_hcmd function currently stays in iwl4965-base.c. It is invoked through the new 'utils' field in priv's ops. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Assaf Krauss <assaf.krauss@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>