Commit Graph

301335 Commits

Author SHA1 Message Date
Avinash Patil 12190c5d80 mwifiex: add cfg80211 start_ap and stop_ap handlers
1. add start AP and stop AP handlers
2. support for parsing ssid, beacon period, DTIM period
from beacon_parameters structure and setting it to FW.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:36 -04:00
Avinash Patil 9b930eaed9 mwifiex: common set_wiphy_params cfg80211 handler for AP and STA interface
Add support for setting fragmentation threshold, RTS threshold
and retry limit.
Since wiphy parameters are properties of physical device,
appropriate function to set phy parameters is invoked depending
upon bss_type(STA or AP) for each virtual interface.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 4f02341ac2 mwifiex: handle interface type changes correctly
mlan0: managed or ibss
The iftype can be changed from STATION to ADHOC, and vice versa.

uap0: AP only
The iftype cannot be changed.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 26134e6eb5 mwifiex: stop BSS in deauthentication handling
While in AP mode, we should stop BSS in deauthentication handler.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 4db16a18c2 mwifiex: add AP command sys_config and set channel
1. support for AP sys_config command and added parsing of channel
information.
2. support for setting AP channel from cfg80211 set_channel handler

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 40d0703062 mwifiex: add bss start and bss stop commands for AP
1. separate file for preparing uAP command buffer
2. definition of bss_start and bss_stop commands being sent to
firmware

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 75edd2c680 mwifiex: append peer mac address TLV in key material command to firmware
Modify key related cfg80211 handlers to copy peer mac address for
pairwise keys. If peer mac address is not present or group keys,
it will be sent as broadcast mac address.
This would be required since hostapd downloads per peer PTK.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:35 -04:00
Avinash Patil 67fdf39e0b mwifiex: save adapter pointer in wiphy_priv
Since wiphy structure is per adapter we would save adapter,
instead of mwifiex private pointer, in wiphy_priv.
Also move country_info from mwifiex_private to mwifiex_adapter
as making it part of mwifiex_adapter looks logical.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:34 -04:00
Avinash Patil cd8440dabc mwifiex: multi-interface support for mwifiex
mwifiex supports STA and AP interfaces which use same phy.
Indicate this to cfg80211.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:34 -04:00
Avinash Patil d6bffe8bb5 mwifiex: support for creation of AP interface
1. wiphy structure is per device; hence moved it to mwifiex_adapter
mwifiex_register_cfg80211 takes mwifiex_adapter as parameter.
This function only registers wiphy with cfg80211.
2. Creation of interfaces is moved to cfg80211 add_virtual_interface
handler.
3. Create 2 interfaces by default: station and AP

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:34 -04:00
Avinash Patil 03785387e1 mwifiex: handle station specific commands on STA interface only
Commands like IBSS coalescing status, power save, 11D should be
handled only when bss_type is STA.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:34 -04:00
Avinash Patil 64b05e2f46 mwifiex: allocate space for one more mwifiex_private structure
Reserve space for one more priv structure.
This will be used by AP interface.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:34 -04:00
Bjorn Helgaas dfcfb545d7 b43: use pci_is_pcie() instead of obsolete pci_dev.is_pcie
Use pci_is_pcie() instead of looking at obsolete is_pcie field in
struct pci_dev.

CC: Stefano Brivio <stefano.brivio@polimi.it>
CC: b43-dev@lists.infradead.org
CC: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:33 -04:00
Johannes Berg 2615f3759b cfg80211: add warning when calculating MCS rates >= 32
cfg80211_calculate_bitrate() doesn't work for MCS
rates 32 or higher, and it has always returned 0
in that case. Warn if it ever really happens.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:33 -04:00
Johannes Berg 4472037be8 cfg80211: remove double prototype
cfg80211_calculate_bitrate() is defined in the external
header file cfg80211.h now, so no need to keep it in
the internal one as well.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:33 -04:00
Cristian Chilipirea c4f6084623 Net: wireless: core.c: fixed checkpatch warnings
Fixed some checkpatch warnings.

