summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-11NFC: pn533: Keep cmd context in pn533 structWaldemar Rymarkiewicz
Keep cmd context in pn533 struct instead of only cmd code. The context already includes cmd_code. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Optimise issued cmd context trackingWaldemar Rymarkiewicz
Use struct pn533_cmd instead of pn533_send_async_complete_arg to track the context of the issued cmd. This way pn533_send_async_complete_arg struct is no needed anymore. Just move issuer complete callback to pn533_cmd struct. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Fix memleak while scheduling next cmdWaldemar Rymarkiewicz
In case of error from __pn533_send_frame_async() while sending next cmd from the queue (cmd_wq), cmd->req, cmd->resp and cmd->arg pointers won't be freed. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Rename pn533_fw_reset appropriatelyWaldemar Rymarkiewicz
Define explicitely it is Pasori specific reset command. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Update copyrights noteWaldemar Rymarkiewicz
Remove duplicated authors info from the header as well. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Fix div by zero while stopping pollingWaldemar Rymarkiewicz
Depends on timing division by zero can happen when user stops polling. pn533_stop_poll() resets modulation counter on stop_poll, but meanwhile we get response for last poll request and try, despite of stop poll request, to schedule next modulation for polling. Log message: [345.922515] pn533 1-1.3:1.0: pn533_stop_poll [345.928314] pn533 1-1.3:1.0: pn533_send_ack [345.932769] pn533 1-1.3:1.0: Received a frame. [345.937438] PN533 RX: 00 00 ff 03 fd d5 4b 00 e0 00 [345.942840] pn533 1-1.3:1.0: pn533_poll_complete [345.947753] pn533 1-1.3:1.0: pn533_start_poll_complete [345.953186] Division by zero in kernel. [345.957244] [<c001b38c>] (unwind_backtrace+0x0/0xf0) [345.965698] [<c0260e78>] (Ldiv0+0x8/0x10) [345.974060] [<c0260e60>] (__aeabi_idivmod+0x8/0x18) [345.983978] [<c02e0064>] (pn533_poll_complete+0x3c0/0x500) [345.994903] [<c02df690>] (pn533_send_async_complete+0x7c/0xc0) [346.005828] [<c02e028c>] (pn533_wq_cmd_complete+0x1c/0x34) [346.016113] [<c005d134>] (process_one_work+0x1ac/0x57c) [346.025848] [<c005d85c>] (worker_thread+0x168/0x42c) [346.034576] [<c00620c0>] (kthread+0xa4/0xb0) Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Print out response status bits in hexWaldemar Rymarkiewicz
For better debugging as the codes are defined in hex in the spec. Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Reword all std frame logic functWaldemar Rymarkiewicz
Signed-off-by: Waldemar Rymarkiewicz <waldemar.rymarkiewicz@tieto.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Add support in getsockopt for RW, LTO, and MIU remote parametersThierry Escande
Useful for LLCP validation tests. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Reset RW, LTO, and MIU remote parameters when link goes downThierry Escande
This resets remote parameters in both local and socket llcp structures when the link goes down. That way, nfc_llcp_getsockopt won't return values corresponding to the previous link parameters. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Use localy stored remote_miu value if not set at socket levelThierry Escande
If remote_miu value is not set in the socket (i.e. connection-less socket) the value stored in the local is used. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Aggregated frames supportThierry Escande
This adds support for AGF PDUs. For each PDU contained in the AGF, a new sk_buff is allocated and dispatched to its corresponding handler. Signed-off-by: Thierry Escande <thierry.escande@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Fix zero octets length SDU handlingOlivier Guiter
LLCP Validation test #2 (Connection-less information transfer) send a service data unit of zero octets length. This is now handled correctly. Signed-off-by: Olivier Guiter <olivier.guiter@linux.intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Fall back to local values when getting socket optionsSamuel Ortiz
If a socket option has not been set by the user, fall back to the LLCP local ones. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: llcp: Socket miux is a big endian fieldSamuel Ortiz
The MIUX must be transmitted in big endian and as such we have to convert it properly. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-11NFC: pn533: Use dynamic debug for pn533 hex dumpsSamuel Ortiz
Those can be very verbose and we only want them when debugging pn533. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2013-04-10ipw2x00: move to kstrto* functionsAndy Shevchenko
There is better to use kstrto* instead of simple_strtoul. In this case it applies a bit stricter rules for input as well. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rtlwifi: rtl8188ee: Fix loop that ends earlyLarry Finger
In routine _rtl8188e_read_power_value_fromprom(), there are loops initializing index_cck_base and index_bw40_base from the PROM. As the result of a typo, the second loop is ended one element too soon. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k: implement buffer holding handling for EDMA FIFOFelix Fietkau
Inside one FIFO slot queue, EDMA chipsets have the same link pointer re-read race condition as older chipsets, so the same buffer holding logic needs to be used in order to avoid use-after-free bugs. Unlike on older chips, it can be skipped for the end of the queue. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k: detect more kinds of invalid descriptorsFelix Fietkau
If AR_CRCErr, AR_PHYErr, AR_DecryptCRCErr or AR_MichaelErr is indicated in the rx status word, but AR_RxFrameOK is also set, the descriptor contents are typically invalid. This can show up as a warning about invalid MCS rates in a frame. Even with those checks in place, a descriptor with invalid MCS rates can still sometimes make it through to the driver (mostly on older hardware like AR91xx). Detect such errors in the last descriptor of a frame and discard the whole frame if present. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k: fix handling of broken descriptorsFelix Fietkau
As the comment in ath_get_next_rx_buf indicates, if a descriptor with the done bit set follows one with the done bit cleared, both descriptors should be discarded, however the driver is not doing that yet. To fix this, use the rs->rs_more flag as an indicator that the following frame should be discarded. This also helps with the split buffer case: if the first part of the frame is discarded, the following parts need to be discarded as well, since they contain no valid header or usable data. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k: improve dma map failure handlingFelix Fietkau
Instead of leaving the buffer without skb and breaking out of the loop (which could leak the rx buffer), use the common error path. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k_common: remove ath9k_cmn_padposFelix Fietkau
It is equivalent to ieee80211_hdrlen Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k_hw: make various ar5416/ar91xx rf banks constFelix Fietkau
Banks 0-3,7 are neither modified at run time, nor SREV dependent. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10ath9k_hw: clean up RF Bank6 handling on AR5416/AR91xxFelix Fietkau
There are two sets of initvals for this RF bank, one with TPC support and one without. The TPC one always gets used, so remove the other one to avoid confusion. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2x00mmio: remove unused rt2x00pci_* definesGabor Juhos
All users are converted to use the rt2x00mmio_* functions so remove the now unused defines. The patch contain no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2800pci: use the rt2x00mmio_* routinesGabor Juhos
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt61pci: use the rt2x00mmio_* routinesGabor Juhos
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2500pci: use the rt2x00mmio_* routinesGabor Juhos
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2400pci: use the rt2x00mmio_* routinesGabor Juhos
Use the recently introduced rt2x00mmio_* routines instead of the rt2x00pci_* variants. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10rt2x00: rt2x00mmio: use rt2x00mmio prefix in function namesGabor Juhos
The functions in the rt2x00mmio module has been moved from the rt2x00pci module. Each function uses the rt2x00pci prefix which is a bit confusing. Use the r2x000mmio prefix for each function to make it consistent with the module name. The renamed functions are used by several modules, and updating the names in all of them would result in a big patch. In order to keep the patch simple, add compatibility defines for the old function names. This allows to update the names in each module separately. After each module is updated, the defines can be removed. The patch contains no functional changes. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Acked-by: Helmut Schaa <helmut.schaa@googlemail.com> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-10Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next
2013-04-10Merge branch 'for-john' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next Conflicts: drivers/net/wireless/ath/carl9170/debug.c drivers/net/wireless/ath/carl9170/main.c net/mac80211/ieee80211_i.h
2013-04-10Merge branch 'master' of ↵John W. Linville
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless Conflicts: drivers/net/wireless/rt2x00/rt2x00pci.c
2013-04-08brcmfmac: only use ifidx from BDC header in brcmf_rx_frames()Arend van Spriel
In brcmf_rx_frames() the call to brcmf_fweh_process_skb() could change the ifidx using information in the event data. This is only different to the BDC ifidx for IF ADD event. However, the creation of the new interface is deferred to event worker so it does not exist. After brcmf_fweh_process_skb() it is only used to set statistics. Reviewed-by: Hante Meuleman <meuleman@broadcom.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>
2013-04-08brcmfmac: obtain wdev using vif object in action frame rxArend van Spriel
The function brcmf_p2p_notify_action_frame_rx() the wireless_dev is needed to pass the action frame to cfg80211. The wireless_dev is held in brcmf_cfg80211_vif object. Use that instead of the ieee80211_ptr in net_device as P2P_DEVICE interface does not have a net_device associated with it. Reviewed-by: Hante Meuleman <meuleman@broadcom.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>
2013-04-08brcmfmac: fix reception of P2P probe requests on P2P_DEVICE interfaceArend van Spriel
The probe requests received on P2P_DEVICE interface were not sent to wpa_supplicant, which makes the device not discoverable by peers. Reviewed-by: Hante Meuleman <meuleman@broadcom.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>
2013-04-08brcmfmac: wait for firmware event when creating P2P_DEVICE interfaceArend van Spriel
The firmware sends a IF event to notify the host driver that the P2P_DEVICE interface has been created. Wait for the event before returning the related wireless_dev. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: support creation of P2P_DEVICE through user-spaceArend van Spriel
The current driver code creates a P2P_DEVICE through a module parameter. This device has a dummy netdevice which is not how this interface type is intended. This patch add proper support for the P2P_DEVICE interface type. This requires a wpa_supplicant with such support as well. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: use struct brcmf_if instance iso netdevice in escan functionsArend van Spriel
escan functionality is also required for P2P device operations so it is better not to rely on struct netdevice instances. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: use struct brcmf_if instance as parameter in brcmf_set_mpc()Arend van Spriel
Remove use of struct netdevice as parameter to brcmf_set_mpc() as it will not always be available, ie. there will be non-netdevice interfaces. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: remove use of unconditional access of struct wireless_dev::netdevArend van Spriel
With the introduction of the P2P_DEVICE interface type an instance of struct wireless_dev does not always have a netdev assigned to it. Better use container_of() construct to obtain internal structure and go from there. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: remove condition for calling event handlerArend van Spriel
In fweh module the event handler was only called if the struct brcmf_if instance had a non-null netdev associated. This restriction is no longer valid for P2P_DEVICE type of interface. This patch removes that restriction. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: add role attribute to struct brcmf_if_event definitionArend van Spriel
According specification the IF event has an additional field indicating the role or type of the interface for which this event is sent. Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: add hexadecimal trace of message payloadArend van Spriel
Adds a trace function used in brcmf_dbg_hex_dump() which adds the raw binary data to the trace. It requires trace-cmd plugin to see this data. Reviewed-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: firmware shared data version fixPiotr Haber
Firware shared data structure is backward compatible for fields we are interested in. Allow reading of shared data in case of version mismatch. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: read firmware console without trap indicationPiotr Haber
Firmware console output can be read also when there was no trap indication. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: handle firmware signals requesting for packetsArend van Spriel
The firmware can request the host driver for packets, by sending either the MAC_REQUEST_CREDIT or the MAC_REQUEST_PACKET primitive. This patch adds handling of these primitives. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: handle firmware signalling destination entry stateArend van Spriel
Firmware can signal whether the host driver may sent packets for a specific destination or interface. This can happen when a destination is sleeping or when going off-channel. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-04-08brcmfmac: fix unaligned access in TXSTATUS signal handlingArend van Spriel
reported by Hante. Needs to be squashed in commit 187fbcec. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>