diff options
| author | Abhishek Singh <absingh@codeaurora.org> | 2016-12-01 16:11:17 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-12-29 10:55:56 -0800 |
| commit | 074e7eba522081eca54a8f0315ee657d4cefc499 (patch) | |
| tree | 0e9ac07831d8801c0f0957527d129299cf75298a | |
| parent | 061f20d22025bec7ed98701ef3d90f42ae2d577c (diff) | |
qcacld-3.0: Add INI and IOCTL template for IBSS feature
Add INI and IOCTL template for IBSS feature for documentation.
Change-Id: Iaefaa697f1cfa4b2f5c9acc77f307160df591dd3
CRs-Fixed: 1097316
| -rw-r--r-- | core/hdd/inc/wlan_hdd_cfg.h | 406 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_wext.c | 72 |
2 files changed, 366 insertions, 112 deletions
diff --git a/core/hdd/inc/wlan_hdd_cfg.h b/core/hdd/inc/wlan_hdd_cfg.h index 5314f93e974a..c266a042f0b0 100644 --- a/core/hdd/inc/wlan_hdd_cfg.h +++ b/core/hdd/inc/wlan_hdd_cfg.h @@ -283,11 +283,315 @@ typedef enum { #define CFG_SHORT_PREAMBLE_MAX WNI_CFG_SHORT_PREAMBLE_STAMAX #define CFG_SHORT_PREAMBLE_DEFAULT WNI_CFG_SHORT_PREAMBLE_STADEF +/* + * <ini> + * gIbssBssid - Default IBSS BSSID if BSSID is not provided by supplicant + * @Min: "000000000000" + * @Max: "ffffffffffff" + * @Default: "000AF5040506" + * + * This ini is used to set Default IBSS BSSID if BSSID + * is not provided by supplicant and Coalesing is disabled + * + * Related: Only applicable if gCoalesingInIBSS is 0 + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ #define CFG_IBSS_BSSID_NAME "gIbssBssid" #define CFG_IBSS_BSSID_MIN "000000000000" #define CFG_IBSS_BSSID_MAX "ffffffffffff" #define CFG_IBSS_BSSID_DEFAULT "000AF5040506" +/* + * <ini> + * gAdHocChannel5G - Default 5Ghz IBSS channel if channel is not + * provided by supplicant. + * @Min: 36 + * @Max: 165 + * @Default: 44 + * + * This ini is used to set default 5Ghz IBSS channel + * if channel is not provided by supplicant and band is 5Ghz + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_NAME "gAdHocChannel5G" +#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MIN (36) +#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MAX (165) +#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_DEFAULT (44) + +/* + * <ini> + * gAdHocChannel24G - Default 2.4Ghz IBSS channel if channel is not + * provided by supplicant. + * @Min: 1 + * @Max: 14 + * @Default: 6 + * + * This ini is used to set default 2.4Ghz IBSS channel + * if channel is not provided by supplicant and band is 2.4Ghz + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_NAME "gAdHocChannel24G" +#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN (1) +#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX (14) +#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_DEFAULT (6) + +/* + * <ini> + * gCoalesingInIBSS - If IBSS coalesing is enabled. + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to set IBSS coalesing + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_COALESING_IN_IBSS_NAME "gCoalesingInIBSS" +#define CFG_COALESING_IN_IBSS_MIN (0) +#define CFG_COALESING_IN_IBSS_MAX (1) +#define CFG_COALESING_IN_IBSS_DEFAULT (0) /* disabled */ + +/* + * <ini> + * gIbssATIMWinSize - Set IBSS ATIM window size + * @Min: 0 + * @Max: 50 + * @Default: 0 + * + * This ini is used to set IBSS ATIM window size + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_ATIM_WIN_SIZE_NAME "gIbssATIMWinSize" +#define CFG_IBSS_ATIM_WIN_SIZE_MIN (0) +#define CFG_IBSS_ATIM_WIN_SIZE_MAX (50) +#define CFG_IBSS_ATIM_WIN_SIZE_DEFAULT (0) + + +/* + * <ini> + * gIbssIsPowerSaveAllowed - Indicates if IBSS Power Save is + * supported or not + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to Indicates if IBSS Power Save is + * supported or not. When not allowed,IBSS station has + * to stay awake all the time and should never set PM=1 + * in its transmitted frames. + * + * Related: valid only when gIbssATIMWinSize is non-zero + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_NAME "gIbssIsPowerSaveAllowed" +#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MIN (0) +#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MAX (1) +#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_DEFAULT (1) + +/* + * <ini> + * gIbssIsPowerCollapseAllowed - Indicates if IBSS Power Collapse + * is allowed + * @Min: 0 + * @Max: 1 + * @Default: 1 + * + * This ini is used to indicates if IBSS Power Collapse + * is allowed + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_NAME "gIbssIsPowerCollapseAllowed" +#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MIN (0) +#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MAX (1) +#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_DEFAULT (1) + +/* + * <ini> + * gIbssAwakeOnTxRx - Indicates whether IBSS station + * can exit power save mode and enter power active + * state whenever there is a TX/RX activity. + * + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * This ini is used to ndicates whether IBSS station + * can exit power save mode and enter power active + * state whenever there is a TX/RX activity. + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_AWAKE_ON_TX_RX_NAME "gIbssAwakeOnTxRx" +#define CFG_IBSS_AWAKE_ON_TX_RX_MIN (0) +#define CFG_IBSS_AWAKE_ON_TX_RX_MAX (1) +#define CFG_IBSS_AWAKE_ON_TX_RX_DEFAULT (0) + +/* + * <ini> + * gIbssInactivityTime - Indicates the data + * inactivity time in number of beacon intervals + * after which IBSS station re-inters power save + * + * @Min: 1 + * @Max: 10 + * @Default: 1 + * + * In IBSS mode if Awake on TX/RX activity is enabled + * Ibss Inactivity parameter indicates the data + * inactivity time in number of beacon intervals + * after which IBSS station re-inters power save + * by sending Null frame with PM=1 + * + * Related: Aplicable if gIbssAwakeOnTxRx is enabled + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_INACTIVITY_TIME_NAME "gIbssInactivityTime" +#define CFG_IBSS_INACTIVITY_TIME_MIN (1) +#define CFG_IBSS_INACTIVITY_TIME_MAX (10) +#define CFG_IBSS_INACTIVITY_TIME_DEFAULT (1) + +/* + * <ini> + * gIbssTxSpEndInactivityTime - Indicates the time after + * which TX Service Period is terminated by + * sending a Qos Null frame with EOSP. + * + * @Min: 0 + * @Max: 100 + * @Default: 0 + * + * In IBSS mode Tx Service Period Inactivity + * time in msecs indicates the time after + * which TX Service Period is terminated by + * sending a Qos Null frame with EOSP. + * If value is 0, TX SP is terminated with the + * last buffered packet itself instead of waiting + * for the inactivity. + * + * Related: None + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_TXSP_END_INACTIVITY_NAME "gIbssTxSpEndInactivityTime" +#define CFG_IBSS_TXSP_END_INACTIVITY_MIN (0) +#define CFG_IBSS_TXSP_END_INACTIVITY_MAX (100) +#define CFG_IBSS_TXSP_END_INACTIVITY_DEFAULT (0) + +/* + * <ini> + * gIbssPsWarmupTime - PS-supporting device + * does not enter protocol sleep state during first + * gIbssPsWarmupTime seconds. + * + * @Min: 0 + * @Max: 65535 + * @Default: 0 + * + * When IBSS network is initialized, PS-supporting device + * does not enter protocol sleep state during first + * gIbssPsWarmupTime seconds. + * + * Related: valid if gIbssIsPowerSaveAllowed is set + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_PS_WARMUP_TIME_NAME "gIbssPsWarmupTime" +#define CFG_IBSS_PS_WARMUP_TIME_MIN (0) +/* Allow unsigned Int Max for now */ +#define CFG_IBSS_PS_WARMUP_TIME_MAX (65535) +#define CFG_IBSS_PS_WARMUP_TIME_DEFAULT (0) + +/* + * <ini> + * gIbssPsWarmupTime - IBSS Power Save Enable/Disable 1 RX + * chain usage during the ATIM window + * + * @Min: 0 + * @Max: 1 + * @Default: 0 + * + * IBSS Power Save Enable/Disable 1 RX + * chain usage during the ATIM window + * + * Related: Depend on gIbssIsPowerSaveAllowed + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ini> + */ +#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_NAME "gIbssPs1RxChainInAtim" +#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN (0) +#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX (1) +#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_DEFAULT (0) + + + + #define CFG_INTF0_MAC_ADDR_NAME "Intf0MacAddress" #define CFG_INTF0_MAC_ADDR_MIN "000000000000" #define CFG_INTF0_MAC_ADDR_MAX "ffffffffffff" @@ -2696,19 +3000,6 @@ typedef enum { #define CFG_DISABLE_LDPC_WITH_TXBF_AP_MAX (1) #define CFG_DISABLE_LDPC_WITH_TXBF_AP_DEFAULT (0) -/* - * IBSS Operating Channels for 2.4G and 5GHz channels - */ -#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_NAME "gAdHocChannel5G" -#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MIN (36) -#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_MAX (165) -#define CFG_IBSS_ADHOC_CHANNEL_5GHZ_DEFAULT (44) - -#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_NAME "gAdHocChannel24G" -#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MIN (1) -#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_MAX (14) -#define CFG_IBSS_ADHOC_CHANNEL_24GHZ_DEFAULT (6) - /* Parameter to control VHT support in 2.4 GHz band */ #define CFG_ENABLE_VHT_FOR_24GHZ_NAME "gEnableVhtFor24GHzBand" #define CFG_ENABLE_VHT_FOR_24GHZ_MIN (0) @@ -2926,95 +3217,6 @@ typedef enum { #define CFG_WOW_ENABLE_MAX (3) #define CFG_WOW_STATUS_DEFAULT (3) -#define CFG_COALESING_IN_IBSS_NAME "gCoalesingInIBSS" -#define CFG_COALESING_IN_IBSS_MIN (0) -#define CFG_COALESING_IN_IBSS_MAX (1) -#define CFG_COALESING_IN_IBSS_DEFAULT (0) /* disabled */ - -#define CFG_IBSS_ATIM_WIN_SIZE_NAME "gIbssATIMWinSize" -#define CFG_IBSS_ATIM_WIN_SIZE_MIN (0) -#define CFG_IBSS_ATIM_WIN_SIZE_MAX (50) -#define CFG_IBSS_ATIM_WIN_SIZE_DEFAULT (0) - -/* - * Indicates if IBSS Power Save is - * supported or not. When not allowed, - * IBSS station has to stay awake all - * the time and should never set PM=1 - * in its transmitted frames. This - * parameter is meaningful/valid only - * when gIbssATIMWinSize is non-zero - */ -#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_NAME "gIbssIsPowerSaveAllowed" -#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MIN (0) -#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_MAX (1) -#define CFG_IBSS_IS_POWER_SAVE_ALLOWED_DEFAULT (1) - -/* - * Indicates if IBSS Power Collapse - * is allowed or not. - */ -#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_NAME "gIbssIsPowerCollapseAllowed" -#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MIN (0) -#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_MAX (1) -#define CFG_IBSS_IS_POWER_COLLAPSE_ALLOWED_DEFAULT (1) - -/* - * This parameter indicates whether IBSS station - * can exit power save mode and enter power active - * state whenever there is a TX/RX activity. - */ -#define CFG_IBSS_AWAKE_ON_TX_RX_NAME "gIbssAwakeOnTxRx" -#define CFG_IBSS_AWAKE_ON_TX_RX_MIN (0) -#define CFG_IBSS_AWAKE_ON_TX_RX_MAX (1) -#define CFG_IBSS_AWAKE_ON_TX_RX_DEFAULT (0) - -/* - * In IBSS mode if Awake on TX/RX activity is enabled - * Ibss Inactivity parameter indicates the data - * inactivity time in number of beacon intervals - * after which IBSS station re-inters power save - * by sending Null frame with PM=1 - */ -#define CFG_IBSS_INACTIVITY_TIME_NAME "gIbssInactivityTime" -#define CFG_IBSS_INACTIVITY_TIME_MIN (1) -#define CFG_IBSS_INACTIVITY_TIME_MAX (10) -#define CFG_IBSS_INACTIVITY_TIME_DEFAULT (1) - -/* - * In IBSS mode Tx Service Period Inactivity - * time in msecs indicates the time after - * which TX Service Period is terminated by - * sending a Qos Null frame with EOSP. - * If value is 0, TX SP is terminated with the - * last buffered packet itself instead of waiting - * for the inactivity - */ -#define CFG_IBSS_TXSP_END_INACTIVITY_NAME "gIbssTxSpEndInactivityTime" -#define CFG_IBSS_TXSP_END_INACTIVITY_MIN (0) -#define CFG_IBSS_TXSP_END_INACTIVITY_MAX (100) -#define CFG_IBSS_TXSP_END_INACTIVITY_DEFAULT (0) - -/* - * When IBSS network is initialized, PS-supporting device - * does not enter protocol sleep state during first - * gIbssPsWarmupTime seconds. - */ -#define CFG_IBSS_PS_WARMUP_TIME_NAME "gIbssPsWarmupTime" -#define CFG_IBSS_PS_WARMUP_TIME_MIN (0) -/* Allow unsigned Int Max for now */ -#define CFG_IBSS_PS_WARMUP_TIME_MAX (65535) -#define CFG_IBSS_PS_WARMUP_TIME_DEFAULT (0) - -/* - * IBSS Power Save Enable/Disable 1 RX - * chain usage during the ATIM window - */ -#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_NAME "gIbssPs1RxChainInAtim" -#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MIN (0) -#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_MAX (1) -#define CFG_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_DEFAULT (0) - #define CFG_SAP_MAX_NO_PEERS "gSoftApMaxPeers" #define CFG_SAP_MAX_NO_PEERS_MIN (1) #define CFG_SAP_MAX_NO_PEERS_MAX (32) diff --git a/core/hdd/src/wlan_hdd_wext.c b/core/hdd/src/wlan_hdd_wext.c index 2076b61de086..175f35975be8 100644 --- a/core/hdd/src/wlan_hdd_wext.c +++ b/core/hdd/src/wlan_hdd_wext.c @@ -301,7 +301,6 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_INT (SIOCIWFIRSTPRIV + 1) #define WE_GET_11D_STATE 1 -#define WE_IBSS_STATUS 2 #define WE_SET_SAP_CHANNELS 3 #define WE_GET_WLAN_DBG 4 #define WE_GET_MAX_ASSOC 6 @@ -461,6 +460,26 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { #define WE_GET_11W_INFO 9 #endif #define WE_GET_STATES 10 +/* + * <ioctl> + * getIbssSTAs - get ibss sta info + * + * @INPUT: None + * + * @OUTPUT: Give the MAC of the IBSS STA + * wlan0 getIbssSTAs: + * 1 .8c:fd:f0:01:9c:bf + * + * This IOCTL is used to get ibss sta info + * + * @E.g: iwpriv wlan0 getIbssSTAs + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ioctl> + */ #define WE_GET_IBSS_STA_INFO 11 #define WE_GET_PHYMODE 12 #ifdef FEATURE_OEM_DATA_SUPPORT @@ -472,6 +491,27 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { /* Private ioctls and their sub-ioctls */ #define WLAN_PRIV_SET_NONE_GET_NONE (SIOCIWFIRSTPRIV + 6) #define WE_SET_REASSOC_TRIGGER 8 +/* + * <ioctl> + * ibssPeerInfoAll - Print the ibss peers's MAC, rate and RSSI + * + * @INPUT: None + * + * @OUTPUT: print ibss peer in info logs + * pPeerInfo->numIBSSPeers = 1 + * PEER ADDR : 8c:fd:f0:01:9c:bf TxRate: 1 Mbps RSSI: -35 + * + * This IOCTL is used to rint the ibss peers's MAC, rate and RSSI + * in info logs + * + * @E.g: iwpriv wlan0 ibssPeerInfoAll + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ioctl> + */ #define WE_IBSS_GET_PEER_INFO_ALL 10 #define WE_DUMP_AGC_START 11 #define WE_DUMP_AGC 12 @@ -531,6 +571,27 @@ static const hdd_freq_chan_map_t freq_chan_map[] = { #define WE_TDLS_CONFIG_PARAMS 5 #endif +/* + * <ioctl> + * ibssPeerInfo - Print the ibss peers's MAC, rate and RSSI + * + * @INPUT: staid + * + * @OUTPUT: print ibss peer corresponding to staid in info logs + * PEER ADDR : 8c:fd:f0:01:9c:bf TxRate: 1 Mbps RSSI: -35 + * + * This IOCTL is used to print the specific ibss peers's MAC, + * rate and RSSI in info logs + * + * @E.g: iwpriv wlan0 ibssPeerInfo <sta_id> + * iwpriv wlan0 ibssPeerInfo 0 + * + * Supported Feature: IBSS + * + * Usage: Internal/External + * + * </ioctl> + */ #define WE_IBSS_GET_PEER_INFO 6 #define WE_UNIT_TEST_CMD 7 @@ -7033,10 +7094,6 @@ static int __iw_setnone_getint(struct net_device *dev, break; } - case WE_IBSS_STATUS: - hdd_notice("****Return IBSS Status*****"); - break; - case WE_GET_WLAN_DBG: { qdf_trace_display(); @@ -10952,11 +11009,6 @@ static const struct iw_priv_args we_private_args[] = { IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get11Dstate"}, - {WE_IBSS_STATUS, - 0, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, - "getAdhocStatus"}, - {WE_GET_WLAN_DBG, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, |
