[RFC] wpa_supplicant: Enable HT40 support for AP mode
Arik Nemtsov
arik
Fri Jul 6 10:58:19 PDT 2012
On Thu, Jul 5, 2012 at 3:31 PM, Rajkumar Manoharan
<rmanohar at qca.qualcomm.com> wrote:
> Right now HT40 mode is not enabled for AP/P2P GO mode in wpa_supplicant.
> If the HW is capable of 40MHz channel width and user specifies the
> secondary channel posision, lets enable the HT40 mode in wpa_s. This
> patch also enables HT40 support for P2P mode.
>
> ap_ht40_mode : -1 -> HT40MINUS, 1 -> HT40PLUS
>
> Signed-hostap: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
> ---
> wpa_supplicant/ap.c | 3 +++
> wpa_supplicant/config.c | 5 ++++-
> wpa_supplicant/config.h | 7 +++++++
> wpa_supplicant/config_file.c | 4 ++++
> wpa_supplicant/p2p_supplicant.c | 2 --
> wpa_supplicant/wpa_supplicant.c | 2 ++
> wpa_supplicant/wpa_supplicant_i.h | 1 +
> 7 files changed, 21 insertions(+), 3 deletions(-)
>
> diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c
> index f9e0045..25a07d5 100644
> --- a/wpa_supplicant/ap.c
> +++ b/wpa_supplicant/ap.c
> @@ -99,6 +99,9 @@ static int wpa_supplicant_conf_ap(struct wpa_supplicant *wpa_s,
>
> if (!no_ht && mode && mode->ht_capab) {
> conf->ieee80211n = 1;
> + if (mode->ht_capab & HT_CAP_INFO_SUPP_CHANNEL_WIDTH_SET)
> + conf->secondary_channel =
> + wpa_s->global->ap_ht40_mode;
>
> /*
> * white-list capabilities that won't cause issues
> diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
> index a68b31e..31a5d39 100644
> --- a/wpa_supplicant/config.c
> +++ b/wpa_supplicant/config.c
> @@ -2921,7 +2921,10 @@ static const struct global_parse_data global_fields[] = {
> { INT_RANGE(wps_nfc_dev_pw_id, 0x10, 0xffff), 0 },
> { BIN(wps_nfc_dh_pubkey), 0 },
> { BIN(wps_nfc_dh_privkey), 0 },
> - { BIN(wps_nfc_dev_pw), 0 }
> + { BIN(wps_nfc_dev_pw), 0 },
> +#ifdef CONFIG_IEEE80211N
> + { INT(ap_ht40_mode), 0 },
> +#endif
> };
>
> #undef FUNC
> diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
> index 46c4da2..7bb326d 100644
> --- a/wpa_supplicant/config.h
> +++ b/wpa_supplicant/config.h
> @@ -661,6 +661,13 @@ struct wpa_config {
> * wps_nfc_dh_pubkey - NFC Device Password for password token
> */
> struct wpabuf *wps_nfc_dev_pw;
> +#ifdef CONFIG_IEEE80211N
> + /**
> + * ap_ht40_mode - Specify HT40 mode secondary channel position
> + * HT40+/- mainly for AP mode
> + */
> + int ap_ht40_mode;
Another comment concerning p2p - it seems the secondary channel is
automatically determined by the operating class, so I guess this extra
variable is not necessary?
The last column of op_class[] can automatically infer the secondary channel.
Arik
More information about the Hostap
mailing list