summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* wireless: regulatory for 60gVladimir Kondratiev2012-07-021-1/+4
| | | | | | | Add regulatory rule for the 60g band Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: add 802.11ad (60gHz band) supportVladimir Kondratiev2012-07-026-11/+42
| | | | | | | | | | | | Add enumerations for both cfg80211 and nl80211. This expands wiphy.bands etc. arrays. Extend channel <-> frequency translation to cover 60g band and modify the rate check logic since there are no legacy mandatory rates (only MCS is used.) Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: allow calling ieee80211_ap_probereq_get() during auth/assocEliad Peller2012-07-021-3/+10
| | | | | | | | | | | | Drivers might need getting the probe request (e.g. in order to extract the ssid) even during auth/assoc. Make ieee80211_ap_probereq_get() support it by considering auth_data/assoc_data as well. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: respect iface combinations when starting operationMichal Kazior2012-06-296-5/+52
| | | | | | | devlist_mtx locking is changed to accomodate changes. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: add channel checking for iface combinationsMichal Kazior2012-06-293-8/+88
| | | | | | | | | | | | | | | | .connect cannot be handled since the driver scans and connects on its own. It is up to the driver then to refuse a connection (with -EBUSY for example). Non-fixed channel IBSSes always take a single channel resource. For example two non-fixed channel IBSSes always take up 2 num_different_channels, even if they operate on the same channel at a given point of time. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211/mac80211: remove .get_channelMichal Kazior2012-06-294-34/+7
| | | | | | | | We do not need it anymore since cfg80211 tracks monitor channel and monitor channel type. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: set initial monitor channelMichal Kazior2012-06-291-0/+31
| | | | | | | | | | Implements behaviour seen in mac80211. A running monitor always has a channel - even before .set_channel. This way we won't break current behaviour. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: track monitor channelMichal Kazior2012-06-293-2/+18
| | | | | | | | | Make it even more obvious we support single monitor channel. This will allow us to remove .get_channel. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: refuse to .set_monitor_channel when non-monitors are presentMichal Kazior2012-06-291-0/+2
| | | | | | | | | Having .set_monitor_channel work with non-monitor interfaces running would make interface combinations accounting ambiguous. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* mac80211: refactor virtual monitor codeMichal Kazior2012-06-293-14/+17
| | | | | | | | Use cfg80211 the new .set_monitor_enabled instead of tracking it inside mac80211. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: track monitor interfaces countMichal Kazior2012-06-294-0/+47
| | | | | | | | | | | | | | | | | | | | | Implements .set_monitor_enabled(wiphy, enabled). Notifies driver upon change of interface layout. If only monitor interfaces become present it is called with 2nd argument being true. If non-monitor interface appears then 2nd argument is false. Driver is notified only upon change. This makes it more obvious about the fact that cfg80211 supports single monitor channel. Once we implement multi-channel we don't want to allow setting monitor channel while other interface types are running. Otherwise it would be ambiguous once we start considering num_different_channels. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: introduce cfg80211_get_chan_stateMichal Kazior2012-06-292-0/+63
| | | | | | | | | | | | Helper function for finding out which channel is used by a given interface. An exclusive channel can be used only by a single interface. This is mainly for non-fixed channel IBSS handling. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: track ibss fixed channelMichal Kazior2012-06-292-0/+3
| | | | | | | | | IBSS may hop between channels. It is necessary to account this special case when considering interface combinations. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: add channel tracking for AP and meshMichal Kazior2012-06-295-5/+22
| | | | | | | | | | | | | | | | We need to know which channel is used by a running AP and mesh for channel context accounting and finding matching/active interface combination. STA/IBSS have current_bss already which allows us to check which channel a vif is tuned to. Non-fixed channel IBSS can be handled with additional changes. Monitor mode is going to be handled differently. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: .stop_ap when interface is going downMichal Kazior2012-06-292-0/+6
| | | | | | | | | | We'll need this for proper channel tracking (which is going to be needed for channel context accounting and finding matching/active interface combination). Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* cfg80211: introduce cfg80211_stop_apMichal Kazior2012-06-294-17/+50
| | | | | | | | | This functionality will be reused when interface is going down. Avoids code duplication. Also adds missing wdev locking. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
* Merge remote-tracking branch 'wireless-next/master' into mac80211-nextJohannes Berg2012-06-28237-9277/+12779
|\
| * ath9k: Fix compilation breakageSujith Manoharan2012-06-271-0/+2
| | | | | | | | | | | | | | | | Wrap the MCI-work canceling with CONFIG_ATH9K_BTCOEX_SUPPORT. Reported-by: Emmanuel Benisty <benisty.e@gmail.com> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: fix sparse warning introduced with checkdied patchArend van Spriel2012-06-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The commit "brcmfmac: introduce checkdied debugfs functionality" also introduced a sparse warning: ..../brcmfmac/dhd_sdio.c:3147:45: sparse: cast to restricted __le32 This patch fixes this sparse warning. Reported-by: Fengguang Wu <wfg@linux.intel.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: add BCM4334 supportFranky Lin2012-06-274-0/+22
| | | | | | | | | | | | | | | | | | BCM4334 is a dualband a/b/g/n WiFi chip support 20MHz/40MHz channels. This patch adds support for its SDIO interface. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: reduce allocations needed during nvram data downloadArend van Spriel2012-06-271-31/+17
| | | | | | | | | | | | | | | | | | | | | | | | The nvram data is preprocessed before being sent to the device and just before sending an additional allocation was done that assured word alignment of the data. This has moved to the preprocessing step to reduce allocations and subsequent copying of the nvram data. Reviewed-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: use firmware data buffer directly for nvramFranky Lin2012-06-271-67/+30
| | | | | | | | | | | | | | | | | | | | The nvram file could be parsed directly in the data buffer in the firmware structure passed by request_firmware function. This patch gets rid of the redundant memcpy. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: move glom alignment setting to SDIO bus layerFranky Lin2012-06-272-13/+15
| | | | | | | | | | | | | | | | | | txglomming alignment is a SDIO bus specific feature. It is more appropriate to place it in SDIO bus layer instead of common layer. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: restrict dongle txglom disable to old SDIO coreFranky Lin2012-06-272-6/+15
| | | | | | | | | | | | | | | | | | | | txglomming is a firmware feature for sdio bus interface. For SDIO device cores newer than revision 11, the default setting of firmware should be used instead of disabling it from the host side. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * brcmfmac: add support for bus specific data commandFranky Lin2012-06-273-0/+26
| | | | | | | | | | | | | | | | | | | | brcmfmac need to support data command setting for dongle's bus core. A list must be placed at brcmf_bus structure before calling brcmf_bus_start in order to be sent by brcmf_c_preinit_dcmds. Reviewed-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * bcma: define some additional cores IDsRafał Miłecki2012-06-272-0/+13
| | | | | | | | | | | | | | | | Some of them are BCM4706 specific AFAWK. Most of them was confirmed on Netgear WNDR450. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
| * Merge branch 'wl12xx-next' into for-linvilleLuciano Coelho2012-06-2622-475/+1257
| |\
| | * wlcore: print stack trace in every recoveryEyal Shapira2012-06-262-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As recovery queuing can now occur from multiple code paths it's convenient to know what triggered it in all cases other than an intended recovery which is part of the switch between single role to multi role. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: queue recovery in case of bus errors during cmd_remove_peerEyal Shapira2012-06-261-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Following the addition of propagating errors from the bus ops there's a need to distinguish between bus errors (including timeout) and a legitimate timeout occuring in cmd_wait_for_event_or_timeout. In case of real bus errors we need to queue recovery even in cases where a timeout on a response from the FW to a command is acceptable. Reported-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: fix broken TX due to wrong queuing of recoveryEyal Shapira2012-06-261-11/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 14bba17b "wl12xx: Propagate errors from wl1271_raw_write32" breaks down TX in certain scenarios. wl1271_irq_locked() propagates errors from wl1271_tx_work_locked however it may return -EBUSY when the FW queues are full which is a legitimate case and not a a real error. In this case a recovery is triggered by wl1271_irq and this keeps repeating itself so TX is completely broken. Fix it by avoiding propagating return values as errors even if they aren't. Only bus (SDIO or SPI) ops failures would be progagated as only these should trigger recovery. Signed-off-by: Eyal Shapira <eyal@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: fix some failure cases in wlcore_probe()Luciano Coelho2012-06-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | We need to release the IRQ if hw_info() or identify_chip() fails. And we need unregister the HW with mac80211 if there are any failures after it's registered. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wl18xx: deprecate PG1 supportLuciano Coelho2012-06-262-57/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | The new PG2 version of the chip has a few differences in terms of FW API if compared to PG1. PG1 is just a sample that shouldn't be used in real life, so to avoid having to handle both separately, mark the PG1 version as deprecated and bail out during probe. Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: prevent recovery in the middle of resumeArik Nemtsov2012-06-231-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Take the mutex early in the resume handler and use the locked version of the IRQ routine. This ensures any recoveries queued will only take place after resume has fully completed. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: refactor threaded IRQ routineArik Nemtsov2012-06-231-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Separate the threaded IRQ handling routine into two functions. The outer function takes the mutex and calls recovery on errors. It also performs a Tx-path optimization to avoid redundant works. The inner function is simplified - all calls to recovery are removed and it assumes the lock is taken. The locked variant will be reused elsewhere. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: check Rx-filter functions in the suspend pathArik Nemtsov2012-06-233-10/+30
| | | | | | | | | | | | | | | | | | | | | | | | Propagate some missing return values for Rx-filter related functions. This and makes sure we always fail the suspend in case of SDIO errors. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: force recovery on resume if suspended without recoveringArik Nemtsov2012-06-231-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If an error is detected after mac80211 is already suspended, the recovery work will not be queued. This will leave the driver in a bad state on resume. Detect this in the resume op and re-queue a recovery. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: don't allow SDIO read/writes after failureArik Nemtsov2012-06-232-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a flag and after the first read/write failure is encountered. This flag will disallow further SDIO read/writes until op_stop() is executed, which will clear all flags. This prevents further errors from occurring, since one error usually indicates that IO operations won't work anymore until the chip is rebooted. By blocking more calls, we avoid extra timeouts and having to wait for them to occur. [Added second paragraph explaining why the change is needed. -- Luca] Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: cancel suspend when recovery is pendingArik Nemtsov2012-06-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | We wish to postpone suspend if recovery is pending. This will make sure the FW is in a good state and perform wowlan wakeup. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: access the firmware memory via debugfsArkady Miasnikov2012-06-221-0/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications running in the user space needs access to the memory of the chip. Examples of such access - read/write global variables - access to firmware log - dump memory after firmware panic event Arbitrary 4-bytes aligned location can be accessed by read/write file wlcore/mem [Check return value of wlcore_raw_read/write and wlcore_set_partition calls as required by the recent IO changes. -- Luca] Signed-off-by: Arkady Miasnikov <a-miasnikov@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Force checking of io functions' return valuesIdo Yariv2012-06-226-40/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | All io functions' return values should be propagated and handled. Add a __must_check annotation to verify that the return values are checked and to avoid future mistakes. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wl1271_read_hwaddrIdo Yariv2012-06-222-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors from wl1271_read_hwaddr. This function is only used when reading the FW log (following a recovery), so don't read the FW log in case of a bus error. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wl1271_raw_write32Ido Yariv2012-06-2213-127/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors from wl1271_raw_write32 and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wl1271_raw_read32Ido Yariv2012-06-229-113/+309
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors from wl1271_raw_read32. Since the read functions had no way of returning errors in-band, change their prototypes. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wl1271_writeIdo Yariv2012-06-2212-46/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors from wl1271_write and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wl1271_readIdo Yariv2012-06-2212-32/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Propagate errors from wl1271_read and request for recovery when appropriate. Also rename prefixes of wlcore functions which their prototypes had to be changed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Propagate errors from wlcore_raw_*_data functionsIdo Yariv2012-06-222-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wlcore_raw_read_data is called when the FW status is read which happens while handling interrupts and when the FW log is read following a recovery. Request a recovery in the former case, and don't read the FW log in case the FW status read failed. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Change raw io functions to return errorsIdo Yariv2012-06-221-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make wl1271_raw_write and wl1271_raw_read return errors so the driver could handle these appropriately. Since the prototype has changed, also rename the prefix of these functions to wlcore. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Change read/write ops to return errorsIdo Yariv2012-06-223-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While bus operations may fail, either due to HW or FW issues, these are never propagated to higher layers. As a result, the core driver has no way of knowing that the operations failed, and will only recover if high level logic requires it (e.g. no command completion). Change read/write bus operations to return errors to let higher layer functionality handle these. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Disable interrupts while recoveringIdo Yariv2012-06-223-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case a recovery is initiated, the FW can no longer be trusted, and the driver should not handle any new FW events. Disable the interrupt handler when a recovery is scheduled and balance it back in the op_stop callback. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| | * wlcore: Fix sdio out-of-sync power stateIdo Yariv2012-06-222-17/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wl12xx_sdio_power_off() manually powers down the card regardless of the runtime pm state. If wl12xx_sdio_power_on() is called before the card was suspended by runtime PM, it will not power up the card. As part of the HW detection, the chip's power is toggled. Since this happens in the context of probing sdio, the power reference counter will be higher than zero. As a result, when wl12xx_sdio_power_off() is called, the chip will be powered down while still having a positive power reference counter. If the interface is quickly activated, the driver might try to transfer data to a powered off chip. Fix this by ensuring that wl12xx_sdio_power_on() explicitly powers on the chip in case runtime pm claims the chip is already powered on. To avoid cases in which it is not possible to determine if the chip was really powered on (card's power reference counter is positive), operate on the mmc_card instead of the function. Also verify that the chip is indeed powered on before powering off, to avoid wrong reference counter values in error cases. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
OpenPOWER on IntegriCloud