Commit Graph

284905 Commits

Author SHA1 Message Date
Stanislaw Gruszka 6aa0c25435 iwlegacy: get rid of ctxid
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:02 -05:00
Stanislaw Gruszka 0f8b90f526 iwlegacy: get rid of *_devtype
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:01 -05:00
Stanislaw Gruszka b16db50a6d iwlegacy: move bcast_sta_id to hw_params
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:56:00 -05:00
Stanislaw Gruszka 8f9e564553 iwlegacy: get rid of ap_sta_id
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka d98e294231 iwlegacy: get rid of wep_key_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:59 -05:00
Stanislaw Gruszka b96ed60cd0 iwlegacy: get rid of qos_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:58 -05:00
Stanislaw Gruszka 5e349f0296 iwlegacy: get rid of rxon_assoc_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:57 -05:00
Stanislaw Gruszka 63d0f0c551 iwlegacy: get rid of ctx->rxon_timing_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:56 -05:00
Stanislaw Gruszka 6122d18236 iwlegacy: get rid of ctx->rxon_cmd
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:55 -05:00
Stanislaw Gruszka c8b03958d4 iwlegacy: move rxon commands 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:55:55 -05:00
Amitkumar Karwar caf60a6c95 mwifiex: update correct dtim_period in dump_station()
Earlier we were using dtim period extracted from scan response
buffer provided by FW in scan operation. But it is observed that
sometimes the buffer doesn't contain dtim period tlv, and wrong
value (0) was sent to user space.

After association FW will start listening to beacon frames of
connected AP and store dtim period. Therefore we can get it from
FW in dump_station() instead of using wrong value obtained in
scanning.

Redundant code after adapting new approach for dtim period is
also removed in this patch.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:54 -05:00
Amitkumar Karwar f3c8d2591f mwifiex: cleanup in snmp_mib command preparation code
1) Remove unnecessary switch case usage.
2) Replace "X=cpu_to_le16(le16_to_cpu(X) + Y)" by "le16_add_cpu(X, Y)"
3) Declare "ul_temp" variable as u16 instead of u32 to avoid
unnecessary typecasting

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:53 -05:00
Tim Gardner 3d86b93064 rtlwifi: Fix PCI probe error path orphaned memory
Memory allocated by ieee80211_alloc_hw() will get orphaned
if any subsequent initializations fail.

Also don't pci_set_drvdata(pdev, NULL) until just before disabling
the PCI device. Functions called by rtl_deinit_core(hw) may eventually need
the context (when its actually implemented).

Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Chaoming Li <chaoming_li@realsil.com.cn>
Cc: John W. Linville <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:52 -05:00
Eliad Peller 885bd8eca6 mac80211: support hw scan while idle
Currently, mac80211 goes to idle-off before starting a scan.
However, some devices that implement hw scan might not
need going idle-off in order to perform a hw scan, and
thus saving some energy and simplifying their state machine.

