diff options
| author | Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org> | 2018-04-30 17:06:22 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-05-02 23:40:03 -0700 |
| commit | ea31c234608ea079ff8d34fb730bfcc76628969f (patch) | |
| tree | 58474bd6100e4375502c1bf7a55ae1009bb2055e | |
| parent | edd40411781f572b1b99524d803ecdbce8cc3fdb (diff) | |
qcacld-3.0: Add channel width in connect_info debugfs file
Currently, there is no entry of channel width of access point on which
STA is connected. Therefore, add channel width for easier debug of
connection issues.
Change-Id: I93839451f5c826346f68ec44e90b8e8691babd6d
CRs-Fixed: 2233481
| -rw-r--r-- | core/hdd/inc/wlan_hdd_assoc.h | 1 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_debugfs_connect.c | 35 | ||||
| -rw-r--r-- | core/sme/src/csr/csr_api_roam.c | 4 |
4 files changed, 43 insertions, 0 deletions
diff --git a/core/hdd/inc/wlan_hdd_assoc.h b/core/hdd/inc/wlan_hdd_assoc.h index f2e50a83a176..ebfd636f86d5 100644 --- a/core/hdd/inc/wlan_hdd_assoc.h +++ b/core/hdd/inc/wlan_hdd_assoc.h @@ -217,6 +217,7 @@ typedef struct connection_info_s { eCsrAuthType last_auth_type; char auth_time[HDD_TIME_STRING_LEN]; char connect_time[HDD_TIME_STRING_LEN]; + enum phy_ch_width ch_width; } connection_info_t; /* Forward declarations */ diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 14861cf52aa0..7ac7009ff301 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -1044,6 +1044,9 @@ hdd_conn_save_connect_info(hdd_adapter_t *pAdapter, tCsrRoamInfo *pRoamInfo, pHddStaCtx->conn_info.rate_flags = pRoamInfo->chan_info.rate_flags; + + pHddStaCtx->conn_info.ch_width = + pRoamInfo->chan_info.ch_width; } hdd_save_bss_info(pAdapter, pRoamInfo); } diff --git a/core/hdd/src/wlan_hdd_debugfs_connect.c b/core/hdd/src/wlan_hdd_debugfs_connect.c index bc3a413c0e86..4f291a2f758d 100644 --- a/core/hdd/src/wlan_hdd_debugfs_connect.c +++ b/core/hdd/src/wlan_hdd_debugfs_connect.c @@ -282,6 +282,39 @@ uint8_t *hdd_dot11_mode_str(uint32_t dot11mode) } /** + * hdd_ch_width_str() - Get string for channel width + * @ch_width: channel width from connect info + * + * Return: User readable string for channel width + */ +static +uint8_t *hdd_ch_width_str(enum phy_ch_width ch_width) +{ + switch (ch_width) { + case CH_WIDTH_20MHZ: + return "20MHz"; + case CH_WIDTH_40MHZ: + return "40MHz"; + case CH_WIDTH_80MHZ: + return "80MHz"; + case CH_WIDTH_160MHZ: + return "160MHz"; + case CH_WIDTH_80P80MHZ: + return "(80 + 80)MHz"; + case CH_WIDTH_5MHZ: + return "5MHz"; + case CH_WIDTH_10MHZ: + return "10MHz"; + case CH_WIDTH_INVALID: + /* Fallthrough */ + case CH_WIDTH_MAX: + /* Fallthrough */ + default: + return "UNKNOWN"; + } +} + +/** * wlan_hdd_connect_info_debugfs() - Populate connect info * @adapter: pointer to sta adapter for which connect info is required * @buf: output buffer to hold version info @@ -340,6 +373,7 @@ wlan_hdd_connect_info_debugfs(hdd_adapter_t *adapter, uint8_t *buf, "connect_time = %s\n" "auth_time = %s\n" "freq = %u\n" + "ch_width = %s\n" "signal = %ddBm\n" "bit_rate = %u\n" "last_auth_type = %s\n" @@ -349,6 +383,7 @@ wlan_hdd_connect_info_debugfs(hdd_adapter_t *adapter, uint8_t *buf, conn_info->connect_time, conn_info->auth_time, conn_info->freq, + hdd_ch_width_str(conn_info->ch_width), conn_info->signal, bit_rate, hdd_auth_type_str(conn_info->last_auth_type), diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 7197a18058ca..091fb5df49a9 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -7687,6 +7687,8 @@ static void csr_roam_process_join_res(tpAniSirGlobal mac_ctx, roam_info.chan_info.nss = join_rsp->nss; roam_info.chan_info.rate_flags = join_rsp->max_rate_flags; + roam_info.chan_info.ch_width = + join_rsp->vht_channel_width; #ifdef FEATURE_WLAN_TDLS roam_info.tdls_prohibited = join_rsp->tdls_prohibited; roam_info.tdls_chan_swit_prohibited = @@ -22607,6 +22609,8 @@ static QDF_STATUS csr_process_roam_sync_callback(tpAniSirGlobal mac_ctx, roam_info->chan_info.nss = roam_synch_data->join_rsp->nss; roam_info->chan_info.rate_flags = roam_synch_data->join_rsp->max_rate_flags; + roam_info->chan_info.ch_width = + roam_synch_data->join_rsp->vht_channel_width; csr_roam_fill_tdls_info(mac_ctx, roam_info, roam_synch_data->join_rsp); #ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH src_profile = &roam_synch_data->join_rsp->HTProfile; |
