]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
mwifiex: update 11n status as per start_ap IE
authorAvinash Patil <patila@marvell.com>
Sat, 4 Aug 2012 01:06:05 +0000 (18:06 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Aug 2012 19:12:51 +0000 (15:12 -0400)
If HT IE is present in beacon_data of start_ap cfg80211 handler,
enable 11n flag in AP. Disable 11n flag when stop_ap handler is
called.

Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/cfg80211.c
drivers/net/wireless/mwifiex/init.c
drivers/net/wireless/mwifiex/main.h
drivers/net/wireless/mwifiex/uap_cmd.c

index fe42137384da0bbae54ee0e656bf51a50cb58e68..1f80f7e13ba8d6d657a2aaf5bda0dd61dfbca5e9 100644 (file)
@@ -906,6 +906,8 @@ static int mwifiex_cfg80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
        if (mwifiex_del_mgmt_ies(priv))
                wiphy_err(wiphy, "Failed to delete mgmt IEs!\n");
 
+       priv->ap_11n_enabled = 0;
+
        if (mwifiex_send_cmd_sync(priv, HostCmd_CMD_UAP_BSS_STOP,
                                  HostCmd_ACT_GEN_SET, 0, NULL)) {
                wiphy_err(wiphy, "Failed to stop the BSS\n");
index 81fc8ed0e9764e57824c0a6352b1f42db5b22220..118a29f6e2400b4c77c73106412a45736e5a4767 100644 (file)
@@ -208,6 +208,7 @@ static int mwifiex_init_priv(struct mwifiex_private *priv)
        priv->curr_bcn_size = 0;
        priv->wps_ie = NULL;
        priv->wps_ie_len = 0;
+       priv->ap_11n_enabled = 0;
 
        priv->scan_block = false;
 
index 16f046a556b5468ab9729ebf471c0108d1b66206..5eeb17c3db00e9886b728923b48d2112eab5d791 100644 (file)
@@ -487,6 +487,7 @@ struct mwifiex_private {
        u16 assocresp_idx;
        u16 rsn_idx;
        struct timer_list scan_delay_timer;
+       u8 ap_11n_enabled;
 };
 
 enum mwifiex_ba_status {
index f40e93fe894aca64702219b8223c464a526c92bf..c10aac04be6ad291fc6f247da7f005067091ab52 100644 (file)
@@ -167,6 +167,7 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
        if (ht_ie) {
                memcpy(&bss_cfg->ht_cap, ht_ie + 2,
                       sizeof(struct ieee80211_ht_cap));
+               priv->ap_11n_enabled = 1;
        } else {
                memset(&bss_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap));
                bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP);