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/src/p2p/p2p.c b/src/p2p/p2p.c
index 47d95ae..585b4a0 100644
--- a/src/p2p/p2p.c
+++ b/src/p2p/p2p.c
@@ -1470,8 +1470,7 @@
p2p->op_channel = p2p->cfg->op_channel;
} else if (p2p_channel_random_social(&p2p->cfg->channels,
&p2p->op_reg_class,
- &p2p->op_channel,
- NULL, NULL) == 0) {
+ &p2p->op_channel) == 0) {
p2p_dbg(p2p, "Select random available social channel (op_class %u channel %u) as operating channel preference",
p2p->op_reg_class, p2p->op_channel);
} else {
@@ -4770,12 +4769,9 @@
int p2p_config_get_random_social(struct p2p_config *p2p, u8 *op_class,
- u8 *op_channel,
- struct wpa_freq_range_list *avoid_list,
- struct wpa_freq_range_list *disallow_list)
+ u8 *op_channel)
{
- return p2p_channel_random_social(&p2p->channels, op_class, op_channel,
- avoid_list, disallow_list);
+ return p2p_channel_random_social(&p2p->channels, op_class, op_channel);
}
diff --git a/src/p2p/p2p.h b/src/p2p/p2p.h
index f2969ee..fac5ce0 100644
--- a/src/p2p/p2p.h
+++ b/src/p2p/p2p.h
@@ -104,11 +104,6 @@
unsigned int vht_center_freq2;
/**
- * he - Indicates if IEEE 802.11ax HE is enabled
- */
- int he;
-
- /**
* ssid - SSID of the group
*/
u8 ssid[SSID_MAX_LEN];
@@ -2010,8 +2005,6 @@
* @p2p: P2P config
* @op_class: Selected operating class
* @op_channel: Selected social channel
- * @avoid_list: Channel ranges to try to avoid or %NULL
- * @disallow_list: Channel ranges to discard or %NULL
* Returns: 0 on success, -1 on failure
*
* This function is used before p2p_init is called. A random social channel
@@ -2019,9 +2012,7 @@
* returned on success.
*/
int p2p_config_get_random_social(struct p2p_config *p2p, u8 *op_class,
- u8 *op_channel,
- struct wpa_freq_range_list *avoid_list,
- struct wpa_freq_range_list *disallow_list);
+ u8 *op_channel);
int p2p_set_listen_channel(struct p2p_data *p2p, u8 reg_class, u8 channel,
u8 forced);
diff --git a/src/p2p/p2p_i.h b/src/p2p/p2p_i.h
index 64a9977..a73d99e 100644
--- a/src/p2p/p2p_i.h
+++ b/src/p2p/p2p_i.h
@@ -718,9 +718,7 @@
int p2p_channel_select(struct p2p_channels *chans, const int *classes,
u8 *op_class, u8 *op_channel);
int p2p_channel_random_social(struct p2p_channels *chans, u8 *op_class,
- u8 *op_channel,
- struct wpa_freq_range_list *avoid_list,
- struct wpa_freq_range_list *disallow_list);
+ u8 *op_channel);
/* p2p_parse.c */
void p2p_copy_filter_devname(char *dst, size_t dst_len,
diff --git a/src/p2p/p2p_invitation.c b/src/p2p/p2p_invitation.c
index 77d662a..bbba001 100644
--- a/src/p2p/p2p_invitation.c
+++ b/src/p2p/p2p_invitation.c
@@ -488,7 +488,7 @@
if (*msg.status == P2P_SC_FAIL_NO_COMMON_CHANNELS &&
p2p->retry_invite_req &&
p2p_channel_random_social(&p2p->cfg->channels, &p2p->op_reg_class,
- &p2p->op_channel, NULL, NULL) == 0) {
+ &p2p->op_channel) == 0) {
p2p->retry_invite_req = 0;
p2p->cfg->send_action_done(p2p->cfg->cb_ctx);
p2p->cfg->stop_listen(p2p->cfg->cb_ctx);
diff --git a/src/p2p/p2p_utils.c b/src/p2p/p2p_utils.c
index 1a62a44..2e2aa8a 100644
--- a/src/p2p/p2p_utils.c
+++ b/src/p2p/p2p_utils.c
@@ -413,30 +413,17 @@
int p2p_channel_random_social(struct p2p_channels *chans, u8 *op_class,
- u8 *op_channel,
- struct wpa_freq_range_list *avoid_list,
- struct wpa_freq_range_list *disallow_list)
+ u8 *op_channel)
{
u8 chan[4];
unsigned int num_channels = 0;
- /* Try to find available social channels from 2.4 GHz.
- * If the avoid_list includes any of the 2.4 GHz social channels, that
- * channel is not allowed by p2p_channels_includes() rules. However, it
- * is assumed to allow minimal traffic for P2P negotiation, so allow it
- * here for social channel selection unless explicitly disallowed in the
- * disallow_list. */
- if (p2p_channels_includes(chans, 81, 1) ||
- (freq_range_list_includes(avoid_list, 2412) &&
- !freq_range_list_includes(disallow_list, 2412)))
+ /* Try to find available social channels from 2.4 GHz */
+ if (p2p_channels_includes(chans, 81, 1))
chan[num_channels++] = 1;
- if (p2p_channels_includes(chans, 81, 6) ||
- (freq_range_list_includes(avoid_list, 2437) &&
- !freq_range_list_includes(disallow_list, 2437)))
+ if (p2p_channels_includes(chans, 81, 6))
chan[num_channels++] = 6;
- if (p2p_channels_includes(chans, 81, 11) ||
- (freq_range_list_includes(avoid_list, 2462) &&
- !freq_range_list_includes(disallow_list, 2462)))
+ if (p2p_channels_includes(chans, 81, 11))
chan[num_channels++] = 11;
/* Try to find available social channels from 60 GHz */