aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-rs.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-06-06iwlwifi: move DVM code into subdirectoryJohannes Berg1-3369/+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-05-25iwlwifi: update BT traffic load states correctlyMeenakshi Venkataraman1-0/+1
When BT traffic load changes from its previous state, a new LQ command needs to be sent down to the firmware. This needs to be done only once per change. The state variable that keeps track of this change is last_bt_traffic_load. However, it was not being updated when the change had been handled. Not updating this variable was causing a flood of advanced BT config commands to be sent to the firmware. Fix this. Cc: stable@vger.kernel.org #2.6.38+ Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-23iwlwifi: clean up module parametersJohannes Berg1-1/+2
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-1/+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-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-12iwlwifi: calculate active legacy rates per stationJohannes Berg1-2/+10
Not all stations are guaranteed to have the same active (available) legacy rates, so calculate them on rate control init instead of hard-coding them based on our own available rates. I have no idea why that was done here before. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-04-12iwlwifi: move hw_params into privJohannes Berg1-28/+28
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-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirelessJohn W. Linville1-8/+3
2012-04-10mac80211: remove antenna_sel_tx TX info fieldJohannes Berg1-1/+1
This field is never set to anything non-zero in mac80211, so we should be able to remove it. Unfortunately though, the iwlwifi and iwlegacy drivers use it for their internal TX status processing (which shouldn't be using the rate control API to start with), so add a new field "status.antenna" for them, at least for now. In the future, I plan to use the new field to hold the hardware queue, while the SKB's queue mapping holds the AC. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-04-09iwlwifi: add trailing newline to various messagesJohannes Berg1-1/+1
A whole bunch of messages, even some recent ones, didn't include a trailing newline so add it. 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-8/+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-08iwlwifi: remove unused argument from rs_initialize_lqJohannes Berg1-2/+1
The function never uses its conf argument, so remove it. 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 shared lockJohannes Berg1-3/+0
Some data doesn't need protection, some of the lock places are simply useless, and some data can be protected with the mutex instead. Thus the shared lock can be removed by making those changes. 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-27iwlwifi: virtualize the op_modeEmmanuel Grumbach1-5/+11
Define the op_mode as an interface with its ops. All the functions of the op_mode are "private", but its ops is made public in iwl-op-mode.h. The drv object starts the op_mode by using the start function in the public ops. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-02-17iwlwifi: move workqueue to privJohannes Berg1-1/+1
In order to separate the different parts of the driver better, we are reducing the shared data. This moves the workqueue to "priv", and removes it from the transport. To do this, simply use schedule_work() in the transport. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2012-01-24iwlwifi: update CopyrightWey-Yi Guy1-1/+1
Update Copyright to 2012 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-12-16iwlwifi: tid_data moves to iwl_privEmmanuel Grumbach1-3/+2
The transport doesn't need to access it any more. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
2011-12-16iwlwifi: move iwl_cfg from iwl_priv to iwl_sharedDon Fry1-4/+4
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-08iwlagn: use IWL_MAX_TID_COUNT instead of TID_MAX_LOAD_COUNTJohannes Berg1-5/+5
We track the load only on 8 TIDs, previously this was TID_MAX_LOAD_COUNT. Since IWL_MAX_TID_COUNT is now 8 as well, use that to make the code more easily understandable. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-12-08iwlwifi: rename CONFIG_IWLWIFI_DEVICE_SVTOOL to CONFIG_IWLWIFI_DEVICE_TESTMODEWey-Yi Guy1-3/+3
Change the name to match the works Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-11-11iwlwifi: fix rate-scaling algorithm for BT combo devicesVenkataraman, Meenakshi1-6/+2
iwlwifi tries to avoid using antenna B in BT combo devices when BT is active. A bug in the rate-scaling algorithm was causing the combo device to never attempt MIMO rates. Fix the algorithm to opportunistically try MIMO rates when BT traffic is low. 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>
2011-10-14iwlagn: merge station management functionsWey-Yi Guy1-1/+0
After driver split, no need to separate station management functions in two files, merge it Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-14iwlagn: remove un-necessary stepWey-Yi Guy1-2/+1
No need to copy twice. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-30iwlagn: iwl-agn-rs: remove unnecessary null check for sta and lq_staGreg Dietsche1-3/+0
both sta and lq_sta are guaranteed to be not null in the calling function so we don't need to check them here. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-09-21iwlagn: remove common station privJohannes Berg1-8/+8
Since the driver split there's no more need for shared/non-shared private station data so remove struct iwl_station_priv_common entirely. 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-08-30iwlwifi: iwl-agn-rs.c: remove old commentGreg Dietsche1-1/+0
this comment refers to some code that was removed. Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: iwl_tid_data moves to iwl-sharedEmmanuel Grumbach1-8/+10
The rate scaling and the transport need to access the data in iwl_tid_data, hence the move. Note that the only component in the upper layer that needs this data is the rate scaling. Refactoring the rate scaling may help to move iwl_tid_data from the shared area to the transport area. 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-29iwlagn: enable 11n aggregation without checking traffic loadWey-Yi Guy1-1/+1
Enable HT aggregation when it reach reasonable traffic without checking traffic load which delay enabling the aggregation and lower the throughput but this behavior can be overwrite by module parameter this address https://bugzilla.kernel.org/show_bug.cgi?id=40042 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-08-29iwlagn: priv->lock moves to iwl_sharedEmmanuel Grumbach1-2/+2
Since it is used by all the layers, it needs to move to iwl_shared. 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-29iwlagn: workqueue moves to iwl_sharedEmmanuel Grumbach1-1/+1
Since it is used by all the layers, it needs to move to iwl_shared. 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-29iwlagn: hw_params moves to iwl_sharedEmmanuel Grumbach1-30/+36
Since it is used by all the layers, it needs to move to iwl_shared. 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-08iwlagn: remove wireless extensions inclusionsJohannes Berg1-1/+0
linux/wireless.h and net/iw_handler.h headers are for wireless extensions only, so mac80211 drivers shouldn't be including them. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-07-21iwlagn: testmode fixed rate available for testmode onlyWey-Yi Guy1-2/+6
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-11iwlagn: separate and enhance the fixed rate fromWey-Yi Guy1-10/+18
For testing purpose, we need better control of msc from user application. Separate the fixed_rate between debugfs and testmode and enforce it. Signed-off-by: Kenny Hsu <kenny.hsu@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-06-01iwlagn: change the logging level for aggregation enable checkWey-Yi Guy1-1/+1
Aggregation will not enable if the traffic is lower than the threshold, this is not an error condition, so change the logging level. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-24iwlagn: dbg_fixed_rate only used when CONFIG_MAC80211_DEBUGFS enabledWey-Yi Guy1-2/+2
Fix compiling error when CONFIG_MAC80211_DEBUGFS is not enabled drivers/net/wireless/iwlwifi/iwl-agn-rs.c:351: error: 'struct iwl_lq_sta' has no member named 'dbg_fixed_rate' drivers/net/wireless/iwlwifi/iwl-agn-rs.c:1076: error: 'struct iwl_lq_sta' has no member named 'dbg_fixed_rate' Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Acked-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-16Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6John W. Linville1-39/+47
2011-05-16iwlwifi: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warningStephen Boyd1-1/+1
Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following warning: In file included from arch/x86/include/asm/uaccess.h:573, from include/net/checksum.h:25, from include/linux/skbuff.h:28, from drivers/net/wireless/iwlwifi/iwl-agn-rs.c:28: In function 'copy_from_user', inlined from 'rs_sta_dbgfs_scale_table_write' at drivers/net/wireless/iwlwifi/iwl-agn-rs.c:3099: arch/x86/include/asm/uaccess_64.h:65: warning: call to 'copy_from_user_overflow' declared with attribute warning: copy_from_user() buffer size is not provably correct presumably due to buf_size being signed causing GCC to fail to see that buf_size can't become negative. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-05-13iwlagn: remove set but unused varsJohannes Berg1-18/+10
gcc is warning that a few variables in rate scaling are set but never otherwise used. This pointed out a few simplifications. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-05-13iwlagn: add testmode set fixed rate commandWey-Yi Guy1-21/+37
Add support in testmode for setting fixed rate Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-04-07iwlagn: change Copyright to 2011Wey-Yi Guy1-1/+1
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-04-07iwlagn: remove pointless return variablesJohannes Berg1-7/+2
A number of places just use a variable to return it right away, which is useless, so let's remove the variables 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>
2011-03-25iwlwifi: add RATE_MCS_RATE_MSKDaniel Halperin1-7/+8
Throughout the code we use rate_n_flags & 0xff to extract the lower byte of the rate_n_flags u32 that contains the information about the rate. Add a #define and remove the use of the magic number. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-03-25iwlwifi: limit number of attempts for highest HT rateDaniel Halperin1-1/+2
When filling out its rate scale table, iwlwifi repeats the first HT rate IWL_HT_NUMBER_TRY times. The hardware scheduler will stop using aggregation for any frame that fails LINK_QUAL_AGG_DISABLE_START_DEF times. Currently, both these constants equal 3. If iwlwifi probes a faster rate than the link supports, all frames in a (potentially tens of frames large) batch will fail IWL_HT_NUMBER_TRY times. Because this happens to be as large as LINK_QUAL_AGG_DISABLE_START_DEF, all frames will then be sent individually. This leads to a short, but performance-degrading window where the legacy stop-and-wait MAC takes over. Bounding the initial rate by (LINK_QUAL_AGG_DISABLE_START_DEF-1) attempts makes the third try use a lower rate and hence more be likely to succeed. This somewhat mitigates the above described behavior. Signed-off-by: Daniel Halperin <dhalperi@cs.washington.edu> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlwifi: use maximum aggregation sizeJohannes Berg1-1/+4
Use the values from the peer to set up the ucode for the right maximum number of subframes in an aggregate. Since the ucode only tracks this per station, use the minimum across all aggregation sessions with this peer. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2011-01-31iwlagn: adjust rate tableWey-Yi Guy1-12/+12
Minor adjustment for rate scale table Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-12-16iwlwifi: Fix error: struct iwl_lq_sta has no member named dbg_fixed_rateSedat Dilek1-0/+2
While compiling linux-next (next-20101216) I fell over this breakage: ... drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘iwl_rs_rate_init’: drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2876:8: error: ‘struct iwl_lq_sta’ has no member named ‘dbg_fixed_rate’ dbg_fixed_rate is only used when CONFIG_MAC80211_DEBUGFS is set: [ drivers/net/wireless/iwlwifi/iwl-agn-rs.h ] ... #ifdef CONFIG_MAC80211_DEBUGFS struct dentry *rs_sta_dbgfs_scale_table_file; struct dentry *rs_sta_dbgfs_stats_table_file; struct dentry *rs_sta_dbgfs_rate_scale_data_file; struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file; u32 dbg_fixed_rate; #endif The issue was introduced by commit a1da077bc36368eb7d6312e7e49260f0a3d92c77: "iwlwifi: clear dbg_fixed_rate during init" Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-15mac80211: Add timeout to BA session start APISujith Manoharan1-1/+1
Allow drivers or rate control algorithms to specify BlockAck session timeout when initiating an ADDBA transaction. This is useful in cases where maintaining persistent BA sessions does not incur any overhead. The current timeout value of 5000 TUs is retained for all non ath9k/ath9k_htc drivers. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Reviewed-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2010-12-13iwlwifi: clear dbg_fixed_rate during initShanyu Zhao1-0/+2
This prevent bad fixed_rate keeps crashing uCode in an endless loop. Signed-off-by: Shanyu Zhao <shanyu.zhao@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
2010-11-16iwlagn: support dynamic aggregation for BT coexWey-Yi Guy1-15/+17
Use dynamic aggregation threshold if bt traffic load is high to reduce the impact on aggregated frame. Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>