[pkg-wpa-devel] [wpa] 02/06: Add an upstream patch to fix hostapd in SMPS mode.
Andrew Shadura
andrewsh at debian.org
Fri Feb 24 16:49:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
andrewsh pushed a commit to branch debian/stretch
in repository wpa.
commit 32d32456f9a348c9b4808b8bca5ae7508a9c93a9
Author: Andrew Shadura <andrewsh at debian.org>
Date: Tue Feb 14 17:08:07 2017 +0100
Add an upstream patch to fix hostapd in SMPS mode.
---
.../from-upstream-hostapd-fix-SMPS-mode.patch | 56 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 57 insertions(+)
diff --git a/debian/patches/from-upstream-hostapd-fix-SMPS-mode.patch b/debian/patches/from-upstream-hostapd-fix-SMPS-mode.patch
new file mode 100644
index 0000000..24b1aaa
--- /dev/null
+++ b/debian/patches/from-upstream-hostapd-fix-SMPS-mode.patch
@@ -0,0 +1,56 @@
+From: Jouni Malinen <jouni at qca.qualcomm.com>
+Date: Fri Mar 18 16:16:40 2016 +0200
+Subject: nl80211: Do not add NL80211_ATTR_SMPS_MODE attribute if HT is disabled
+
+SMPS mode is applicable only for HT and including an attribute to
+configure it when HT is disabled could result in the AP start operation
+failing. Fix this by adding the attribute only in cases where HT is
+enabled.
+
+Upstream commit ee298f1b1f7efd7eb5fd510f36b25ff88208017c
+--- a/src/drivers/driver_nl80211.c
++++ b/src/drivers/driver_nl80211.c
+@@ -3419,24 +3419,26 @@
+ nla_put_u32(msg, NL80211_ATTR_CIPHER_SUITE_GROUP, suite))
+ goto fail;
+
+- switch (params->smps_mode) {
+- case HT_CAP_INFO_SMPS_DYNAMIC:
+- wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - dynamic");
+- smps_mode = NL80211_SMPS_DYNAMIC;
+- break;
+- case HT_CAP_INFO_SMPS_STATIC:
+- wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - static");
+- smps_mode = NL80211_SMPS_STATIC;
+- break;
+- default:
+- /* invalid - fallback to smps off */
+- case HT_CAP_INFO_SMPS_DISABLED:
+- wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - off");
+- smps_mode = NL80211_SMPS_OFF;
+- break;
++ if (params->ht_opmode != -1) {
++ switch (params->smps_mode) {
++ case HT_CAP_INFO_SMPS_DYNAMIC:
++ wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - dynamic");
++ smps_mode = NL80211_SMPS_DYNAMIC;
++ break;
++ case HT_CAP_INFO_SMPS_STATIC:
++ wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - static");
++ smps_mode = NL80211_SMPS_STATIC;
++ break;
++ default:
++ /* invalid - fallback to smps off */
++ case HT_CAP_INFO_SMPS_DISABLED:
++ wpa_printf(MSG_DEBUG, "nl80211: SMPS mode - off");
++ smps_mode = NL80211_SMPS_OFF;
++ break;
++ }
++ if (nla_put_u32(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
++ goto fail;
+ }
+- if (nla_put_u32(msg, NL80211_ATTR_SMPS_MODE, smps_mode))
+- goto fail;
+
+ if (params->beacon_ies) {
+ wpa_hexdump_buf(MSG_DEBUG, "nl80211: beacon_ies",
diff --git a/debian/patches/series b/debian/patches/series
index c64ac14..35abe22 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -31,3 +31,4 @@ nl80211_dont_call_linux_iface_up_for_a_dedicated_p2p_device.patch
do_not_wait_for_monitor_to_attach_if_no_control_interface.patch
wpa_supplicant_do_not_wait_for_monitor_on_p2p_device_interface.patch
openssl-initialise-pkcs-11.patch
+from-upstream-hostapd-fix-SMPS-mode.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/wpa.git
More information about the Pkg-wpa-devel
mailing list