Signed-off-by: Cristian Chilipirea <cristian.chilipirea@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:32 -04:00
Johannes Berg 9e73dee7d3 mac80211: fix TX aggregation session timer
In commit 12d3952fc4
("mac80211: optimize aggregation session timeout handling")
two bugs were introduced:
 1) RCU usage was completely broken since no locks are held
 2) the timer must not rearm when agg session is stopping

Reported-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Johannes Berg a9d3c05cca mac80211: fix single queue drivers
My queue management rework broke drivers that don't
have multiple AC queues and register a single queue
only, causing a warning:

WARNING: at net/mac80211/iface.c:162 ieee80211_check_queues

This was due to filling the queues wrongly and then
noticing the error when checking later.

Reported-and-Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Nathan Hintz 044e68c0cd bcma: Add flush for BCMA_RESET_CTL write
Adds a missing read to flush the previous write (per the Broadcom SDK).

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Nathan Hintz 16d75faed9 bcma: Add __devexit to bcma_host_pci_remove
Add missing __devexit attribute to bcma_host_pci_remove.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Nathan Hintz c61cab3a61 bcma: reads/writes are always 4 bytes, so always map 4 bytes
Modify ioremap_nocache calls to reflect the number of bytes read/written.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Nathan Hintz 4acabf454a bcma: Account for variable PCI memory base/size
PCI Memory Resource start address and size are variable, dependent on
the H/W configuration.  Modify the computation of io_map_base to use the
computed values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:04 -04:00
Nathan Hintz 5fe2e0711d bcma: Move initialization of SPROM to prevent overwrite
The first thing bcm47xx_fill_sprom does is initialize (zero fill) the SPROM.  For
BCMA SOC, this wipes out any values previously read by bcm47xx_fill_sprom_ethernet
(see arch/mips/bcm47xx/setup.c - bcm47xx_get_sprom_bcma).  Move the initialization
of SPROM so it is called prior to filling in any values.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:46:03 -04:00
Nathan Hintz 82a7c2bb5f bcma: Find names of non BCM cores
bcma_device_name only provides names for Broadcom cores.  Modify logic to
provide names for MIPS and ARM cores as well.