(Note that this is also the case for sched scan - it
currently doesn't make mac80211 go idle-off)

Add a new flag to indicate support for hw scan while idle.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:51 -05:00
Amitkumar Karwar 3dc5e17518 mwifiex: enable HT operating mode
This patch sets default adapter channel_type as HT. Hence the device
will opearate in HT mode.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:51 -05:00
Amitkumar Karwar 477778bb0e mwifiex: fix NULL pointer dereference in set_channel()
In set_channel() callback handler, "priv" pointer is derived from
net_device. Sometimes net_device pointer coming from the stack
is NULL which causes kernel crash.
This patch fixes the problem by deriving "priv" from wiphy
when net_device pointer is NULL.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:50 -05:00
Yogesh Ashok Powar 197a4e4e1f mwl8k: Remove BSSID from the firmware when the BSS is stopped
Using command DEL_MAC_ADDR, remove the mac address of the BSS
when it is stopped i.e the corresponding vif is removed. Without
this, the stale bss entry will still be maintained in the firmware
which causes issues when the BSS's are recreated.

Signed-off-by: Nishant Sarmukadam <nishants@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:42 -05:00
Dan Carpenter 291689fcfb ath9k: cleanup a min_t() cast
If the firmware was over 2G, it would cause memory corruption and the
system would die here.  Obviously we all know the firmware isn't going
to be that large but static checkers get upset.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:42 -05:00
Dan Carpenter 910570b5f4 mac80211: off by one in mcs mask handling
"ridx" is used as an index into the mcs_mask[] array which has
IEEE80211_HT_MCS_MASK_LEN elements.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:41 -05:00
Hauke Mehrtens d486a5b499 ssb: add support for bcm5354
This patch adds support the the BCM5354 SoC.
It has a PMU and a constant not configurable clock.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:55:36 -05:00
Hauke Mehrtens bedb2a18af ssb: log the id, rev and pkg of the chip found
This makes us see what type of hardware someone uses by the dmesg
output.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:11 -05:00
Hauke Mehrtens f0d4724b2a bcma: log the id, rev and pkg of the chip found
This makes us see what type of hardware someone uses by the dmesg
output.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:11 -05:00
Antonio Quartulli 267335d63b cfg80211/mac80211: userspace peer authorization in IBSS
If the IBSS network is RSN-protected, let userspace authorize the stations
instead of adding them as AUTHORIZED by default.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:10 -05:00
Larry Finger 3eda95de19 rtlwifi: Remove extra debugging message accidentally left in
In commit b0302aba81, an extra debugging
message that is spamming the logs was not deleted before submission.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:09 -05:00
Masanari Iida 5aff4e74dc rtlwifi: Fix typo in dm.c
Correct a spelling "disconnet" to "disconnect" in
drivers/net/wireless/rtlwifi/rtl8192de/dm.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:08 -05:00
Masanari Iida f3e1b97f03 iwmc3200wifi: Fix typo in trace.h
Correct spelling "embeded" to "embedded" in
drivers/net/wireless/iwmc3200wifi/trace.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:07 -05:00
Devendra.Naga 1d73c51a84 rtlwifi: remove return in _rtl_pci_switch_clk_req
the return value from _rtl_pci_switch_clk_req is not used by any of its callers.

Signed-off-by: Devendra.Naga <devendra.aaru@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:07 -05:00
Hauke Mehrtens d6865dcc58 bcma: add extra sprom check
This check is needed on the BCM43224 device as it says in the
capabilities it has an sprom but is extra check says it has not.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:06 -05:00
Hauke Mehrtens 8f9ada4fa1 bcma: add bus num counter
If we have two bcma buses on one computer the second will not work
without this patch. Now each bus gets an own number.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:05 -05:00
Hauke Mehrtens 49dc957715 bcma: add PCIe host controller
Some SoCs have a PCIe host controller to make it possible to attach
some other devices to it, like an other Wifi card.
This code was tested with an Netgear WNDR3400 (bcm4716 based), but
should work with all bcma based SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:04 -05:00
Hauke Mehrtens d1a7a8e1d3 bcma: make some functions __devinit
bcma_core_pci_hostmode_init() has to be in __devinit as it will call a
function in that section and so all functions calling it also have to
be in __devinit.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:03 -05:00
Hauke Mehrtens 4b259a5cc5 bcma: export bcma_pcie_read()
This will be needed by the host controller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:53:02 -05:00
Hauke Mehrtens 2be25cac84 bcma: add constants for PCI and use them
There are many magic numbers used in the PCIe code. Replace them with
some constants from the Broadcom SDK and also use them in the pcie host
controller.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:52:56 -05:00
Hauke Mehrtens 5f2d6171e1 bcma: add the core unit number
Some SoCs have two pcie or gmac cores and we need to know the number of
the specific core on the bus. This is the case for the BCM4706.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:39 -05:00
Stanislaw Gruszka 268bd858df rt2800: document RF_R03 register bits [7:4]
Taken from:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
(based on function RT33xx_ChipSwitchChannel)

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:39 -05:00
Stanislaw Gruszka f1f12f9894 rt2800: radio 3xxxx: channel switch RX/TX calibration fixes
Synchronize code with Ralink driver:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
Based on functions:
RT30xx_ChipSwitchChannel
RT33xx_ChipSwitchChannel
NICInitRT3370RFRegisters
and defines from:
include/chip/rt33xx.h

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:39 -05:00
Stanislaw Gruszka 3e0c7643c5 rt2800: radio 3xxx: add channel switch calibration routines
Synchronize code with Ralink driver:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
Based on functions:
RT33xx_ChipSwitchChannel
RT30xx_ChipSwitchChannel

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:38 -05:00
Stanislaw Gruszka e3bab19762 rt2800: radio 3xxx: program RF_R1 during channel switch
Synchronize code with Ralink driver:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
Based on functions:
RT33xx_ChipSwitchChannel
RT30xx_ChipSwitchChannel
RT33xx_Init

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:38 -05:00
Stanislaw Gruszka 7f4666ab3f rt2800: radio 3xxx: reprogram only lower bits of RF_R3
Synchronize code with Ralink driver:
2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO
(functions: RT33xx_ChipSwitchChannel() and RT30xx_ChipSwitchChannel())

Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:38 -05:00
Masanari Iida 5718b134b1 net: Fix typo in ipw2x00/libipw_rx.c
Correct spelling in "suppported" to "supported" in
drivers/net/wireless/ipw2x00/libipw_rx.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:38 -05:00
Johannes Berg 66e67e4189 mac80211: redesign auth/assoc
This is the second part of the auth/assoc redesign,
the mac80211 part. This moves the auth/assoc code
out of the work abstraction and into the MLME, so
that we don't flip channels all the time etc.

The only downside is that when we are associated,
we need to drop the association in order to create
a connection to another AP, but for most drivers
this is actually desirable and the ability to do
was never used by any applications. If we want to
implement resource reservation with FT-OTA, we'd
probably best do it with explicit R-O-C in wpa_s.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:37 -05:00
Johannes Berg 4c0c0b75e0 cfg80211: export cfg80211_ref_bss
This is needed by mac80211 to keep a reference
to a BSS alive for the auth process. Remove the
old version of cfg80211_ref_bss() since it's
not actually used.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:37 -05:00
Johannes Berg 95de817b90 cfg80211: stop tracking authenticated state
To track authenticated state seems to have been
a design mistake in cfg80211. It is possible to
have out of band authentication (FT), tracking
multiple authentications caused more problems
than it ever helped, and the implementation in
mac80211 is too complex.

Remove all this complexity, and let userspace
do whatever it wants to, mac80211 can deal with
that just fine. Association is still tracked of
course, but authentication no longer is. Local
auth state changes are thus no longer of value,
so ignore them completely.

This will also help implement SAE -- asking the
driver to do an authentication is now almost
equivalent to sending an authentication frame,
with the exception of shared key authentication
which is still handled completely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:37 -05:00
Johannes Berg 7852e36186 mac80211: remove dummy STA support
The dummy STA support was added because I didn't
want to change the driver API at the time. Now
that we have state transitions triggering station
add/remove in the driver, we only call add once a
station reaches ASSOCIATED, so we can remove the
dummy station stuff again.

While at it, tighten the RX check and accept only
port control (EAP) frames from the AP station if
it's not associated yet -- in other cases there's
no race.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:50:37 -05:00
Johannes Berg a4ec45a421 mac80211: implement sta_add/sta_remove in sta_state
Instead of maintaining separate sta_add/sta_remove
callsites, implement it in sta_state when the driver
has no sta_state implementation.

The only behavioural change this should cause is in
secure mesh mode: with this the station entries will
only be created after the stations are set to AUTH.
Given which drivers support mesh, this seems to not
be a problem.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:25 -05:00
Johannes Berg f09603a259 mac80211: add sta_state callback
(based on Eliad's patch)

Add a callback to notify the low-level driver whenever
the state of a station changes. The driver is only
notified when the station is actually in the mac80211
hash table, not for pre-insert state transitions.

To allow the driver to replace sta_add/remove calls
with this, call extra transitions with the NOTEXIST
state.

This callback can fail, so we need to be careful in
handling it when a station is inserted, particularly
in the IBSS case where we still keep the station entry
around for mac80211 purposes.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:24 -05:00
Johannes Berg 71ec375c75 mac80211: add NOTEXIST station state
This will be used by drivers later if they
need to have stations inserted all the time,
in mac80211 has no purpose, is never used
and sta_state starts out in NONE.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:24 -05:00
Johannes Berg 89c91caecc mac80211: dont program keys for stations not uploaded
If a station couldn't be uploaded to the driver but
is still kept (only in IBSS mode) we still shouldn't
try to program the keys for it into hardware; fix
this bug by skipping the key upload in this case.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:24 -05:00
Johannes Berg 077f493928 mac80211: simplify AP_VLAN handling
Setting keys and updating TKIP keys must use the
BSS sdata (not AP_VLAN), so we translate. Move
the translation into driver-ops wrappers instead
of having it inline in the code to simplify the
normal code flow.

The same can be done for sta_add/remove which
already does the translation in the wrapper.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:24 -05:00
Johannes Berg c8987876e9 mac80211: move managed mode station state modification
Move the station state modification right before insert,
this just makes the current code more readable (you can
tell that it's before insertion looking at a single
screenful of code) right now, but some upcoming changes
will require this.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-02-06 14:48:23 -05:00