- 09 Nov, 2011 7 commits
-
-
Christian Lamparter authored
802.11n-2009 extends the supported rates element with a magic value which can be used to prevent legacy stations from joining the BSS. However, this magic value is not a rate like the others and the magic can simply be ignored/skipped at this late stage. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>--- Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johan Hedberg authored
Now that pending commands are hci_dev specific there's no need to check whether a command matches hci_dev when iterating through them. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
For consistency the integer type should be u16 and not __u16. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
The cancel_delayed_work_sync function should not be used if we hold any locks. Luckily all places where this is the case it is also safe to use the non-sync version. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
Now that the pending commands are within struct hci_dev we can properly control access to them throught the hci_dev locking mechanism. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
This patch moves the pending management command list (previously global to mgmt.c) into struct hci_dev. This makes it possible to do proper locking when accessing it (through the existing hci_dev locks) and thereby avoid race conditions. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
The current global pending command list in mgmt.c is racy. Possibly the simplest way to fix it is to have per-hci dev lists instead of a global one (all commands that need a pending struct are hci_dev specific). This way the list can be protected using the already existing per-hci dev lock. To enable this refactoring the first thing that needs to be done is to ensure that the mgmt functions have access to the hci_dev struct (instead of just the dev id). Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 08 Nov, 2011 22 commits
-
-
Thomas Pedersen authored
Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Ashok Nagarajan <anagar6@uic.edu> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Thomas Pedersen authored
Set peer's HT capabilities, and disallow peering if we're on a different channel type. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Ashok Nagarajan <anagar6@uic.edu> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Thomas Pedersen authored
Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
Ashok Nagarajan <anagar6@uic.edu> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Alexander Simon authored
Some refactoring for IBSS HT. Move HT info and capability IEs building code into separate functions. Add function to get the channel type from an HT info IE. Signed-off-by:
Alexander Simon <an.alexsimon@googlemail.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Thomas Pedersen authored
Remove most references to magic numbers, save a few bytes and hopefully improve readability. Signed-off-by:
Thomas Pedersen <thomas@cozybit.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Arik Nemtsov authored
Some cards can generate CCMP IVs in HW, but require the space for the IV to be pre-allocated in the frame at the correct offset. Add a key flag that allows us to achieve this. Signed-off-by:
Arik Nemtsov <arik@wizery.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johannes Berg authored
genlmsg_end() cannot fail, it just returns the length of the message. Thus, error handling for it is useless. While removing it, I also noticed a useless variable and removed this it as well. Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johannes Berg authored
If there are no cooked monitor interfaces, there's no point in building the radiotap RX header for the frame and iterating the interface list. Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johannes Berg authored
There's an extra pair of parentheses here that is simply confusing because it implies a nesting that doesn't actually exist. Just remove it. Signed-off-by:
Johannes Berg <johannes.berg@intel.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Eliad Peller authored
mac80211 calls ieee80211_set_wmm_default (which in turn calls drv_conf_tx()) for every new interface, including "internal" ones (e.g. monitor interface, which the low-level driver doesn't know about). Limit this call only to valid interfaces. Reported-by:
Johannes Berg <johannes@sipsolutions.net> Signed-off-by:
Eliad Peller <eliad@wizery.com> Signed-off-by:
John W. Linville <linville@tuxdriver.com>
-
Johan Hedberg authored
This patch adds address type info (typically BR/EDR vs LE) to management messages that need this. This also ensures conformance to the latest management API specification. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
BR/EDR link keys have their own commands and events (separate from SMP) and the remove_keys command (previously remove_key) removes keys of any kind for the specified remote address. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
We should return a ENETDOWN status response if the adapter is powered off (i.e. the HCI_UP flag isn't set). Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
There's no need to deal with mgmt_pending_cmd when blocking and unblocking devices since these actions are synchronous. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
The power off code doesn't need to use its own custom timer since the delayed_work API provides the exact same functionality. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
A proper mgmt_command_status should be returned to user-space if either discoverable or connectable enabling fails. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
Based on the revised mgmt API set_discoverable has a timeout parameter to specify how long the adapter will remain discoverable. A value of 0 means "indefinitively". Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
By using periodic inquiry command we're not able to detect correctly when the controller has started inquiry. Today we have this workaround in inquiry result event handler to set the HCI_INQUIRY flag when it sees the first inquiry result event. This workaround isn't enough because the device may be performing an inquiry but the HCI_INQUIRY flag is not set. For instance, if there is no device in range, no inquiry result event is generated, consequently, the HCI_INQUIRY flags isn't set when it should so. We rely on HCI_INQUIRY flag to implement the discovery procedure properly. So, as we aren't able to clear/set the HCI_INQUIRY flag in a reliable manner, periodic inquiry events shouldn't change the HCI_INQUIRY flag. Thus, due to that issue and in order to keep compatibility with userspace, periodic inquiry events shouldn't send mgmt discovering events. In future, we might track if periodic inquiry is enabled or not. By tracking this state we'll be able to do some improvements in Discovery such as failing MGMT_OP_START_DISCOVERY command in case periodic inquiry is on. We can also send no mgmt_device_found event if periodic inquiry is on. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This patch adds a function to hci_core to cancel an ongoing inquiry. According to the Bluetooth spec, the inquiry cancel command should only be issued after the inquiry command has been issued, a command status event has been received for the inquiry command, and before the inquiry complete event occurs. As HCI_INQUIRY flag is only set just after an inquiry command status event occurs and it is cleared just after an inquiry complete event occurs, the inquiry cancel command should be issued only if HCI_INQUIRY flag is set. Additionally, cancel inquiry related code from stop_discovery() were replaced by a hci_cancel_inquiry() call. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andre Guedes authored
This patch adds a function to hci_core to carry out inquiry. All inquiry code from start_discovery() were replaced by a hci_do_inquiry() call. Signed-off-by:
Andre Guedes <andre.guedes@openbossa.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andrei Emeltchenko authored
Add parsing Extended Flow Specification in L2CAP Config Response. Based upon haijun.liu <haijun.liu@atheros.com> series of patches (sent Sun, 22 Aug 2010) Signed-off-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andrei Emeltchenko authored
Use HCI error reasons instead of magic numbers. Signed-off-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
- 07 Nov, 2011 11 commits
-
-
Johan Hedberg authored
This patch adds a new label to hci_cc_write_scan_enable to avoid unnecessary indentation. This will be convenient especially when new code for the discoverable timeout gets added. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Szymon Janc authored
Signed-off-by:
Szymon Janc <szymon.janc@tieto.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Johan Hedberg authored
When an adapter gets powered off or is removed any pending commands should receive a ENETDOWN or ENODEV status response. Signed-off-by:
Johan Hedberg <johan.hedberg@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Mat Martineau authored
It's convenient to use the HCI device index the AMP controller id, but the spec requires that an AMP controller never has id 0. Signed-off-by:
Mat Martineau <mathewm@codeaurora.org> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Acked-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Mat Martineau authored
AMP channels can be moved between BR/EDR and AMP controllers using a sequence of signals. Every attempted channel move involves a series of four signals: Move Initiator Move Responder | | | Move Channel Request | | ----------------------------> | | | | Move Channel Response | | <---------------------------- | | | | Move Channel Confirm | | ----------------------------> | | | | Move Channel Confirm Response | | <---------------------------- | All four signals are sent even if the move fails. Signed-off-by:
Mat Martineau <mathewm@codeaurora.org> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Acked-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Mat Martineau authored
The A2MP fixed channel bit is only set when high-speed mode is enabled. Signed-off-by:
Mat Martineau <mathewm@codeaurora.org> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Acked-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Mat Martineau authored
Handle both "create channel request" and "create channel response". Signed-off-by:
Mat Martineau <mathewm@codeaurora.org> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Acked-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Mat Martineau authored
Each channel has a policy to require BR/EDR (the default), prefer BR/EDR, or prefer AMP. Check for valid policy value and L2CAP mode. Signed-off-by:
Mat Martineau <mathewm@codeaurora.org> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Acked-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Andrei Emeltchenko authored
tx_win_max is initialized during L2CAP configuration phase. For fixed channels (e.g. A2MP) we want to have it initialized when channel is created. Signed-off-by:
Andrei Emeltchenko <andrei.emeltchenko@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Luiz Augusto von Dentz authored
To avoid starvation the priority is recalculated so that the starving channels are promoted to HCI_PRIO_MAX - 1 (6). HCI_PRIO_MAX (7) is considered special, because it requires CAP_NET_ADMIN capability which can be used to provide more guaranties, so it is not used when promoting. Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-
Luiz Augusto von Dentz authored
The quote is calculated based on the first buffer in the queue so if the priority changes to something lower than the priority of the first skb the quote needs to be recalculated. Signed-off-by:
Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Acked-by:
Marcel Holtmann <marcel@holtmann.org> Signed-off-by:
Gustavo F. Padovan <padovan@profusion.mobi>
-