aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorArik Nemtsov <arik@wizery.com>2012-08-30 22:07:57 +0300
committerArik Nemtsov <arik@wizery.com>2012-09-04 20:46:20 +0300
commit58a188a9a8e3b453306b46e06cdbced6d50107d3 (patch)
tree9d1731084c6f2698b99c8dda3f54f6dd275f78b0 /src
parent66b8140a08b9f6297cd49a3428ada713bf668300 (diff)
downloadexternal_wpa_supplicant_8_ti-58a188a9a8e3b453306b46e06cdbced6d50107d3.zip
external_wpa_supplicant_8_ti-58a188a9a8e3b453306b46e06cdbced6d50107d3.tar.gz
external_wpa_supplicant_8_ti-58a188a9a8e3b453306b46e06cdbced6d50107d3.tar.bz2
P2P: prefer operating channels where HT40 is possible
When no other user preference is specified, opt to use an operating channel that allows HT40 operation. This way, if driver capabilities and regulatory constraints allow, we might enjoy increased bandwidth. Signed-hostap: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'src')
-rw-r--r--src/p2p/p2p_go_neg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/p2p/p2p_go_neg.c b/src/p2p/p2p_go_neg.c
index 407897b..8c2ad3a 100644
--- a/src/p2p/p2p_go_neg.c
+++ b/src/p2p/p2p_go_neg.c
@@ -366,6 +366,21 @@ static void p2p_reselect_channel(struct p2p_data *p2p,
}
}
+ /* Try a channel where we might be able to use HT40 */
+ for (i = 0; i < intersection->reg_classes; i++) {
+ struct p2p_reg_class *c = &intersection->reg_class[i];
+ if (c->reg_class == 116 || c->reg_class == 117 ||
+ c->reg_class == 126 || c->reg_class == 127) {
+ wpa_msg(p2p->cfg->msg_ctx, MSG_DEBUG,
+ "P2P: Pick possible HT40 channel (reg_class "
+ "%u channel %u) from intersection",
+ c->reg_class, c->channel[0]);
+ p2p->op_reg_class = c->reg_class;
+ p2p->op_channel = c->channel[0];
+ return;
+ }
+ }
+
/*
* Try to see if the original channel is in the intersection. If
* so, no need to change anything, as it already contains some