Signed-off-by: Nathan Hintz <nlhintz@hotmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:45:26 -04:00
Hauke Mehrtens 22291cea07 brcmsmac: handle non pci in ai_deviceremoved()
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>
2012-05-16 12:45:26 -04:00
Hauke Mehrtens a06f210991 brcmsmac: read PCI vendor and device id only for PCI devices
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>
2012-05-16 12:45:26 -04:00
Hauke Mehrtens 00bcda4004 brcmsmac: do not access host_pci
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>
2012-05-16 12:45:26 -04:00
Hauke Mehrtens 270e38d008 brcmsmac: remove nicpci.c
There is no code doing anything useful in nicpci.c anymore, so remove
it.

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>
2012-05-16 12:45:25 -04:00
Hauke Mehrtens c496fe3a7f brcmsmac: remove pcicore_fixcfg()
This is now done in bcma by bcma_core_pci_fixcfg().

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>
2012-05-16 12:45:25 -04:00
Hauke Mehrtens 2ffd795a5e brcmsmac: remove pcie_extendL1timer()
This is now done by calling bcma_core_pci_extend_L1time()

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>
2012-05-16 12:45:25 -04:00
Hauke Mehrtens 60dda6c0d2 brcmsmac: remove pcicore_find_pci_capability()
This function is now unreferenced

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>
2012-05-16 12:45:25 -04:00
Hauke Mehrtens 9a1fcffa66 brcmsmac: remove pcicore_attach()
This is already done by bcma in bcma_pcicore_serdes_workaround().

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>
2012-05-16 12:45:25 -04:00
Hauke Mehrtens 712e3c1f33 brcmsmac: remove _ai_clkctl_cc()
This is now done by calling bcma_core_set_clockmode()

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>
2012-05-16 12:45:24 -04:00
Hauke Mehrtens fa0b823b17 brcmsmac: remove ai_gpiocontrol()
This is now done by calling bcma_chipco_gpio_control().

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>
2012-05-16 12:45:24 -04:00
Hauke Mehrtens 763997f61d brcmsmac: remove ai_chipcontrl_epa4331
ai_chipcontrl_epa4331 is not referenced by any method in brcmsmac and
the functionality is already in bcma_chipco_bcm4331_ext_pa_lines_ctl in
drivers/bcma/driver_chipcommon_pmu.c

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>
2012-05-16 12:45:24 -04:00
Hauke Mehrtens b30ee75440 brcmsmac: remove ai_pci_setup()
This is now done by calling bcma_core_pci_irq_ctl()

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>
2012-05-16 12:45:24 -04:00
Hauke Mehrtens 63286295e6 brcmsmac: remove pcicore_hwup()
This is now done by bcma_core_pci_config_fixup() in drivers/bcma/driver_pci.c

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>
2012-05-16 12:45:24 -04:00
Hauke Mehrtens 23c8ae8d8c brcmsmac: remove PCIe functions needed for PCIe core rev <= 10
The devices I know of are not using a PCIe core with rev <= 10. The
BCM4718 uses a PCIe core with revision 14 and the BCM43224 uses a PCIe
core with revision 15. This patch removes support for old PCIe core
versions, which are not found on devices supported by brcmsmac.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens 5d661a740a brcmsmac: remove references to PCI
There are no devices which are using bcma and have a PCI bus, just a
PCIe bus or something else. bcma does not support PCI devices, so lets
also remove PCI support from brcmsmac. All devices currently supported
by brcmsmac are PCIe based.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens d43c1c5261 brcmsmac: remove support for cc rev < 20
The lowest chip common version used on bcma based devices is 31 on the
bcm4718 and 32 on the bcm4313, bcm43224, and bcm43225, so the support
for the old versions could be removed.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens 1928ad71f2 brcmsmac: get board and chip info from bcma
bcma now provide this data and brcmsmac should get it from there and
not parse it by its self.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens 47671b1a16 brcmsmac: remove brcmsmac own sprom parsing
brcmsmac now takes the sprom from bcma and do not uses its own sprom
parsing any more. Remove this code as it is not used any more.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens 898d3c3b24 brcmsmac: use sprom from bcma
bcma now provides all sprom attributes needed by brcmsmac and also
parses them from the pci sprom ant otp.

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>
2012-05-16 12:45:23 -04:00
Hauke Mehrtens 2b2715b83c bcma: add bcma_core_pci_config_fixup()
This code is based on code from pcie_misc_config_fixup() in brcmsmac.
This patch is part of the move of pci specific code from brcmsmac to
bcma.

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>
2012-05-16 12:45:22 -04:00
Hauke Mehrtens ec00f37321 bcma: add bcma_core_pci_fixcfg()
This code is based on code from pcicore_fixcfg() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

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>
2012-05-16 12:45:22 -04:00
Hauke Mehrtens 29f6b3d823 bcma: add bcma_core_pci_extend_L1timer
This code is based on code from pcie_extendL1timer() in brcmsmac. This
patch is part of the move of pci specific code from brcmsmac to bcma.

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>
2012-05-16 12:45:22 -04:00
Hauke Mehrtens 0b2948eeb1 bcma: implement setting core clock mode to dynamic
This patch is based on code from _ai_clkctl_cc() in brcmsmac.

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>
2012-05-16 12:45:22 -04:00
Hauke Mehrtens e2da4bd3ec bcma/ssb: parse new attributes from sprom
These newly added attributes are used by brcmsmac. Now bcma should
parse all attributes used by brcmsmac out of the sprom.

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>
2012-05-16 12:45:22 -04:00
Hauke Mehrtens 432c4d1eef bcma: read out some additional sprom attributes
This code is copied from the ssb sprom read code. These attributes are
partly used by b43 and brcmsmac and should also be read out on bcma
based devices.

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>
2012-05-16 12:45:21 -04:00
Hauke Mehrtens 673335c8f0 ssb: fill board_rev attribute from sprom
This attribute is now used in b43 driver and should be filled for all
sprom versions.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16 12:45:21 -04:00