summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-05-16Net: wireless: core.c: fixed checkpatch warningsCristian Chilipirea1-2/+2
Fixed some checkpatch warnings. Signed-off-by: Cristian Chilipirea <cristian.chilipirea@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16mac80211: fix TX aggregation session timerJohannes Berg1-2/+8
In commit 12d3952fc4a1cd96234bc7023bf7eefeb0bb6355 ("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-16mac80211: fix single queue driversJohannes Berg1-1/+3
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-16bcma: Add flush for BCMA_RESET_CTL writeNathan Hintz1-0/+1
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-16bcma: Add __devexit to bcma_host_pci_removeNathan Hintz1-2/+2
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-16bcma: reads/writes are always 4 bytes, so always map 4 bytesNathan Hintz1-3/+3
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-16bcma: Account for variable PCI memory base/sizeNathan Hintz1-2/+2
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-16bcma: Move initialization of SPROM to prevent overwriteNathan Hintz2-2/+4
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-16bcma: Find names of non BCM coresNathan Hintz1-14/+40
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-16brcmsmac: handle non pci in ai_deviceremoved()Hauke Mehrtens1-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>
2012-05-16brcmsmac: read PCI vendor and device id only for PCI devicesHauke Mehrtens1-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>
2012-05-16brcmsmac: do not access host_pciHauke Mehrtens1-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>
2012-05-16brcmsmac: remove nicpci.cHauke Mehrtens6-330/+0
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-16brcmsmac: remove pcicore_fixcfg()Hauke Mehrtens5-37/+0
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-16brcmsmac: remove pcie_extendL1timer()Hauke Mehrtens2-75/+3
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-16brcmsmac: remove pcicore_find_pci_capability()Hauke Mehrtens2-66/+0
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-16brcmsmac: remove pcicore_attach()Hauke Mehrtens3-155/+0
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-16brcmsmac: remove _ai_clkctl_cc()Hauke Mehrtens3-59/+31
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-16brcmsmac: remove ai_gpiocontrol()Hauke Mehrtens4-13/+2
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-16brcmsmac: remove ai_chipcontrl_epa4331Hauke Mehrtens2-25/+0
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-16brcmsmac: remove ai_pci_setup()Hauke Mehrtens3-29/+2
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-16brcmsmac: remove pcicore_hwup()Hauke Mehrtens3-32/+0
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-16brcmsmac: remove PCIe functions needed for PCIe core rev <= 10Hauke Mehrtens5-256/+9
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-16brcmsmac: remove references to PCIHauke Mehrtens5-161/+6
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-16brcmsmac: remove support for cc rev < 20Hauke Mehrtens2-99/+11
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-16brcmsmac: get board and chip info from bcmaHauke Mehrtens1-35/+5
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-16brcmsmac: remove brcmsmac own sprom parsingHauke Mehrtens10-1749/+0
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-16brcmsmac: use sprom from bcmaHauke Mehrtens8-323/+179
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-16bcma: add bcma_core_pci_config_fixup()Hauke Mehrtens2-0/+22
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-16bcma: add bcma_core_pci_fixcfg()Hauke Mehrtens2-0/+24
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-16bcma: add bcma_core_pci_extend_L1timerHauke Mehrtens2-2/+16
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-16bcma: implement setting core clock mode to dynamicHauke Mehrtens1-1/+1
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-16bcma/ssb: parse new attributes from spromHauke Mehrtens3-4/+194
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-16bcma: read out some additional sprom attributesHauke Mehrtens1-0/+76
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-16ssb: fill board_rev attribute from spromHauke Mehrtens2-0/+3
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-16ssb/bcma: fill attribute alpha2 from spromHauke Mehrtens3-6/+14
The attribute country_code and alpha2 are two different attributes in the sprom. country_code contains some code in an 8 bit coding and alpha2 contains two chars with the country code. The attributes where read out wrongly in the past and country_code is only available on sprom version 1. 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-16MIPS: bcm47xx: read baordrev without prefix from spromHauke Mehrtens1-0/+2
When the boardrev with a prefix is not available, try to read it without a prefix. This is based on code from the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16bcma: add boardinfo structHauke Mehrtens6-3/+29
This struct contains information about the board, the chip is running on. The struct is filled for PCIe devices and SoCs. This information is used by b43 and will be used by brcmsmac soon. 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-16MIPS: bcm47xx: refactor fetching board dataHauke Mehrtens3-6/+18
Now the fetching of board data also uses nvram_read_u16 and not simple_strtoul any more. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-16ssb: remove rev from boardinfoHauke Mehrtens8-15/+11
Previously the rev contained the revision read from the pci config space and was used as board_rev in the wireless drivers. This is wrong the board_rev is only fetched from the sprom accordingly to the open source part of the Broadcom SDK and brcmsmac. This patch removes the rev from the boardinfo structure and uses the board_rev attribute from sprom instead. This attribute is filled by PCI, PCMCIA, SDIO and SoC code. 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-16Merge branch 'for-linville' of git://github.com/kvalo/ath6klJohn W. Linville13-178/+455
2012-05-15wlcore/wl12xx: implement better beacon loss handlingBartosz.Markowski@tieto.com4-17/+51
Make use of REGAINED_BSS_EVENT and instead of reporting connection loss immediately on each BEACON_LOSE event, try if not regained in reasonable period of time. Signed-off-by: bartosz.markowski <bartosz.markowski@tieto.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: fix size of two memset's in wl1271_cmd_build_arp_rsp()Jesper Juhl1-2/+2
We currently do this: int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif) ... struct wl12xx_arp_rsp_template *tmpl; struct ieee80211_hdr_3addr *hdr; ... tmpl = (struct wl12xx_arp_rsp_template *)skb_put(skb, sizeof(*tmpl)); memset(tmpl, 0, sizeof(tmpl)); ... hdr = (struct ieee80211_hdr_3addr *)skb_push(skb, sizeof(*hdr)); memset(hdr, 0, sizeof(hdr)); ... I believe we want to set the entire structures to 0 with those memset() calls, not just zero the initial part of them (size of the pointer bytes). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wireless: TI wlxxx depends on MAC80211Randy Dunlap2-1/+2
wl12xx build fails with many undefined symbol errors when MAC80211 and CFG80211 are not enabled, so make WLCORE and WL12XX depend on MAC80211 (which already depends on CFG80211). Here are a few of the many build errors: drivers/built-in.o: In function `wl1271_register_hw': main.c:(.text+0x4197cd): undefined reference to `ieee80211_register_hw' drivers/built-in.o: In function `wl1271_rx_streaming_timer': main.c:(.text+0x419818): undefined reference to `ieee80211_queue_work' drivers/built-in.o: In function `wl1271_flush_deferred_work': main.c:(.text+0x419910): undefined reference to `ieee80211_rx' main.c:(.text+0x419938): undefined reference to `ieee80211_tx_status' drivers/built-in.o: In function `wl12xx_op_channel_switch': main.c:(.text+0x419afc): undefined reference to `ieee80211_chswitch_done' drivers/built-in.o: In function `wl1271_ssid_set': drivers/built-in.o: In function `wl1271_event_process': event.c:(.text+0x41fec4): undefined reference to `ieee80211_sched_scan_stopped' event.c:(.text+0x41ff88): undefined reference to `ieee80211_cqm_rssi_notify' event.c:(.text+0x42000d): undefined reference to `ieee80211_stop_rx_ba_session' event.c:(.text+0x420048): undefined reference to `ieee80211_stop_rx_ba_session' event.c:(.text+0x4200b8): undefined reference to `ieee80211_chswitch_done' event.c:(.text+0x4201ae): undefined reference to `ieee80211_find_sta' event.c:(.text+0x4201ba): undefined reference to `ieee80211_report_low_ack' event.c:(.text+0x42021b): undefined reference to `ieee80211_connection_loss' drivers/built-in.o: In function `wl1271_tx_complete_packet': tx.c:(.text+0x4206a6): undefined reference to `ieee80211_get_hdrlen_from_skb' drivers/built-in.o: In function `wl1271_tx_fill_hdr': tx.c:(.text+0x4208ca): undefined reference to `ieee80211_hdrlen' drivers/built-in.o: In function `wl1271_handle_tx_low_watermark': (.text+0x420e25): undefined reference to `ieee80211_wake_queue' drivers/built-in.o: In function `wl12xx_rearm_rx_streaming': (.text+0x420ed9): undefined reference to `ieee80211_queue_work' drivers/built-in.o: In function `wl1271_tx_work_locked': (.text+0x421008): undefined reference to `ieee80211_free_txskb' drivers/built-in.o: In function `wl1271_rx_status.clone.2': rx.c:(.text+0x421593): undefined reference to `ieee80211_channel_to_frequency' drivers/built-in.o: In function `wl1271_ps_filter_frames': ps.c:(.text+0x421a41): undefined reference to `ieee80211_tx_status' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Cc: Luciano Coelho <coelho@ti.com> Cc: linux-wireless@vger.kernel.org Cc: "John W. Linville" <linville@tuxdriver.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: fixup an allocationDan Carpenter1-1/+3
GFP_DMA isn't supposed to be used by itself. This allocation is allowed to sleep so it should be ORing it with GFP_KERNEL. Also we should check for allocations errors. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: release lock on error in wl1271_op_suspend()Dan Carpenter1-0/+1
We should release this lock before returning. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wl12xx: support wowlan wakeup patternsEyal Shapira2-7/+211
Use FW RX data filters to support cfg80211 wowlan wakeup patterns. This enables to wake up the host from suspend following detection of certain configurable patterns within an incoming packet. Up to 5 patterns are supported. Once the host is resumed any configured RX data filter is cleared. A single pattern can match several bytes sequences with different offsets within a packet. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: add RX filters driver state mgmt functionsEyal Shapira3-0/+43
More prep work to support wowlan wakeup patterns. Added some wrappers that also keep the current filters state updated in the driver. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wl12xx: add RX filters ACX commandsEyal Shapira3-0/+110
More prep work for wowlan patterns. Added ACXs to set global RX filter behavior and enable or disable a specific filter. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
2012-05-15wlcore: add RX filters util functionsEyal Shapira2-0/+106
This is prep work for the support of wowlan patterns using the FW data rx filters mechanism. Added an rx filter struct and some util functions required to manipulate it. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>