From: Dmitry Shmidt Date: Thu, 12 Sep 2013 19:41:14 +0000 (-0700) Subject: Android: P2P: Restrict GO channels on A-band by locale X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d7e09e5a8dca10dd756ffb37e5780ccb33920828;p=thirdparty%2Fhostap.git Android: P2P: Restrict GO channels on A-band by locale Bug: 10641114 Change-Id: I9bb5e6f816ae84363487d77a8c6ddd1b4ae6ae0f Signed-off-by: Dmitry Shmidt --- diff --git a/src/p2p/p2p_utils.c b/src/p2p/p2p_utils.c index deb7aa9f5..e0d375600 100644 --- a/src/p2p/p2p_utils.c +++ b/src/p2p/p2p_utils.c @@ -247,6 +247,12 @@ int p2p_channels_includes_freq(const struct p2p_channels *channels, int p2p_supported_freq(struct p2p_data *p2p, unsigned int freq) { u8 op_reg_class, op_channel; + +#ifdef ANDROID_P2P + if ((freq >= 5170 && freq < 5745) && + (os_strncasecmp(p2p->cfg->country, "US", 2) == 0)) + return 0; +#endif if (p2p_freq_to_channel(freq, &op_reg_class, &op_channel) < 0) return 0; return p2p_channels_includes(&p2p->cfg->channels, op_reg_class,