summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' of ↵John W. Linville2012-09-072-5/+6
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
| * brcm80211: smac: set interface down on resetVladimir Zapolskiy2012-08-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change marks interface as down on reset, otherwise the driver can't reinitialize itself properly. Without the change a transient problem turns out to be critical and leads to inavailability to reset the driver without brcmsmac module unload/load cycle: ieee80211 phy0: wl0: PSM microcode watchdog fired at 5993 (seconds). Resetting. brcms_c_dpc : PSM Watchdog, chipid 0xa8d9, chiprev 0x1 ieee80211 phy0: wl0: fatal error, reinitializing ieee80211 phy0: Hardware restart was requested ieee80211 phy0: brcms_ops_start: brcms_up() returned -19 Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Cc: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: use channel flags to restrict OFDMSeth Forshee2012-08-022-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | brcmsmac cannot call freq_reg_info() during channel changes as it does not hold cfg80211_lock, and as a result it generates a lockdep warning. freq_reg_info() is being used to determine whether OFDM is allowed on the current channel, so we can avoid the errant call by using the new IEEE80211_CHAN_NO_OFDM for this purpose instead. Reported-by: Josh Boyer <jwboyer@redhat.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'for-john' of ↵John W. Linville2012-08-211-2/+4
|\ \ | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/mac80211_hwsim.c
| * | mac80211: move TX station pointer and restructure TXThomas Huehn2012-07-311-2/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the control.sta pointer from ieee80211_tx_info to free up sufficient space in the TX skb control buffer for the upcoming Transmit Power Control (TPC). Instead, the pointer is now on the stack in a new control struct that is passed as a function parameter to the drivers' tx method. Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Signed-off-by: Alina Friedrichsen <x-alina@gmx.net> Signed-off-by: Felix Fietkau <nbd@openwrt.org> [reworded commit message] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* | brcmsmac: document firmware dependenciesJeff Mahoney2012-08-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The brcmsmac driver requests firmware but doesn't document the dependency. This means that software that analyzes the modules to determine if firmware is needed won't detect it. Specifically, (at least) openSUSE won't install the kernel-firmware package if no hardware requires it. This patch adds the MODULE_FIRMWARE directives. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | brcmsmac: use ieee80211_channel_to_frequencyJohannes Berg2012-08-061-9/+4
|/ | | | | | | | Instead of hard-coding almost the same functionality, just use ieee80211_channel_to_frequency() directly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'master' of ↵John W. Linville2012-07-203-8/+7
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * brcmsmac: restructure info->control.sta handling as it is goning to be ↵Thomas Huehn2012-07-123-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | removed soon. brcmsmac uses info->control.sta while doing ampdu aggregation. This patch changes the usage of the structure info->control.sta, as it is going to be removed soon from struct ieee80211_tx_info. This patch is a pre-requisit in order to add transmission power control (TPC) to the mac80211 subsystem. Suggested-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2012-07-1211-389/+216
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * brcmsmac: handle non PCI devices in the phy codeHauke Mehrtens2012-07-101-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some code in write_{radio,radio}_reg() should just be run if this is a pci based device. Add the condition again which was removed in commit: commit 821e4e93172e4f7d5ac1eade04665c3dc5049c4a Author: Roland Vossen <rvossen@broadcom.com> Date: Mon Aug 8 15:58:58 2011 +0200 staging: brcm80211: removed unused bus code from softmac Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: fix read in write_phy_regHauke Mehrtens2012-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts a unintended change mad in commit. commit 4b006b11ca18995677c5f1cd03cc9c42fbe80693 Author: Arend van Spriel <arend@broadcom.com> Date: Thu Dec 8 15:06:54 2011 -0800 brcm80211: smac: use bcma functions for register access in phy code Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: extend brcms_c_chipmatch() to also handle non PCIe devicesHauke Mehrtens2012-07-103-9/+34
| | | | | | | | | | | | | | | | | | Now brcms_c_chipmatch() is also able to handle non PCI devices and also does some checking for SoC if they are supported by brcmsmac. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: fix DMA on SoCsHauke Mehrtens2012-07-101-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These extra offsets are only needed by PCIe devices and not when running on an SoC. This partly reverts commit: commit 821e4e93172e4f7d5ac1eade04665c3dc5049c4a Author: Roland Vossen <rvossen@broadcom.com> Date: Mon Aug 8 15:58:58 2011 +0200 staging: brcm80211: removed unused bus code from softmac Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: extend xmtfifo_sz arrayHauke Mehrtens2012-07-101-1/+19
| | | | | | | | | | | | | | | | | | | | | | The xmtfifo_sz array contains the queue sizes for the different core revs. This array missed the sizes for the core rev 17 and 28. This patch extends the array to also include these sizes and adds a warning if no queue size is stored in the array for the given core rev. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: add some workarounds for other chips againHauke Mehrtens2012-07-101-42/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds some workarounds for the BCM4716, BCM47162, BCM5357 to the phy code again. This patch reverts parts of the following patch. commit c2c724977f95135f397fe0cb45f3c041d26b91e1 Author: Arend van Spriel <arend@broadcom.com> Date: Wed Jun 29 16:46:35 2011 -0700 staging: brcm80211: remove unsupported chipset code from brcmsmac phy The BCM4716 is working for me with an other firmware and I am working on adding support for the other chips. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: add a conditions for core rev 17 againHauke Mehrtens2012-07-101-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts some changes made in this commit: commit 7234592364e2efe8b4ac1040c99b1d7ef01cf502 Author: Roland Vossen <rvossen@broadcom.com> Date: Mon Feb 14 12:16:45 2011 +0100 staging: brcm80211: removal of inactive d11 code The bcm4716 has a rev 17 wireless core and this condition is needed. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove some unnessessacry casts and void pointerHauke Mehrtens2012-07-101-6/+5
| | | | | | | | | | | | Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: use chip and package id constants from bcmaHauke Mehrtens2012-07-105-37/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch depends on addin the chip IDs to bcma done in this commit in my pending patch series for bcma. Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Sun Jun 3 18:17:57 2012 +0200 bcma: add constants for chip ids Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: use core id constants from bcmaHauke Mehrtens2012-07-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch depends on adding the IDs to bcma done in this commit in my pending patch series for bcma. Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Sun Jun 3 18:17:57 2012 +0200 bcma: add constants for chip ids Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove some redundant chip common workaroundsHauke Mehrtens2012-07-101-42/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The removed workarounds are already performed in bcma_pmu_workarounds() and bcma_core_chipcommon_init() This patch depends on the completion of the workarounds in bcma done in this commit in my pending patch series for bcma. Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Mon Jun 4 00:20:26 2012 +0200 bcma: complete workaround for BCMA43224 and BCM4313 Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove si_pmu_spuravoid_pllupdate()Hauke Mehrtens2012-07-103-86/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | si_pmu_spuravoid_pllupdate() is now replaced by bcma_pmu_spuravoid_pllupdate() which does the same thing, but supports more chips. This function is in my pending patch series for bcma. Author: Hauke Mehrtens <hauke@hauke-m.de> Date: Mon Jun 4 01:31:32 2012 +0200 bcma: add bcma_pmu_spuravoid_pllupdate() Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove si_pmu_init() and si_pmu_res_init()Hauke Mehrtens2012-07-103-80/+0
| | | | | | | | | | | | | | | | This is already done by bcma_pmu_init() and bcma_pmu_resources_init() in bcma. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove ai_findcore()Hauke Mehrtens2012-07-103-31/+14
| | | | | | | | | | | | | | | | | | bcma also stores a pointer to the chipcommon core in its struct, brcmsmac should use it and not search for the core by its own. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: use container_of instead of castHauke Mehrtens2012-07-101-8/+8
| | | | | | | | | | | | | | | | | | | | Now "struct si_pub pub" does not have to be the first member in struct si_info any more, if it is the resulting code after compilation should be the same. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove ai_get_buscore{type,rev}()Hauke Mehrtens2012-07-102-19/+0
| | | | | | | | | | | | | | | | These two functions are not used any more. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove PCI_FORCEHT() macroHauke Mehrtens2012-07-101-19/+0
| | | | | | | | | | | | | | | | | | The BCM4716 is a SoC and does not have a PCI client interface, so this condition is never true. Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove PCIE() macroHauke Mehrtens2012-07-101-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of checking if there is a PCIe core on the bus, better check if hosttype is PCIe. In the original submission to staging PCIE() checked, if the bustype is PCI and the buscore is a PCIe core. Now we assume that all cores bcma supports are PCIe based, so we just have to check if the bustype is PCI. The old code bcmsmac currently uses searches for a PCIe core on the bus and if there is one assumes that this is the buscore, which is wrong. Some SoCs have a PCIe core operating in host mode and this is not the bus core. The old code also caused a null pointer in ai_get_buscoretype() and ai_get_buscorerev() if buscore was not set because there was no PCIe core on the bus. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: fix brcms_c_regd_init() which crashed after 11ad patchArend van Spriel2012-07-091-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes an OOPS in brcmsmac driver, which was introduced by the 11ad patch 'cfg80211: add 802.11ad (60gHz band) support'. The value IEEE80211_NUM_BANDS increased, which was used in the brcms_c_regd_init() function. Cc: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Cc: Johannes Berg <johannes.berg@intel.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2012-06-294-1002/+266
|\ \ | |/ | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c
| * brcmsmac: fix NULL pointer crash in brcms_c_regd_init()Arend van Spriel2012-06-221-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the function brcms_c_regd_init() the channels are validated against the device capabilities. This is done for both 2.4G and 5G band, but there are devices that are 2.4G only, ie. BCM4313. For that device this leads to a NULL dereference. This patch adds a check in brcms_c_regd_init() to fix this. Issue introduced in wireless-next tree by following commit: cf03c5d brcm80211: smac: inform mac80211 of the X2 regulatory domain Cc: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: use current regulatory domain when checking whether OFDM is ↵Seth Forshee2012-06-203-126/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | allowed The brcmsmac internal regulatory data is being used to determine whether OFDM should be allowed, and this is only done once during initialization. To be effective this needs to be checked against mac80211's regulatory rules for the current channel. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: don't validate channels against internal regulatory dataSeth Forshee2012-06-201-338/+6
| | | | | | | | | | | | | | | | | | | | | | The core regulatory support will disable channels not allowed by regulatory rules, so brcmsmac doesn't need to check whether or not the requested channel is permitted by regulatory. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: use mac80211 channel data for tx power limitsSeth Forshee2012-06-201-59/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the limits from the internal X2 domain are used, regardless of what regulatory rules are in effect. Instead use the power limits set by the higher-level regulatory support. The rules for the MIMO power limits are still always derived from the world domain, pending guidance from Broadcom as to how these need to be handled. This will be fixed later, but using the limits from the world domain works for now. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: enable/disable radio on regulatory updatesSeth Forshee2012-06-201-41/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently the radio disable state is only updated during initialization, and it's only checked against the internal world domain. This is unnecessary, as there are always valid channels against this domain. Instead, check whether any channels are enabled in the regulatory notifier and update the radio state accordingly. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: inform mac80211 of the X2 regulatory domainSeth Forshee2012-06-203-178/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | brcmsmac implements enforcement of regulatory constraints internally, using a Broadcom-specific world roaming domain named X2. Besides being duplication of functionality this can also conflict with mac80211's regulatory implementation, as mac80211 is unaware of the X2 domain and thus might apply a more restrictive domain. This patch is the first step in making brcmsmac cooperate with mac80211's regulatory support. X2 is registered as a custom domain with mac80211, so that at least both implementations will be enforcing the same set of constraints. The internal enforcement of rules is kept for now; this will be converted over to relying on mac80211 regulatory enforcement in later patches. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: clean up channel.cSeth Forshee2012-06-201-133/+5
| | | | | | | | | | | | | | | | | | | | | | | | Much of the code is either unsed or never put to any useful purpose. Remove this code in advance of reworking the driver's regulatory support. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: remove unused code for 40MHz channelsSeth Forshee2012-06-201-116/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code has been kept around in anticipation of adding support for 40MHz channels, but subsequent patches to better integrate with mac80211 regulatory support will render it completely broken. Therefore we should go ahead and remove it. Keep these changes separate from other cleanup patches in order to make it easier to resurrect 40MHz channel support at some point in the future. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: always set channel specified by mac80211Seth Forshee2012-06-201-24/+6
| | | | | | | | | | | | | | | | | | | | | | | | In some situations brcmsmac is choosing a channel internally. This makes it difficult at times to know what channel to use for enforcing regulatory constraints, so instead always use the channel from the mac80211 configuration. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: smac: don't set up tx power limits during initializationSeth Forshee2012-06-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | This code is unnecessary, and in fact it's never executed because the interface is never up when brcms_c_channels_commit() is called. Removing it helps simplify the implementation of proper regulatory support. Reviewed-by: Arend Van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Brett Rudley <brudley@broadcom.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2012-06-192-14/+5
|\ \ | |/ | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem Conflicts: drivers/net/wireless/iwlwifi/dvm/testmode.c drivers/net/wireless/iwlwifi/pcie/trans.c
| * brcmsmac: fix smatch warning found in ampdu.cArend van Spriel2012-06-131-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes potential NULL pointer dereference in ampdu. This was found running smatch static code checker. Smatch warning says: drivers/net/wireless/brcm80211/brcmsmac/ampdu.c:741 brcms_c_sendampdu() warn: variable dereferenced before check 'p' Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmsmac: remove brcms_set_hint() functionArend van Spriel2012-06-131-11/+3
| | | | | | | | | | | | | | | | | | | | The function brcms_set_hint() does not add any functionality so regulatory_hint() can be called directly. The error value has been removed from the message when regulatory_hint() fails. Reported-by: Seth Forshee <seth.forshee@canonical.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | Merge branch 'master' of ↵John W. Linville2012-06-123-4/+3
|\ \ | |/ | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
| * brcm80211: brcmsmac: fixed checkpatch and sparse warningsChris Yungmann2012-06-062-3/+2
| | | | | | | | | | | | | | Fixed checkpatch and sparse warnings related to aiutils.* Signed-off-by: Chris Yungmann <yungmann.chris@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcm80211: remove an unneeded NULL checkDan Carpenter2012-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This code causes a static checker warning because "pi" gets dereferenced before it is checked. The dereference is inside the write_phy_reg() function which is called from wlc_phy_write_txmacreg_nphy(). This code is only called from wlc_phy_init_nphy() and "pi" is a valid pointer so we can remove the check for NULL. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | wireless: Remove casts to same typeJoe Perches2012-06-062-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding casts of objects to the same type is unnecessary and confusing for a human reader. For example, this cast: int y; int *p = (int *)&y; I used the coccinelle script below to find and remove these unnecessary casts. I manually removed the conversions this script produces of casts with __force, __iomem and __user. @@ type T; T *p; @@ - (T *)p + p Neatened the mwifiex_deauthenticate_infra function which was doing odd things with array pointers and not using is_zero_ether_addr. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* brcmsmac: handle non pci in ai_deviceremoved()Hauke Mehrtens2012-05-161-0/+3
| | | | | | | | This is based on code from the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: read PCI vendor and device id only for PCI devicesHauke Mehrtens2012-05-161-6/+17
| | | | | | | | | If brcmsmac is used on non PCI(s) devices it should not try to access bus->host_pci. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* brcmsmac: do not access host_pciHauke Mehrtens2012-05-161-5/+5
| | | | | | | | | The irq number is copied from the PCIe host device to the bcma cores so just request it using the bcma core device. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
OpenPOWER on IntegriCloud