staging: brcm80211: replace hndcrc16 with crc-ccitt function
The implementation of hndcrc16 is identical to that of the crc-ccitt
function available in linux kernel library functions. The driver now
uses the crc-ccitt function.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: use local variable for socitype during ai_scan
The SOC interface type is only needed to verify that we are accessing
a chip with AMBA AXI interconnect during ai_scan function. Therefor
this can be done with a local variable.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: fix checkpatch issues in si_pmu_measure_alpclk
Patch "remove dependency between aiutils and siutils sources" introduced
several checkpatch warnings. This patch removes those in the function
si_pmu_measure_alpclk().
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: fix checkpatch warnings in si_pmu_spuravoid_pllupdate
patch "remove dependency between aiutils and siutils sources" resulted
in several checkpatch warnings and errors. This patch fixes those in
function si_pmu_spuravoid_pllupdate().
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: separate hndpmu functionality for brcmsmac driver
The hndpmu source file has functions for brcmfmac and brcmsmac driver
but it turns out that on function level there is no reuse so for
the brcmsmac its set of functions now reside in wlc_pmu.c.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove use of si_* functions from wlc_phy_lcn.c
The source file used si_alp_clock to determine crystal frequency.
It now uses the si_pmu_alp_clock call instead to remove dependency from
siutils functionality.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove tsf retrieval from wlc_bmac.c
Upon receiving a packet the lowest 32 bits of tsf are filled in
by wlc_bmac in wlc_bmac_recv, but this is not useful as wlc_main
needs to reconstruct 64 bit tsf which is retrieves to recover the
actual tsf value at which packet is received. Therefore tsf
retrieval is removed from wlc_bmac.c.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: provide TSF value in receive status
Packets passed to the mac80211 stack have a mactime field in the
receive status indicating the actual time it was received by the
phy radio. It was not (properly) filled in before this change.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove queue info parameter from wlc_send_q
There is only one queue on which the wlc_send_q has to operate. This
queue is available under the struct wlc_info parameter passed so
the additional queue info parameter is redundant.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The queue for pending transmit packets is called active_queue, but
the driver is only using one single queue. Therefor a more appro-
priate name has been given, ie. pkt_queue.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: implement flush driver callback for mac80211
The mac80211 interface has a flush callback which is used by mac80211
to assure all pending transmit packets have been transmitted. This
is used before scanning off-channel.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 3 May 2011 09:35:21 +0000 (11:35 +0200)]
staging: brcm80211: made fullmac error codes more consistent
Code cleanup. The code contains several checks on the condition
SDIOH_API_SUCCESS(status). On failure, the error returned depended on the
check, instead of being consistent. This has been corrected.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 3 May 2011 09:35:18 +0000 (11:35 +0200)]
staging: brcm80211: removed error string function
Only fullmac used this functionality, in which a broadcom specific error
code was converted to a human readable string. Since this functionality
is not needed, a function and accompanying data structures have been
removed.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 3 May 2011 09:35:15 +0000 (11:35 +0200)]
staging: brcm80211: removed ASSERTs from wlc_main.c
Driver contains far too many ASSERTs. Functions that were only used
from within removed ASSERTs have also been deleted, such as
wlc_bmac_taclear() in wlc_bmac.c.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: honour basic rate configuration from mac80211
The basic rates to be used are provided by the wireless access point
within the beacon information. The station should conform to those
rates and this information is passed by mac80211 to the driver. The
patch processes the information and applies the basic rates accor-
dingly. This is required functionality for mac80211 drivers.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The function is not required as the driver does honour the USE_RTS_CTS
flag. The mac80211 API notes state that either one or the other is required
(see http://wireless.kernel.org/en/developers/Documentation/mac80211/API).
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
staging: brcm80211: remove unnecessary if statements from bss_info_changed
The mac80211 api callback bss_info_changed contained two placeholders
that were expected to need to be implemented. However, reading the mac80211
notes (http://wireless.kernel.org/en/developers/Documentation/mac80211/API)
shows that it is not needed as the driver honours the flags provided with
the transmit sk_buff.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 3 May 2011 09:35:05 +0000 (11:35 +0200)]
staging: brcm80211: making wiphy object accessible from wlc and phy
Next commits will replace WL_ERROR and friends with BCMMSG. Because
this new message log function require a wiphy object, device object pointers
have been added to three data structures.
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Roland Vossen [Tue, 3 May 2011 09:35:01 +0000 (11:35 +0200)]
staging: brcm80211: fixed error in non-DHD_DEBUG fullmac build
A build error was introduced with recent fullmac changes when building without
debug option configured:
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c: In function
‘dhdsdio_sdiod_drive_strength_init’:
drivers/staging/brcm80211/brcmfmac/dhd_sdio.c:6366:3: error: ‘chn’ undeclared
Cc: devel@linuxdriverproject.org Cc: linux-wireless@vger.kernel.org Cc: Brett Rudley <brudley@broadcom.com> Cc: Henry Ptasinski <henryp@broadcom.com> Cc: Roland Vossen <rvossen@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If the wpa_supplicant conf file supplies both open and shared
algorithm, and AP is configured as shared then connection never
happens. Since it is a FMAC driver additional logic is added in
driver which first detects this, then tries open algorithm for the
first time and when it fails tries the shared algo.
kvalo: fix style issues
Signed-off-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Kalle Valo <kalle.valo@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
If a heavy traffic is undergoing and a link is lost (bcn miss),
wlan driver does a reconnection on its own and after connection
is re-established, reports it as ROAM_EVENT to cfg. Now this event
is handled as work queue. It could very well happen that by the
time this event gets handled, cfg would have aged out the bss and
we get the following WARN_ON in __cfg80211_roamed function in file
net/wireless/sme.c.
/* internal error -- how did we get to CONNECTED w/o BSS? */
if (WARN_ON(!wdev->current_bss)) {
return;
}
To resolve the issue we report the BSS whenever we send a connect or
roam event to the cfg.
kvalo: fix style issues
Signed-off-by: Naveen Singh <nsingh@atheros.com> Signed-off-by: Kalle Valo <kalle.valo@atheros.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
IIO: GYRO: ADXRS450: Don't exit probe, in case the power on default is not met.
If the part get's probed twice without hard reset in between, the power on default
register read-back can't be met. This shouldn't cause the second probe to fail.
So warn but don't exit.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Jeff Chua [Wed, 27 Apr 2011 16:25:14 +0000 (11:25 -0500)]
staging: r8712u: Fix driver to support ad-hoc mode
Driver r8712u is unable to handle ad-hoc mode. The issue is that when
the driver first starts, there will not be an SSID for association.
The fix is to always call the "select and join from scan" routine when
in ad-hoc mode.
Note: Ad-hoc mode worked intermittently before. If the driver had
previously been associated, then things were OK.
Signed-off-by: Jeff Chua <jeff.chua.linux@gmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:24 +0000 (09:20 -0700)]
Staging: hv: Cleanup vmbus_match()
In preparation for getting rid of the priv element from struct hv_driver,
cleanup vmbus_match - the setting of the drv field in struct hv_device
is not needed.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:23 +0000 (09:20 -0700)]
Staging: hv: Get rid of the references to the priv element of struct hv_driver in storvsc_drv.c
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct
hv_driver in storvsc_drv.c.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:22 +0000 (09:20 -0700)]
Staging: hv: Get rid of the references to the priv element of struct hv_driver in net driver
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct
hv_driver in network driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:21 +0000 (09:20 -0700)]
Staging: hv: Introduce a function to map a generic driver pointer to a pointer to struct netvsc_driver
In preparation for getting rid of the priv element from struct hv_driver,
introduce a function to map a generic driver pointer to a pointer to
struct netvsc_driver.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:20 +0000 (09:20 -0700)]
Staging: hv: Get rid of the references to the priv element of struct hv_driver in hv_mouse.c
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct hv_driver
in hv_mouse.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:19 +0000 (09:20 -0700)]
Staging: hv: Get rid of the references to the priv element of struct hv_driver in block driver
In preparation for getting rid of the priv element from struct hv_driver,
get rid of the references to the priv element of struct hv_driver
in blkvsc_drv.c and storvsc.c
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
K. Y. Srinivasan [Tue, 26 Apr 2011 16:20:18 +0000 (09:20 -0700)]
Staging: hv: Introduce a function to map a generic driver pointer to a pointer to storvsc_driver_object
In preparation for getting rid of the priv element from struct hv_driver,
introduce a function that maps a generic struct driver pointer to struct
storvsc_driver_object.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Abhishek Kane <v-abkane@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Not all warnings/errors were silenced, some of them are related to
simple printk() messages that imho should not be split across multiple
lines (it makes it harder to grep for example), and some of them are
related to long lines that are pretty much impossible to split without
proper code refactoring.
Resubmitting this patch because of conflicts.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Now there's only 10 errors and 1 warning given by checkpatch.pl, and
these are related initialization of statics. The only warning left can
be safely ignored I believe.
I'm resending this patch as the previous one was conflicting with the
newer version updated by Aaro Koskinen.
Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>