1
0
Fork 0
Commit Graph

24 Commits (61e6cfa80de5760bbe406f4e815b7739205754d2)

Author SHA1 Message Date
Simon Wunderlich 3de805cf96 mac80211/rc80211: add chandef to rate initialization
5 and 10 MHz support needs to know the current operating channel width,
add the chandef to the rate control API.

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
2013-07-16 09:58:02 +03:00
Stanislaw Gruszka a8cf0194b7 iwlegacy: fix rate control regression
Since driver does not use control.rates[0].count, we have never set that
variable. But currently, after rate control API rewrite, this is required
by mac80211. Otherwise legacy rates control does not work and we transmit
always at 1Mbit/s on pre 11n networks.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-12 14:24:22 -04:00
John W. Linville 655d8e2328 Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Conflicts:
	drivers/net/wireless/ath/carl9170/debug.c
	drivers/net/wireless/ath/carl9170/main.c
	net/mac80211/ieee80211_i.h
2013-04-10 14:09:54 -04:00
Colin Ian King ace5af3986 iwlegacy: 4965-rs: avoid null pointer dereference error
il4965_rs_initialize_lq checks to see if sta is null, however, before that
check il4965_rs_use_green dereferences sta when intializing use_green.
Avoid a potential null pointer dereference error by only calling
il4965_rs_use_green after we are sure sta is not null.

Smatch analysis:

drivers/net/wireless/iwlegacy/4965-rs.c:2160 il4965_rs_initialize_lq() warn:
  variable dereferenced before check 'sta' (see line 2155)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-03-27 11:07:05 -04:00
Karl Beldan 675a0b049a mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan
Drivers that don't use chanctxes cannot perform VHT association because
they still use a "backward compatibility" pair of {ieee80211_channel,
nl80211_channel_type} in ieee80211_conf and ieee80211_local.

Signed-off-by: Karl Beldan <karl.beldan@rivierawaves.com>
[fix kernel-doc]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-03-25 19:19:35 +01:00
Johannes Berg af0ed69bad mac80211: stop modifying HT SMPS capability
Instead of modifying the HT SMPS capability field
for stations, track the SMPS mode explicitly in a
new field in the station struct and use it in the
drivers that care about it. This simplifies the
code using it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2013-02-15 09:41:41 +01:00
John W. Linville 8065248069 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2012-04-12 13:49:28 -04:00
Johannes Berg d748b4642a mac80211: remove antenna_sel_tx TX info field
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-10 14:54:09 -04:00
Stephen Boyd 234e340582 simple_open: automatically convert to simple_open()
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-04-05 15:25:50 -07:00
Stanislaw Gruszka 8300719603 iwlegacy: get rid of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:11 -05:00
Stanislaw Gruszka 1c03c4620e iwlegacy: move ht out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:07 -05:00
Greg Dietsche e3a2c77533 iwlegacy: 4965-rs: cleanup il4965_rs_sta_dbgfs_rate_scale_data_read
1) remove ret local var and return the result directly
2) remove il since it is not used

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:54:56 +01:00
Greg Dietsche a741b99577 iwlegacy: 4965-rs: don't return rate from il4965_rs_update_rate_tbl
1) don't return rate from il4965_rs_update_rate_tbl
2) fix up il4965_rs_rate_scale_perform

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:53:45 +01:00
Greg Dietsche 3e4b065520 iwlegacy: 4965-rs: il4965_rs_alloc_sta: remove lq_sta local var
remove the lq_sta local variable and return the
result directly in il4965_rs_alloc_sta

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:53:16 +01:00
Greg Dietsche 144c0961b4 iwlegacy: 4965-rs: remove unnecessary null check for sta and lq_sta
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: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:52:59 +01:00
Greg Dietsche da6134d253 iwlegacy: 4965-rs: remove null check on sta in il4965_rs_tx_status
the null check on sta in il4965_rs_tx_status is not necessary

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-16 12:52:21 +01:00
Greg Dietsche dd44eb9e13 iwlegacy: change IL_ERR to D_HT in iwl4965_rs_tl_turn_on_agg_for_tid
This message should be a debug message and not an error.

Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:46 +01:00
Stanislaw Gruszka 1722f8e12a iwlegacy: checkpatch.pl fixes
Fix most checkpatch.pl ERRORs and some WARNINGs.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:51:01 +01:00
Stanislaw Gruszka e7392364fc iwlegacy: indentions and whitespaces
Process iwlegacy source files using:

indent -npro -l500 -nhnl
indent -npro -kr -i8 -ts8 -sob -l80 -nbbo -ss -ncs -cp1 -il0 -psl

Plus manual compilation fixes.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:45:59 +01:00
Stanislaw Gruszka e94a4099ad iwlegacy: merge common header files
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:20:09 +01:00
Stanislaw Gruszka 98613be06e iwlegacy: rename iwl-core.h to common.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 14:19:34 +01:00
Stanislaw Gruszka 4d69c7521a iwlegacy: rename REPLY_ to N_ or C_
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 13:12:21 +01:00
Stanislaw Gruszka af038f404f iwlegacy: move iwl-4965-{,hw,debugfs,calib}.h to 4965.h
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 12:59:02 +01:00
Stanislaw Gruszka f3a1b49d66 iwlegacy: rename iwl-4965-{rs,calib,debugfs}.c to 4965-{rs,calib,debug}.c
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
2011-11-15 12:54:25 +01:00