Revert "[wpa_supplicant] Cumulative patch from c4e90da6d"
This reverts commit 39bc25d3a79c1375de430a7918d949c1a86f70c6.
Test: Compilation
Change-Id: Iae7670429466958911b5296cb1359bceecc0b03e
Exempt-From-Owner-Approval: Revert since it's breaking the build
diff --git a/wpa_supplicant/wnm_sta.c b/wpa_supplicant/wnm_sta.c
index 39cd163..912f4c4 100644
--- a/wpa_supplicant/wnm_sta.c
+++ b/wpa_supplicant/wnm_sta.c
@@ -12,7 +12,6 @@
#include "common/ieee802_11_defs.h"
#include "common/ieee802_11_common.h"
#include "common/wpa_ctrl.h"
-#include "common/ocv.h"
#include "rsn_supp/wpa.h"
#include "config.h"
#include "wpa_supplicant_i.h"
@@ -21,7 +20,6 @@
#include "ctrl_iface.h"
#include "bss.h"
#include "wnm_sta.h"
-#include "notify.h"
#include "hs20_supplicant.h"
#define MAX_TFS_IE_LEN 1024
@@ -60,8 +58,8 @@
int res;
size_t len;
struct wnm_sleep_element *wnmsleep_ie;
- u8 *wnmtfs_ie, *oci_ie;
- u8 wnmsleep_ie_len, oci_ie_len;
+ u8 *wnmtfs_ie;
+ u8 wnmsleep_ie_len;
u16 wnmtfs_ie_len; /* possibly multiple IE(s) */
enum wnm_oper tfs_oper = action == 0 ? WNM_SLEEP_TFS_REQ_IE_ADD :
WNM_SLEEP_TFS_REQ_IE_NONE;
@@ -108,41 +106,7 @@
wpa_hexdump(MSG_DEBUG, "WNM: TFS Request element",
(u8 *) wnmtfs_ie, wnmtfs_ie_len);
- oci_ie = NULL;
- oci_ie_len = 0;
-#ifdef CONFIG_OCV
- if (action == WNM_SLEEP_MODE_EXIT && wpa_sm_ocv_enabled(wpa_s->wpa)) {
- struct wpa_channel_info ci;
-
- if (wpa_drv_channel_info(wpa_s, &ci) != 0) {
- wpa_printf(MSG_WARNING,
- "Failed to get channel info for OCI element in WNM-Sleep Mode frame");
- os_free(wnmsleep_ie);
- os_free(wnmtfs_ie);
- return -1;
- }
-
- oci_ie_len = OCV_OCI_EXTENDED_LEN;
- oci_ie = os_zalloc(oci_ie_len);
- if (!oci_ie) {
- wpa_printf(MSG_WARNING,
- "Failed to allocate buffer for for OCI element in WNM-Sleep Mode frame");
- os_free(wnmsleep_ie);
- os_free(wnmtfs_ie);
- return -1;
- }
-
- if (ocv_insert_extended_oci(&ci, oci_ie) < 0) {
- os_free(wnmsleep_ie);
- os_free(wnmtfs_ie);
- os_free(oci_ie);
- return -1;
- }
- }
-#endif /* CONFIG_OCV */
-
- mgmt = os_zalloc(sizeof(*mgmt) + wnmsleep_ie_len + wnmtfs_ie_len +
- oci_ie_len);
+ mgmt = os_zalloc(sizeof(*mgmt) + wnmsleep_ie_len + wnmtfs_ie_len);
if (mgmt == NULL) {
wpa_printf(MSG_DEBUG, "MLME: Failed to allocate buffer for "
"WNM-Sleep Request action frame");
@@ -167,16 +131,8 @@
wnmsleep_ie_len, wnmtfs_ie, wnmtfs_ie_len);
}
-#ifdef CONFIG_OCV
- /* copy OCV OCI here */
- if (oci_ie_len > 0) {
- os_memcpy(mgmt->u.action.u.wnm_sleep_req.variable +
- wnmsleep_ie_len + wnmtfs_ie_len, oci_ie, oci_ie_len);
- }
-#endif /* CONFIG_OCV */
-
len = 1 + sizeof(mgmt->u.action.u.wnm_sleep_req) + wnmsleep_ie_len +
- wnmtfs_ie_len + oci_ie_len;
+ wnmtfs_ie_len;
res = wpa_drv_send_action(wpa_s, wpa_s->assoc_freq, 0, wpa_s->bssid,
wpa_s->own_addr, wpa_s->bssid,
@@ -189,7 +145,6 @@
os_free(wnmsleep_ie);
os_free(wnmtfs_ie);
- os_free(oci_ie);
os_free(mgmt);
return res;
@@ -301,10 +256,6 @@
/* multiple TFS Resp IE (assuming consecutive) */
const u8 *tfsresp_ie_start = NULL;
const u8 *tfsresp_ie_end = NULL;
-#ifdef CONFIG_OCV
- const u8 *oci_ie = NULL;
- u8 oci_ie_len = 0;
-#endif /* CONFIG_OCV */
size_t left;
if (!wpa_s->wnmsleep_used) {
@@ -338,12 +289,6 @@
if (!tfsresp_ie_start)
tfsresp_ie_start = pos;
tfsresp_ie_end = pos;
-#ifdef CONFIG_OCV
- } else if (*pos == WLAN_EID_EXTENSION && ie_len >= 1 &&
- pos[2] == WLAN_EID_EXT_OCV_OCI) {
- oci_ie = pos + 3;
- oci_ie_len = ie_len - 1;
-#endif /* CONFIG_OCV */
} else
wpa_printf(MSG_DEBUG, "EID %d not recognized", *pos);
pos += ie_len + 2;
@@ -354,26 +299,6 @@
return;
}
-#ifdef CONFIG_OCV
- if (wnmsleep_ie->action_type == WNM_SLEEP_MODE_EXIT &&
- wpa_sm_ocv_enabled(wpa_s->wpa)) {
- struct wpa_channel_info ci;
-
- if (wpa_drv_channel_info(wpa_s, &ci) != 0) {
- wpa_msg(wpa_s, MSG_WARNING,
- "Failed to get channel info to validate received OCI in WNM-Sleep Mode frame");
- return;
- }
-
- if (ocv_verify_tx_params(oci_ie, oci_ie_len, &ci,
- channel_width_to_int(ci.chanwidth),
- ci.seg1_idx) != 0) {
- wpa_msg(wpa_s, MSG_WARNING, "WNM: %s", ocv_errorstr);
- return;
- }
- }
-#endif /* CONFIG_OCV */
-
wpa_s->wnmsleep_used = 0;
if (wnmsleep_ie->status == WNM_STATUS_SLEEP_ACCEPT ||
@@ -775,7 +700,7 @@
continue;
}
- if (wpa_is_bss_tmp_disallowed(wpa_s, target)) {
+ if (wpa_is_bss_tmp_disallowed(wpa_s, target->bssid)) {
wpa_printf(MSG_DEBUG,
"MBO: Candidate BSS " MACSTR
" retry delay is not over yet",
@@ -1020,9 +945,6 @@
return;
}
- wpa_s->bss_tm_status = status;
- wpas_notify_bss_tm_status(wpa_s);
-
wpabuf_put_u8(buf, WLAN_ACTION_WNM);
wpabuf_put_u8(buf, WNM_BSS_TRANS_MGMT_RESP);
wpabuf_put_u8(buf, dialog_token);