aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-debugfs.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-06iwlwifi: move DVM code into subdirectoryJohannes Berg1-2437/+0
Since we're working on another mode/driver inside iwlwifi, move the current one into a subdirectory to more cleanly separate the code. While at it, rename all the files. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2012-04-23iwlwifi: clean up module parametersJohannes Berg1-0/+1
For now at least, all module parameters should be with the core functionality, so move them there, while at it rename to iwlwifi_mod_params. Also rename iwl-shared.h to iwl-modparams.h to reflect the real contents. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: remove TX/RX frame statisticsJohannes Berg1-84/+0
Keeping statistics per frame type really isn't very useful, and needs a huge amount of code so remove it. Since that is the only thing in iwl-core.{c,h} now, those files can be killed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: remove traffic logJohannes Berg1-103/+0
This is superseded by tracing and no longer needed. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: move iwl_cmd_echo_testJohannes Berg1-0/+17
The function can be static with the only user. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: remove debugfs logspamJohannes Berg1-50/+17
There really is no point in printing very verbose error messages when somebody tries to access a debugfs file before it is ready. Or even worse, printing verbose messages when memory allocation fails which *already* prints a huge warning. Remove all IWL_ERR messages from debugfs. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-23iwlwifi: Added debugfs calib disabled writeDavid Spinadel1-2/+23
Added the option to disable calibration via debugfs. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: op_mode holds its pointer to the configEmmanuel Grumbach1-4/+4
Instead of using the shared area that we be killed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-18iwlwifi: op_mode holds its pointer to the transportEmmanuel Grumbach1-4/+4
Instead of using the shared area that we be killed. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-16iwlwifi: remove get_cmd_stringJohannes Berg1-1/+1
The command strings are needed through the layers for debug and error messages, but can differ with opmode. As a result, we need to give the command names to the transport layer as configuration. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-16iwlwifi: Disabling calibrations variableDor Shaish1-4/+31
Add a variable for disabling specific calibrations. Merged old variables for calibrations disabling. Signed-off-by: Dor Shaish <dor.shaish@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-16iwlwifi: move HCMD_ACTIVE to transDon Fry1-2/+0
The HCMD_ACTIVE bit is only used in trans. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-12iwlwifi: move eeprom into privJohannes Berg1-3/+3
The whole code around eeprom is distributed across whole bunch of different files, most of which belong to the to-be-DVM code. As a result, it is currently very hard to split out the EEPROM code to be generic. However, it is also quite unlikely that the current EEPROM code will be needed by the MVM code as that has different mechanisms to query the EEPROM (it does so through the uCode.) So, at least temporarily, move everything into priv. If it becomes necessary to use the code from MVM, we will have to split it out, but then it's also easier since we'll know what pieces we need. 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>
2012-04-12iwlwifi: split force_reset debugfs fileJohannes Berg1-42/+22
Split the force_reset debugfs file into two different files: * "rf_reset" triggers a reset of the RF when written to and exposes statistics on RF resets when read * fw_restart triggers a firmware restart when written to and lives in the transport This cleans up all sources of firmware restart to originate within the transport layer and allows us to simplify some code. 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>
2012-04-12iwlwifi: move hw_params into privJohannes Berg1-6/+6
The hw_params are mostly values that are derived from the actual hardware config. As such, while it is possible that MVM will require similar ones, it makes more sense -- at least for now -- to put them into the DVM struct. 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>
2012-04-12iwlwifi: remove watchdog debugfs fileJohannes Berg1-25/+0
This file isn't really all that useful as when the watchdog triggered it's already too late, and the setting doesn't persist unlike e.g. a module parameter that could be added to the right config file. 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>
2012-04-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-9/+3
2012-04-09iwlwifi: split POWER_PMI status bitDon Fry1-1/+1
Move the POWER_PMI to the op_mode where it is changed. The trans needs to check it frequently, so shadow the status in the trans and update it in trans when it infrequently changes. 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>
2012-04-09iwlwifi: move FW_ERROR to privDon Fry1-1/+1
The op_mode should check for FW_ERROR before calling send_cmd. This removes the need to test for FW_ERROR in the trans layer. 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>
2012-04-09iwlwifi: move ucode_type from shared to op_modeMeenakshi Venkataraman1-1/+1
This variable holds the ucode currently running on the device; which is determined by op_mode, so move this parameter there. Also, the name of the variable is a bit misleading, so rename it to cur_ucode. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09iwlwifi: move ucode error log reporting to op_modeMeenakshi Venkataraman1-0/+41
Error log reporting does not belong to the transport layer, but to the op_mode loading the ucode, as it is the entity which knows about the ucode loaded, and what the error information means. Move device logging pointers from the transport layer to op_mode. With this change, transport layer only reports an error to the op_mode, which will figure out what to do with the error. This causes the driver to now dump out error logs when the command queue is stuck as well. Also, move the debugfs entry for event logs out of the transport layer and into op_mode. Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09iwlwifi: move queue mapping out of transportJohannes Berg1-3/+8
The queue mapping is not only dynamic, it is also dependent on the uCode, as we can already see today with the dual-mode and non-dual-mode being different. Move the queue mapping out of the transport layer and let the higher layer manage it. Part of the transport configuration is how to set up the queues. 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>
2012-04-05simple_open: automatically convert to simple_open()Stephen Boyd1-9/+3
Many users of debugfs copy the implementation of default_open() when they want to support a custom read/write function op. This leads to a proliferation of the default_open() implementation across the entire tree. Now that the common implementation has been consolidated into libfs we can replace all the users of this function with simple_open(). This replacement was done with the following semantic patch: <smpl> @ open @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ... -.open = open_f, +.open = simple_open, ... }; </smpl> [akpm@linux-foundation.org: checkpatch fixes] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Julia Lawall <Julia.Lawall@lip6.fr> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-03-12iwlwifi: change struct iwl_fwDavid Spinadel1-12/+5
Change iwl_fw struct to hold an array of fw_img instead of three separated instances. Change fw_img to hold an array of fw_desc instead of two separate descriptors for instructions and data. Change load_given_ucode, load_section, verification functions etc. to support this structure. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-12iwlwifi: avoid some operations if no uCode loadedDavid Spinadel1-2/+13
Printing the SRAM and similar testmode operations could be triggered when no uCode is loaded; prevent those invalid operations by tracking whether uCode is loaded. Signed-off-by: David Spinadel <david.spinadel@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-09iwlwifi: fix the delta for remove max_txq_num patchWey-Yi Guy1-1/+1
BIg portion of "iwlwifi: remove max_txq_num from hw_params" was missing during merge, here is the fix for it. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-03-08iwlwifi: more status bit factoringDon Fry1-20/+18
Continue splitting the status bits between transport and op_mode. All but a few are separated. 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>
2012-03-08iwlwifi: separate status to priv and transDon Fry1-5/+1
The shared status bits are a mixture of transport and op mode bits. Some are used just by one or the other, some are shared. Begin the de-tangling of these bits. 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>
2012-03-07iwlwifi: put use_rts_for_aggregation into hw_paramsJohannes Berg1-3/+3
The hardware config ht_params shouldn't be modified, so copy the use_rts_for_aggregation parameter into hw_params and use/modify it there. 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>
2012-03-07iwlwifi: use watchdog timeout from hw_paramsJohannes Berg1-1/+1
This is the version that can be modified, the config params should be read-only. 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>
2012-03-07iwlwifi: keep plcp_delta_threshold in privJohannes Berg1-3/+3
The base_params shouldn't be writable, so keep a copy of this in priv that can be modified. 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>
2012-03-07iwlwifi: move mutex out of sharedJohannes Berg1-6/+6
Now the mutex no longer needs to be shared, so move it into iwl_priv. 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>
2012-03-07iwlwifi: remove iwl-wifi.hJohannes Berg1-1/+0
This file was recently introduced, but then directly abused -- it contained private data that shouldn't have been used by anything but the implementation of firmware requests and some very core code. Now that it is no longer accessed by any code but the code in iwl-drv.c, we can dissolve it. Also rename the iwl_nic struct to iwl_drv to better reflect where and how it is used. 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>
2012-03-07iwlwifi: split out firmware storeJohannes Berg1-5/+4
Through the driver, struct iwl_fw will store the firmware. Split this out into a separate file, iwl-fw.h, and make all other code use it. To do this, also move the log pointers into it, and remove the knowledge of "nic" from everything. Now the op_mode has a fw pointer, and (unfortunately) for now the shared data also needs to keep one for the transport to access dump the error log -- I think that will move later. Since I wanted to constify the firmware pointers, some more changes were needed. 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>
2012-03-06iwlwifi: use valid TX/RX antenna from hw_paramsJohannes Berg1-3/+6
It's not really a good idea to write to the global static configuration. Use the valid TX/RX antenna information only from the HW params struct except in the case where the values from the config are used to override the values from the EEPROM. 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>
2012-03-06iwlwifi: remove per-device debug levelJohannes Berg1-53/+2
There's no need for the per-device debug level that we expose in debugfs since the module parameter is writable in sysfs. At the same time, simplify code by changing iwl_get_debug_level(shrd) & IWL_DL_ISR) to iwl_have_debug_level(IWL_DL_ISR) 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>
2012-03-06iwlwifi: introduce statistics lockJohannes Berg1-0/+21
The statistics are currently only half-heartedly locked against concurrent reading & modification so introduce a lock to really protect them. 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>
2012-02-17iwlwifi: Move ucode pointers to iwl_fwDon Fry1-5/+6
The ucode image is a ucode related thing not a transport one. Move them. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-02iwlwifi: give trans to all the read / write functionsEmmanuel Grumbach1-3/+3
From now on, the transport layer in charge of providing access to the device. So change all the driver to give a pointer to the transport to all the low level functions that actually access the device. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-01-28iwlwifi: fix uCode event tracingJohannes Berg1-3/+4
Fix multiple bugs in event tracing: 1) If you enable uCode tracing with the device down, it will still attempt to access the device and continuously log "MAC is in deep sleep!" errors. Fix this by only starting logging when the device is actually alive. 2) Now you can set the flag when the device is down, but logging doesn't happen when you bring it up. To fix that, start logging when the device comes alive. This means we don't log before -- we could do that but I don't need it right now. 3) For some reason we read the error instead of the event log -- use the right pointer. 4) Optimise SRAM reading of event log header. 5) Fix reading write pointer == capacity, which can happen due to racy SRAM access 6) Most importantly: fix an error where we would try to read WAY too many events (like 2^32-300) when we read the wrap counter before it is updated by the uCode -- this does happen in practice and will cause the driver to hang the machine. 7) Finally, change the timer to 10ms instead of 100ms as 100ms is too slow to capture all data with a normal event log and with 100ms the log will wrap multiple times before we have a chance to read it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-01-06iwlwifi: update CopyrightWey-Yi Guy1-1/+1
Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: tid_data moves to iwl_privEmmanuel Grumbach1-1/+1
The transport doesn't need to access it any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2011-12-16iwlwifi: tid_data logic move to upper layer - txqidEmmanuel Grumbach1-3/+2
The tid_data is not related to the transport layer, so move the logic that depends on it to the upper layer. This patch deals with the mapping of RA / TID to HW queues in AGG. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: don't count the tfds in HW queue any moreEmmanuel Grumbach1-3/+2
Since packets sent to an RA / TID in AGG are sent from a separate HW Tx queue, we may get into a race: the regular queue isn't empty while we already begin to send packets from the AGG queue. This would result in sending packets out of order. In order to cope with this, mac80211 waits until the driver reports that the legacy queue is drained before it can send packets to the AGG queue. During that time, mac80211 buffers packets for the driver. These packets will be sent in order after the driver reports it is ready. The way this was implemented in the driver is as follows: We held a counter that monitors the number of packets for an RA / TID in the HW queues. When this counter reached 0, we knew that the HW queues were drained and we reported to mac80211 that were ready to proceed. This patch changes the implementation described above. We now remember what is the wifi sequence number of the first packet that will be sent in the AGG queue (lets' call it ssn). When we reclaim the packet before ssn, we know that the queue is drained, and we are ready to proceed. This will allow us to move this logic in the upper layer and eventually remove the tid_data from the shared area. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-16iwlwifi: move iwl_cfg from iwl_priv to iwl_sharedDon Fry1-13/+13
Move the configuration pointer from the upper level iwl_priv to the lower level iwl_shared structure, with associated code fixes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: move eeprom pointer from iwl_priv to iwl_sharedDon Fry1-2/+2
The eeprom image is a device level component, move from iwl_priv to iwl_shared, with associated code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-02iwlwifi: move ucode_type from iwl_priv to iwl_sharedDon Fry1-3/+4
Move the ucode_type variable from the iwl_priv to the iwl_shared structure with associated code changes. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-11-11iwlagn: move nvm_device_type from iwl_priv to iwl_transDon Fry1-1/+1
The nvm_device_type is eeprom related and does not need to be part of the iwl_priv structure. Move it and eliminate access to the iwl_priv structure. 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-11-11iwlagn: move ucode files out of the iwl_priv structureDon Fry1-3/+3
Relocate the ucode files and update relevant code. More code refactoring. 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-10-14iwlagn: kill hw_params.max_stationsEmmanuel Grumbach1-2/+1
Not needed since driver split. 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>