summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-05-15NFC: Return the amount of LLCP bytes queued to sock_sendmsgSamuel Ortiz
Otherwise an LLCP send() always returns 0. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Update the LLCP poll maskSamuel Ortiz
Fix the poll mask depending on the socket state. POLLOUT was missing for example. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: LLCP connect must wait for a CC frameSamuel Ortiz
Blocking sockets should sleep on a CC (Connection Complete) reception from the connect() call. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Remove unneeded pn533 dev NULL checkDan Carpenter
container_of() works by subtracting the offset of the member. The math can't really return a zero here. Sometimes people check it when they actually meant to check something else but in this case we can just remove the check. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Update Documentation/nfc-hci.txtEric Lapuyade
Document the new HCI ops and fix a few typos and spelling mistakes. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Add HCI/SHDLC support to let driver check for tag presenceEric Lapuyade
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Specify usage for targets found and target lost eventsEric Lapuyade
It is now specified that nfc_target_found() and nfc_target_lost() core functions must not be called from an atomic context. This allow us to serialize calls and protect the targets table using the nfc device lock instead of a spinlock. Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Remove useless HCI private nfc target tableEric Lapuyade
Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Cache the core NFC active target pointer instead of its indexEric Lapuyade
The NFC Core now caches the active nfc target pointer, thereby avoiding the need to lookup the target table for each invocation of a driver ops. Consequently, pn533, HCI and NCI now directly receive an nfc_target pointer instead of a target index. Cc: Ilan Elias <ilane@ti.com> Signed-off-by: Eric Lapuyade <eric.lapuyade@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15nl80211: fix typos in commentsZefir Kurtisi
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15b43legacy: Fix error due to MMIO access with SSB unpoweredLarry Finger
There is a dummy read of a PCI MMIO register that occurs before the SSB bus has been powered, which is an error. This bug has not been seen earlier, but was apparently exposed when udev was updated to version 182. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15brcmfmac: replace brcmf_sdioh_card_regread with brcmf_sdio_regrlFranky Lin
Use the newly introduced brcmf_sdio_regrl to replace brcmf_sdioh_card_regread as part of the SDIO WiFi dongle register access interface clean up. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: remove function brcmf_sdcard_regfailFranky Lin
The new interface brcmf_sdio_regr/w provides result of access attempts. It is no longer necessary to use dedicated variable and function to provide enquiry for failure. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: remove redundant retries for SDIO core register accessFranky Lin
The new brcmf_sdio_regrl/regwl interface has already performed retries on failed attempts. It is no longer necessary to have the retry mechanism in r_sdreg32/w_sdreg32. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: replace brcmf_sdcard_reg_write with brcmf_sdio_regwlFranky Lin
Use the newly introduced brcmf_sdio_regwl to replace brcmf_sdcard_reg_write as part of the SDIO WiFi dongle register access interface clean up. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: replace brcmf_sdcard_reg_read with brcmf_sdio_regrlFranky Lin
Use the newly introduced brcmf_sdio_regrl to replace brcmf_sdcard_reg_read as part of the SDIO WiFi dongle register access interface clean up. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: replace brcmf_sdcard_cfg_write with brcmf_sdio_regwbFranky Lin
Use the newly introduced brcmf_sdio_regwb to replace brcmf_sdcard_cfg_write as part of the SDIO WiFi dongle register access interface clean up. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: replace brcmf_sdcard_cfg_read with brcmf_sdio_regrbFranky Lin
Use the newly introduced brcmf_sdio_regrb to replace brcmf_sdcard_cfg_read as part of the SDIO WiFi dongle register access interface clean up. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: introduce unified register access interface for SDIOFranky Lin
Both brcmf_sdcard_cfg_read/write and brcmf_sdcard_reg_read/write are used as interface functions for register access of SDIO WiFi dongle. A unified interface brcmf_sdio_regr/w is introduced in this patch in order to simplify the interface and keep the complexity within the lower layer. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: decouple set_sbaddr_window from register write interfaceFranky Lin
brcmf_sdcard_set_sbaddr_window configures 3 registers on SDIO function misc bank to change current silicon backplane programming window. This patch makes it call brcmf_sdioh_request_byte directly in order to prepare for the write register interface unification. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: remove unused parameter of brcmf_sdcard_reg_writeFranky Lin
The size parameter for brcmf_sdcard_reg_write is always 4. Remove it to make the code cleaner. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15brcmfmac: remove unused parameter of brcmf_sdcard_reg_readFranky Lin
The size parameter for brcmf_sdcard_reg_read is always 4. Remove it to make the code neat. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-15ath9k_hw: Fix RTT calibrationSujith Manoharan
This patch fixes multiple issues with the current RTT implementation in ath9k. * The data that is obtained from the RTT interface registers are stored in 31:5 - mask out the extra bits when reading them. * A history buffer is maintained which is not needed at all. Remove this array and just store the baseband data for each chain (or bank). * A 'num_readings' variable was being used to handle the last entry. But it was being used in an improper manner, with the result that the RTT values were never being written to the RTT Interface registers. Fix this by using a simple flag. * Stop baseband operations before programming the calibration values to the HW. * Do not restore RX gain settings as part of RTT. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15mac80211: fix the increment of unicast/multicast counters for forwarded PREQChun-Yeow Yeoh
Forwarded PREQ is either unicast or multicast. The appropriate counters should be incremented accordingly. Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15mac80211: send peer candidate event for new sta onlyThomas Pedersen
Only send a cfg80211 new peer candidate notification if userspace has yet to allocate this station entry. Signed-off-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: don't disable AGG queues that are not enabledEmmanuel Grumbach
If the BA session is torn down before we had a chance to start it we shouldn't disable the AGG tx queues that weren't enabled. This can happen in two cases: 1) We get a delBA before we drained our Tx queues in agg start flow 2) We didn't get the (successfull) addBA response on time Reported-by: Daniel Chyan <dchyan@princeton.edu> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: don't flood logs when HT debug flag is setEmmanuel Grumbach
We have TX_REPLY for that. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: fix power index handlingAmit Beka
The power index that the user gives as module parameter in in range 1-5, but we need to decrease it in order to create an array index out of it (0-4) for the power table command. Signed-off-by: Amit Beka <amit.beka@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: make sure reduced tx power bit is validWey-Yi Guy
Once driver decide to change reduced tx power behavior, make sure the reduce tx power valid bit is set Change-Id: I3afae96319292d8cb347a812a948085c5db7ad91 Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Reviewed-on: http://git-mwg.jer.intel.com/gerrit/1948 Tested-by: Jenkins Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: add documentation for bt reduced tx powerWey-Yi Guy
Change-Id: Ia6294d651dcffdcaf8b62e67bcef52bd8c158dea Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Reviewed-on: http://git-mwg.jer.intel.com/gerrit/1947 Tested-by: Jenkins Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15iwlwifi: include rssi as part of decision making for reduce txpowerWey-Yi Guy
In bt coex, consider the average rssi as part of decision making process Change-Id: I8d11d7f177a6875e2a9d08f7539d42253226fd7a Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Reviewed-on: http://git-mwg.jer.intel.com/gerrit/1945 Tested-by: Jenkins Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15NFC: Select CRC_CCITT for SHDLC link layer of HCI based driversMarcel Holtmann
The SHDLC link layer of HCI based drivers uses CRC-CCITT and thus needs to select that kernel option. Otherwise it ends up with this linking error: net/built-in.o: In function `nfc_shdlc_add_len_crc': net/nfc/hci/shdlc.c:113: undefined reference to `crc_ccitt' Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Acked-by: Samuel Ortiz <sameo@linux.intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15mwifiex: fix coding style issue in mwifiex_deauthenticateBing Zhao
Documentation/CodingStyle says "Do not unnecessarily use braces where a single statement will do." Use "switch/case", instead of "if/else_if/else", so that more cases can be added later. Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-15mac80211_hwsim: Fix rate control by correctly reporting transmission countsJavier Cardona
Drivers need to report the number of transmission attempts for each rate as well as to terminate the rate array with -1. The in-kernel datapath of hwsim simulates a perfect medium, therefore the driver only needs to report that the first transmission attempt was sucessfully completed at the most favorable rate. Rate control is working again for this driver. Tested mesh mode with minstrel. Signed-off-by: Javier Cardona <javier@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09iwlwifi: fix-up some merge damage from commit 0d6c4a2John W. Linville
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09{nl,cfg,mac}80211: Allow user to see/configure HT protection modeAshok Nagarajan
This patch introduces a new mesh configuration parameter "ht_opmode" and will allow user to check the current HT protection mode selected. Users could configure the protection mode by the command "iw mesh_iface set mesh_param mesh_ht_protection_mode=2". The default protection mode of mesh is set to non-HT mixed mode. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09mac80211: Allow nonHT/HT peering in meshAshok Nagarajan
Now that we have protection enabled, allow non-HT and HT20 stations to peer with HT40+/- stations. Peering is still disallowed for HT40+/- mismatch. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09mac80211: Implement HT mixed protection modeAshok Nagarajan
Section 9.23.3.5 of IEEE 80211s standard describes the protection rules for HT mesh STA in a MBSS. Three HT protection modes are supported for now: non-HT mixed mode - is selected if any non-HT peers are present in our MBSS. 20MHz-protection mode - is selected if all peers in our 20/40MHz MBSS support HT and atleast one HT20 peer is present. no-protection mode - is selected otherwise. This is a limited implementation of 9.23.3.5, which only considers mesh peers when determining the HT protection mode. Station's channel_type needs to be maintained. Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09mac80211: Advertise HT protection mode in IEsAshok Nagarajan
Signed-off-by: Ashok Nagarajan <ashok@cozybit.com> Reviewed-by: Thomas Pedersen <thomas@cozybit.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09cfg80211: fix BSS comparisonEmmanuel Grumbach
Since the BSS table is organized in a RB tree, the BSSs need to be comparable. This means that we must define a < and > operator to the BSS object. compare_ethr_addr isn't enough since it returns only a binary value. Since Felix's cfg80211: use compare_ether_addr on MAC addresses instead of memcmp Because of the constant size and guaranteed 16 bit alignment, the inline compare_ether_addr function is much cheaper than calling memcmp. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com> The BSS table is corrupted: rb_find_bss can't find the bss. As a result BSSes are duplicated in the BSS table, and we get stuck while probing an AP before associating (in STA mode). Change-Id: I85928756f4328028230832c1565ece7f412f3843 CC: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Acked-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09brcmfmac: add out of band interrupt supportFranky Lin
Some sdio host controllers do not support real in band interrupt. Software polling mode as a replacement is not fast enough for high throughput and new features. Also some in band interrupts do not support host wake up on embedded platform even when they are real physical interrupts. Therefore out of band (oob) interrupt mechanism is implemented for these scenarios. To provide oob irq number and flags used for irq registration in brcmfmac, a platform device contains irq resource must be registered in board specific code. Here is an example of platform device structure: struct resource brcmf_sdio_res[] = { { .start = GPIO_BRCMF_SDIO_OOB_NUM, .end = GPIO_BRCMF_SDIO_OOB_NUM, .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, } }; struct platform_device brcmf_sdio_device = { .name = "brcmf_sdio_pd", .id = -1, .num_resources = ARRAY_SIZE(brcmf_sdio_res), .resource = brcmf_sdio_res, }; Reviewed-by: pieter-paul giesberts <pieterpg@broadcom.com> Reviewed-by: arend van spriel <arend@broadcom.com> Signed-off-by: franky lin <frankyl@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09brcmfmac: postpone interrupt register functionFranky Lin
For out of band interrupt which is going to be introduced shortly, the interrupt register function must be called after firmware is downloaded. This patch moves it from brcmf_sdbrcm_probe to brcmf_sdbrcm_bus_init. Reviewed-by: pieter-paul giesberts <pieterpg@broadcom.com> Reviewed-by: arend van spriel <arend@broadcom.com> Signed-off-by: franky lin <frankyl@broadcom.com> Signed-off-by: Franky Lin <frankyl@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09brcmfmac: check bus state for statusFranky Lin
Bus state should be the correct flag for bus status. Use it instead of result from previous function call for backplane clock switch. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-09brcmfmac: stop releasing sdio host in irq handlerFranky Lin
brcmf_sdbrcm_isr doesn't access to the dongle through SDIO bus. Stop releasing and claiming host in irq handler to eliminate any potential risk. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> 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>
2012-05-09mac80211: Add more ethtools stats: survey, rates, etcBen Greear
The signal and noise are forced to be positive since ethtool deals in unsigned 64-bit values and this number should be human readable. This gives easy access to some of the data formerly exposed in the deprecated /proc/net/wireless file. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09mac80211: Framework to get wifi-driver stats via ethtool.Ben Greear
This adds hooks to call into the driver to get additional stats for the ethtool API. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09mac80211: Support getting sta_info stats via ethtool.Ben Greear
This lets ethtool print out stats related to stations connected to the interface. Does not yet get stats from the underlying driver. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09cfg80211: Add framework to support ethtool stats.Ben Greear
Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09iwlwifi: use 6000G2B for 6030 device seriesWey-Yi Guy
"iwlwifi: use correct released ucode version" change the ucode api ok from 6000G2 to 6000G2B, but it shall belong to 6030 device series, not the 6005 device series. Fix it Cc: stable@vger.kernel.org #3.3+ Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-09iwlwifi: use correct released ucode versionMeenakshi Venkataraman
Report correctly the latest released version of the iwlwifi firmware for all iwlwifi-supported devices. Cc: stable@vger.kernel.org #3.3+ Signed-off-by: Meenakshi Venkataraman <meenakshi.venkataraman@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>