aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAge
* libertas: scan behaviour consistency improvementsDaniel Drake2011-09-27
| | | | | | | | | | | | | | | | | When scanning for the broadcast SSID, there is no need to add the SSID TLV (restoring the behaviour of the driver behaviour in the wext days, confirmed in Marvell specifications). If bssid is unspecified, the current scan code will usually fire off an active scan probing for the specific requested SSID. However, if a scan is ongoing (or has just finished), those scan results will be used instead (even if that scan is totally different, e.g. a passive scan on channel 4 for a different SSID). Fix this inconsistency by always firing off a scan when associating without a bssid. Signed-off-by: Daniel Drake <dsd@laptop.org> Acked-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Validate cipher suite against supported ciphersJouni Malinen2011-09-27
| | | | | | | | | | Instead of using a hardcoded list of cipher suites in nl80211.c, use a shared function in util.c to verify that the driver advertises support for the specified cipher. This provides more accurate validation of the values and allows vendor-specific cipher suites to be added in drivers. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* cfg80211: Remove strict validation of AKM suitesJouni Malinen2011-09-27
| | | | | | | | | | | | | | | | | | | | | NL80211_ATTR_AKM_SUITES can be used to configure new AKMs, like FT or the SHA-256 -based AKMs or FT from 802.11r/802.11w. In addition, vendor specific AKMs could be used. The current validation code for the connect command prevents cfg80211-based drivers from using these mechanisms even if the driver would not actually use this AKM value (i.e., it uses WPA/RSN IE from user space). mac80211-based drivers allow any AKM to be used since this value is not used there. Remove the unnecessary validation step in cfg80211 to allow drivers to decide what AKMs are supported. In theory, we could handle this by advertising supported AKMs, but that would not be very effective unless we enforce all drivers (including mac80211) to advertise the set of supported AKMs. This would require additional changes in many places whenever a new AKM is introduced even though no actually functionality changes may be required in most drivers. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* mac80211: add ieee80211_vif param to tsf functionsEliad Peller2011-09-27
| | | | | | | | | | | TSF can be kept per vif. Add ieee80211_vif param to set/get/reset_tsf, and move the debugfs entries to the per-vif directory. Update all the drivers that implement these callbacks. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* ath9k: add Block ACK bitmap in sample debugMohammed Shafi Shajakhan2011-09-27
| | | | | | | | | this represents the bitmap of block ACK received after the successful transmission of an aggregate frame. also made few changes to beautify the display Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xxJohn W. Linville2011-09-27
|\
| * wl12xx: report the stop_ba event to all STAs in AP-modeArik Nemtsov2011-09-23
| | | | | | | | | | | | | | | | | | Use the AP_MAX_LINKS as the upper boundary for traversing the links array, thereby guaranteeing BA sessions with all connected STAs are stopped when the stop_ba event is received. Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: correct fw_status structure for 8 sta support in AP-modeArik Nemtsov2011-09-23
| | | | | | | | | | | | | | | | Fix an erroneous labeling of array boundaries in the fw_status structure. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: implement set_bitrate_mask callbackEliad Peller2011-09-23
| | | | | | | | | | | | | | | | Save the configured bitrate, and use the min allowed rate as the basic rate (e.g. when scanning). Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: AP mode - support hidden SSIDArik Nemtsov2011-09-23
| | | | | | | | | | | | | | | | | | | | | | If a hidden SSID is requested, generate a probe response template containing the real SSID. Depends on the patch "mac80211: add ssid config to bss information in AP-mode". Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: Use dev_hlid for auth and assoc reqEliad Peller2011-09-23
| | | | | | | | | | | | | | | | | | | | | | | | On roaming, the auth and assoc req are sent with the sta hlid. This is wrong, as the sta hlid is configured according to the old ap. Use the dev_hlid instead. Move the wl1271_tx_update_filters() call into wl1271_tx_get_hlid(), so wl->dev_hlid will be valid. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: send all pending packets on channel changeEliad Peller2011-09-23
| | | | | | | | | | | | | | | | | | There is a race condition between wl1271_tx_work() and the channel switch, so make sure all the pending packets are being sent before switching channel. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: remove P2P ie from probe responseEliad Peller2011-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | wl12xx uses a single probe response template, regardless of the probe request. However, the P2P spec forbids including the p2p ie in some cases (e.g. the probe request didn't include the p2p ie). The fw responds only to probe requests that don't include the p2p ie, and passes up probe requests that include them (the supplicant will answer them). Thus, strip the p2p ie from the probe response template. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: remove TIM ie from probe responseEliad Peller2011-09-23
| | | | | | | | | | | | | | | | | | | | | | | | wl12xx uses the beacon as the probe response template. However, the beacon includes a TIM ie, which shouldn't exist in the probe response. Delete it from the skb before configuring the probe response template. Signed-off-by: Eliad Peller <eliad@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: Include OFDM rates in IBSS modeShahar Levi2011-09-23
| | | | | | | | | | | | | | | | | | | | We were including only 11b rates in IBSS mode. This patch adds OFDM rates. [Rephrased commit log and removed one unnecessary comment. -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: fix sdio_test module functionalityShahar Levi2011-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to some changes in PM in recent kernels, the sdio_test module has been broken for a while. This patch fixes the code that powers the card on and off. Also made some small indentation fixes in the Makefile. [Rephrased commit log and removed the change in the FW name, since it's done in another patch. -- Luca] Signed-off-by: Shahar Levi <shahar_levi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
| * wl12xx: fix forced passive scansLuciano Coelho2011-09-22
| | | | | | | | | | | | | | | | | | | | | | | | We were using incorrect max and min dwell times during forced passive scans because we were still using the active scan states to scan (passively) the channels that were not marked as passive. Instead of doing passive scans in active states, we now skip active states and scan for all channels in passive states. Cc: <stable@kernel.org> # 2.6.36+ Signed-off-by: Luciano Coelho <coelho@ti.com>
* | Merge branch 'master' of git://github.com/padovan/bluetooth-nextJohn W. Linville2011-09-27
|\ \ | |/ |/|
| * Bluetooth: mark l2cap_create_iframe_pdu as staticLuiz Augusto von Dentz2011-09-21
| | | | | | | | | | | | | | l2cap_create_iframe_pdu is only used in l2cap_core.c Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Check 'dev_class' in mgmt_device_found()Andre Guedes2011-09-21
| | | | | | | | | | | | | | | | | | | | The mgmt_device_found event will be used to report LE devices found during discovery procedure. Since LE advertising reports events doesn't have class of device information, we need to check if 'dev_class' is not NULL before copying it. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Reduce critical region.Andre Guedes2011-09-21
| | | | | | | | | | | | | | | | | | This patch reduces the critial region (protected by hdev->lock) in hci_cc_le_set_scan_enable(). This way, only really required code is synchronized. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Fix wrong memcpy size on LE start encryptionAnderson Briglia2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes wrong memcpy size when copying rand value to HCI_OP_LE_START_ENC command. The compiler pretends that the array parameter was declared as a pointer and sizeof reports the size of the pointer. [1] [1] http://www.c-faq.com/aryptr/aryparmsize.html Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org> Signed-off-by: Anderson Lizardo <anderson.lizardo@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Remove support for other SMP keys than the LTKVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | For now, only the LTK is properly supported. We are able to receive and generate the other types of keys, but we are not able to use them. So it's better not request them to be distributed. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Fix not setting a pending security levelVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | For slave initiated security, we should set a default security level, for now BT_SECURITY_MEDIUM. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Revert "Bluetooth: Add support for communicating keys with userspace"Vinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5a0a8b49746771fba79866fb9185ffa051a6a183. If we use separate messages and list for SMP specific keys we can simplify the code. Conflicts: net/bluetooth/mgmt.c Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Use the LTK after receiving a LE Security RequestVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | When receiving a security request from the remote device we should find if there is already a LTK associated with the remote device, if found we should use it to encrypt the link. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Fix sending wrong authentication requirementsVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | Until we support any pairing method (Passkey Entry, OOB) that gives MITM protection we shouldn't send that we have MITM protection. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add mgmt events for blacklistingAntti Julku2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add management interface events for blocking/unblocking a device. Sender of the block device command gets cmd complete and other mgmt sockets get the event. Event is also sent to mgmt sockets when blocking is done with ioctl, e.g when blocking a device with hciconfig. This makes it possible for bluetoothd to track status of blocked devices when a third party block or unblocks a device. Event sending is handled in mgmt_device_blocked function which gets called from hci_blacklist_add in hci_core.c. A pending command is added in mgmt_block_device, so that it can found when sending the event - the event is not sent to the socket from which the pending command came. Locks were moved out from hci_core.c to hci_sock.c and mgmt.c, because locking is needed also for mgmt_pending_add in mgmt.c. Signed-off-by: Antti Julku <antti.julku@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Use the MEDIUM security level for pairingsVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | This lifts the requirement of 16 digits pin codes when pairing with devices that do not support SSP when using the mgmt interface. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Require authentication if MITM protection is requestedVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | The HIGH security level requires a 16 digit pin code for non-SSP bondings. Sometimes this requirement is not acceptable and we still want protection againts MITM attacks (which is something that the MEDIUM security level doesn't provide), for that we should allow another way to request authentication without using the HIGH security level. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Move SMP crypto functions to a workqueueVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | The function crypto_blkcipher_setkey() called by smp_e() can sleep, so all the crypto work has to be moved to hci_dev workqueue. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Move SMP fields to a separate structureVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | The objective is to make the core to have as little as possible information about SMP procedures and logic. Now, all the SMP specific information is hidden from the core. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: hidp: Add support for NO_INIT_REPORTS quirkDavid Herrmann2011-09-21
| | | | | | | | | | | | | | | | | | During setup the host initializes all HID reports. Some devices do not support this. If this quirk is set, we skip the initialization. See also usbhid_init_reports() for this quirk. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add LE link type for debugfs outputPeter Hurley2011-09-21
| | | | | | | | | | | | | | | | Add LE link type as known connection type for debugfs stringizing output. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add mgmt command for fast connectable modeAntti Julku2011-09-21
| | | | | | | | | | | | | | | | Add command to management interface for enabling/disabling the fast connectable mode. Signed-off-by: Antti Julku <antti.julku@nokia.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add link_type information to the mgmt Connected eventVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | | | One piece of information that was lost when using the mgmt interface, was the type of the connection. Using HCI events we used to know the type of the connection based on the type of the event, e.g. HCI_LE_Connection_Complete for LE links. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add support for running SMP without a socketVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | When doing the pairing procedure we won't have an associated socket, but we still have to do the SMP negotiation. This adds support for encrypting the link and exchanging keys. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add support for pairing via mgmt over LEVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | Using the advertising cache we are able to infer the type of the remote device, and so trigger pairing over the correct link type. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Use the same timeouts for both ACL and LE linksVinicius Costa Gomes2011-09-21
| | | | | | | | | | Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Add a flag to indicate that SMP is going onVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add HCI_CONN_LE_SMP_PEND flag to indicate that SMP is pending for that connection. This allows to have information that an SMP procedure is going on for that connection. We use the HCI_CONN_ENCRYPT_PEND to indicate that encryption (HCI_LE_Start_Encryption) is pending for that connection. While a SMP procedure is going on we hold an reference to the connection, to avoid disconnections. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: Reset the security timer when a command is queuedVinicius Costa Gomes2011-09-21
| | | | | | | | | | | | | | | | | | | | | | Each time a SMP command is enqueued, we reset the SMP timer, this way we follow exactly what the spec mandates: "The Security Manager Timer shall be reset when an L2CAP SMP command is queued for transmission." Vol. 3, Part H, Section 3.4 Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
| * Bluetooth: make use of connection number to optimize the schedulerLuiz Augusto von Dentz2011-09-21
| | | | | | | | | | | | | | | | | | This checks if there is any existing connection according to its type before start iterating in the list and immediately stop iterating when reaching the number of connections. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
* | nfc: NFC_WILINK depends on NFC_NCIRandy Dunlap2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nwcwilink.c uses nci_*() interfaces, so it should depend on NFC_NCI. Fixes these build errors: ERROR: "nci_register_device" [drivers/nfc/nfcwilink.ko] undefined! ERROR: "nci_allocate_device" [drivers/nfc/nfcwilink.ko] undefined! ERROR: "nci_recv_frame" [drivers/nfc/nfcwilink.ko] undefined! ERROR: "nci_free_device" [drivers/nfc/nfcwilink.ko] undefined! ERROR: "nci_unregister_device" [drivers/nfc/nfcwilink.ko] undefined! Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: remove unneeded NULL checkDan Carpenter2011-09-21
| | | | | | | | | | | | | | | | | | | | | | We dereference "rate" on the lines before so the checks here are too late to help. This function is only called from mwifiex_dump_station_info() and "rate" is always a non-NULL pointer so the check can be removed. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | mwifiex: add a kfree() to an error pathDan Carpenter2011-09-21
| | | | | | | | | | | | | | | | | | We're not likely to hit this small memory leak, but lets fix it anyway to keep the static checkers happy. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
* | iwlagn: remove duplicate list initAmit Beka2011-09-21
| | | | | | | | | | | | | | | | | | | | iwl_trans_rx_alloc is only called from iwl_rx_init, so no need to init the lists twice. Signed-off-by: Amit Beka <amit.beka@intel.com> 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>
* | iwlagn: pending frames musn't be incremented if agg is onEmmanuel Grumbach2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | During my works on the transport layer I removed code that updated a local variable (is_agg) that is needed to keep the pending_frames count up to date. Fix this. Also, there should be no way to have a packet with TX_CTL_AMPDU set while the internal aggregation state machine is not in AGG_ON state. Add a WARN_ON to ensure 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>
* | iwlagn: remove uneeded declarationEmmanuel Grumbach2011-09-21
| | | | | | | | | | | | | | | | This has been removed but the declaration hasn't. 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>
* | iwlagn: simplify the iwl_device_cmd layoutEmmanuel Grumbach2011-09-21
| | | | | | | | | | | | | | | | | | | | | | This simplifies both the transport layer and the upper layer. Kill the union in the device command, which avoids the funny syntax we had: cmd->cmd.payload. 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>
* | iwlagn: remove the callback in host commandsEmmanuel Grumbach2011-09-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this patch, the upper layer could register a callback for each host command. This mechanism allowed the upper layer to have different callbacks for the same command ID. In fact, it wasn't used and the rx_handlers is enough: same callback for all the command with a specific command ID. The iwl_send_add_station needs the access the command that was sent while handling the response (regardless if the command was sent in SYNC or ASYNC mode). So now, all the handlers receive the host command that was sent. This implies a change in the handler signature. 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>