aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex/scan.c
diff options
context:
space:
mode:
authorYogesh Ashok Powar <yogeshp@marvell.com>2013-02-16 00:44:30 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-18 15:30:39 -0500
commita5f390562a375a315292648e2da865a12b42f280 (patch)
tree4df3a0938102374e0a9208b5296ced9e7590d340 /drivers/net/wireless/mwifiex/scan.c
parent073c9e6f86e58ba652c694b340f0460fc8156268 (diff)
mwifiex: add 802.11AC support
For STA mode, collect VHT realated IEs from the Beacons or Probe Responses and append similar VHT related IEs to association requests. For AP mode, get VHT related capability information and share it with cfg80211 at the time of wiphy register. This information is further used by cfg80211 and hostapd to start an AP with 802.11AC support. Currently only 8897 supports 802.11AC. Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com> Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Nishant Sarmukadam <nishants@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: Frank Huang <frankh@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r--drivers/net/wireless/mwifiex/scan.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index e275aec5a17a..db4d5ae3ff96 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1250,6 +1250,23 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
1250 sizeof(struct ieee_types_header) - 1250 sizeof(struct ieee_types_header) -
1251 bss_entry->beacon_buf); 1251 bss_entry->beacon_buf);
1252 break; 1252 break;
1253 case WLAN_EID_VHT_CAPABILITY:
1254 bss_entry->disable_11ac = false;
1255 bss_entry->bcn_vht_cap =
1256 (void *)(current_ptr +
1257 sizeof(struct ieee_types_header));
1258 bss_entry->vht_cap_offset =
1259 (u16)((u8 *)bss_entry->bcn_vht_cap -
1260 bss_entry->beacon_buf);
1261 break;
1262 case WLAN_EID_VHT_OPERATION:
1263 bss_entry->bcn_vht_oper =
1264 (void *)(current_ptr +
1265 sizeof(struct ieee_types_header));
1266 bss_entry->vht_info_offset =
1267 (u16)((u8 *)bss_entry->bcn_vht_oper -
1268 bss_entry->beacon_buf);
1269 break;
1253 case WLAN_EID_BSS_COEX_2040: 1270 case WLAN_EID_BSS_COEX_2040:
1254 bss_entry->bcn_bss_co_2040 = current_ptr + 1271 bss_entry->bcn_bss_co_2040 = current_ptr +
1255 sizeof(struct ieee_types_header); 1272 sizeof(struct ieee_types_header);
@@ -1264,6 +1281,14 @@ int mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
1264 sizeof(struct ieee_types_header) - 1281 sizeof(struct ieee_types_header) -
1265 bss_entry->beacon_buf); 1282 bss_entry->beacon_buf);
1266 break; 1283 break;
1284 case WLAN_EID_OPMODE_NOTIF:
1285 bss_entry->oper_mode =
1286 (void *)(current_ptr +
1287 sizeof(struct ieee_types_header));
1288 bss_entry->oper_mode_offset =
1289 (u16)((u8 *)bss_entry->oper_mode -
1290 bss_entry->beacon_buf);
1291 break;
1267 default: 1292 default:
1268 break; 1293 break;
1269 } 1294 }
@@ -1494,6 +1519,17 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
1494 priv->curr_bss_params.bss_descriptor.ext_cap_offset = 0; 1519 priv->curr_bss_params.bss_descriptor.ext_cap_offset = 0;
1495 priv->curr_bss_params.bss_descriptor.beacon_buf = NULL; 1520 priv->curr_bss_params.bss_descriptor.beacon_buf = NULL;
1496 priv->curr_bss_params.bss_descriptor.beacon_buf_size = 0; 1521 priv->curr_bss_params.bss_descriptor.beacon_buf_size = 0;
1522 priv->curr_bss_params.bss_descriptor.bcn_vht_cap = NULL;
1523 priv->curr_bss_params.bss_descriptor.vht_cap_offset = 0;
1524 priv->curr_bss_params.bss_descriptor.bcn_vht_oper = NULL;
1525 priv->curr_bss_params.bss_descriptor.vht_info_offset = 0;
1526 priv->curr_bss_params.bss_descriptor.oper_mode = NULL;
1527 priv->curr_bss_params.bss_descriptor.oper_mode_offset = 0;
1528
1529 /* Disable 11ac by default. Enable it only where there
1530 * exist VHT_CAP IE in AP beacon
1531 */
1532 priv->curr_bss_params.bss_descriptor.disable_11ac = true;
1497 1533
1498 /* Make a copy of current BSSID descriptor */ 1534 /* Make a copy of current BSSID descriptor */
1499 memcpy(&priv->curr_bss_params.bss_descriptor, bss_desc, 1535 memcpy(&priv->curr_bss_params.bss_descriptor, bss_desc,
@@ -2028,6 +2064,14 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
2028 (curr_bss->beacon_buf + 2064 (curr_bss->beacon_buf +
2029 curr_bss->ht_info_offset); 2065 curr_bss->ht_info_offset);
2030 2066
2067 if (curr_bss->bcn_vht_cap)
2068 curr_bss->bcn_ht_cap = (void *)(curr_bss->beacon_buf +
2069 curr_bss->vht_cap_offset);
2070
2071 if (curr_bss->bcn_vht_oper)
2072 curr_bss->bcn_ht_oper = (void *)(curr_bss->beacon_buf +
2073 curr_bss->vht_info_offset);
2074
2031 if (curr_bss->bcn_bss_co_2040) 2075 if (curr_bss->bcn_bss_co_2040)
2032 curr_bss->bcn_bss_co_2040 = 2076 curr_bss->bcn_bss_co_2040 =
2033 (curr_bss->beacon_buf + curr_bss->bss_co_2040_offset); 2077 (curr_bss->beacon_buf + curr_bss->bss_co_2040_offset);
@@ -2035,6 +2079,10 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
2035 if (curr_bss->bcn_ext_cap) 2079 if (curr_bss->bcn_ext_cap)
2036 curr_bss->bcn_ext_cap = curr_bss->beacon_buf + 2080 curr_bss->bcn_ext_cap = curr_bss->beacon_buf +
2037 curr_bss->ext_cap_offset; 2081 curr_bss->ext_cap_offset;
2082
2083 if (curr_bss->oper_mode)
2084 curr_bss->oper_mode = (void *)(curr_bss->beacon_buf +
2085 curr_bss->oper_mode_offset);
2038} 2086}
2039 2087
2040/* 2088/*