diff options
-rw-r--r-- | qcwcn/wifi_hal/nan.cpp | 2 | ||||
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c | 22 | ||||
-rw-r--r-- | qcwcn/wpa_supplicant_8_lib/qca-vendor_copy.h | 38 |
3 files changed, 47 insertions, 15 deletions
diff --git a/qcwcn/wifi_hal/nan.cpp b/qcwcn/wifi_hal/nan.cpp index 2428e1d..e2d493e 100644 --- a/qcwcn/wifi_hal/nan.cpp +++ b/qcwcn/wifi_hal/nan.cpp @@ -1425,7 +1425,7 @@ u16 NANTLV_ReadTlv(u8 *pInTlv, pNanTlv pOutTlv, int inBufferSize) pOutTlv->length |= *pInTlv++ << 8; readLen += 2; - if(pOutTlv->length > inBufferSize - NAN_TLV_HEADER_SIZE) { + if(pOutTlv->length > (u16)(inBufferSize - NAN_TLV_HEADER_SIZE)) { ALOGE("Insufficient length to process TLV header, inBufferSize = %d", inBufferSize); return readLen; diff --git a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c index 7c34b1c..04b4ad1 100644 --- a/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c +++ b/qcwcn/wpa_supplicant_8_lib/driver_cmd_nl80211.c @@ -529,24 +529,18 @@ parse_beacon_ies: } static int parse_get_feature_info(struct resp_info *info, struct nlattr *vendata, - int datalen) + int datalen) { struct nlattr *tb_vendor[NUM_QCA_WLAN_VENDOR_FEATURES + 1]; struct nlattr *attr; - char *result = NULL; nla_parse(tb_vendor, NUM_QCA_WLAN_VENDOR_FEATURES, vendata, datalen, NULL); attr = tb_vendor[QCA_WLAN_VENDOR_ATTR_FEATURE_FLAGS]; if (attr) { - int length = snprintf( NULL, 0, "%d", nla_get_u32(attr)); - result = (char *)malloc(length + 1); - if (result != NULL) { - memset(result, 0, length + 1); - snprintf(result, length + 1, "%d", nla_get_u32(attr)); - snprintf(info->reply_buf, info->reply_buf_len, - "%s", result); - wpa_printf(MSG_DEBUG, "%s: driver supported feature info = %s", __func__, result); - } + snprintf(info->reply_buf, info->reply_buf_len, "%u", + nla_get_u32(attr)); + wpa_printf(MSG_DEBUG, "%s: driver supported feature info = %s", + __func__, info->reply_buf); } else { snprintf(info->reply_buf, info->reply_buf_len, "FAIL"); return -1; @@ -1879,9 +1873,9 @@ int wpa_driver_nl80211_driver_cmd(void *priv, char *cmd, char *buf, return strlen(buf); } else if ((ret == WPA_DRIVER_OEM_STATUS_FAILURE) && (status != 0)) { - wpa_printf(MSG_DEBUG, "%s: Received error: %d", - __func__, ret); - return -1; + wpa_printf(MSG_DEBUG, "%s: Received error: %d status: %d", + __func__, ret, status); + return status; } /* else proceed with legacy handling as below */ } diff --git a/qcwcn/wpa_supplicant_8_lib/qca-vendor_copy.h b/qcwcn/wpa_supplicant_8_lib/qca-vendor_copy.h index e727df1..5d65f44 100644 --- a/qcwcn/wpa_supplicant_8_lib/qca-vendor_copy.h +++ b/qcwcn/wpa_supplicant_8_lib/qca-vendor_copy.h @@ -8472,6 +8472,34 @@ enum qca_wlan_twt_setup_state { * This parameter is used for * 1. TWT SET Request and Response * 2. TWT GET Response + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_ID: Optional (u8) + * This attribute is used to configure Broadcast TWT ID. + * The Broadcast TWT ID indicates a specific Broadcast TWT for which the + * transmitting STA is providing TWT parameters. The allowed values are 0 to 31. + * This parameter is used for + * 1. TWT SET Request + * 2. TWT TERMINATE Request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_RECOMMENDATION: Optional (u8) + * This attribute is used to configure Broadcast TWT recommendation. + * The Broadcast TWT Recommendation subfield contains a value that indicates + * recommendations on the types of frames that are transmitted by TWT + * scheduled STAs and scheduling AP during the broadcast TWT SP. + * The allowed values are 0 - 3. + * This parameter is used for + * 1. TWT SET Request + * + * @QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_PERSISTENCE: Optional (u8) + * This attribute is used to configure Broadcast TWT Persistence. + * The Broadcast TWT Persistence subfield indicates the number of + * TBTTs during which the Broadcast TWT SPs corresponding to this + * broadcast TWT Parameter set are present. The number of beacon intervals + * during which the Broadcast TWT SPs are present is equal to the value in the + * Broadcast TWT Persistence subfield plus 1 except that the value 255 + * indicates that the Broadcast TWT SPs are present until explicitly terminated. + * This parameter is used for + * 1. TWT SET Request */ enum qca_wlan_vendor_attr_twt_setup { QCA_WLAN_VENDOR_ATTR_TWT_SETUP_INVALID = 0, @@ -8501,6 +8529,10 @@ enum qca_wlan_vendor_attr_twt_setup { QCA_WLAN_VENDOR_ATTR_TWT_SETUP_WAKE_INTVL2_MANTISSA = 21, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_ID = 22, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_RECOMMENDATION = 23, + QCA_WLAN_VENDOR_ATTR_TWT_SETUP_BCAST_PERSISTENCE = 24, + /* keep last */ QCA_WLAN_VENDOR_ATTR_TWT_SETUP_AFTER_LAST, QCA_WLAN_VENDOR_ATTR_TWT_SETUP_MAX = @@ -8542,6 +8574,10 @@ enum qca_wlan_vendor_attr_twt_setup { * @QCA_WLAN_VENDOR_TWT_STATUS_SCC_MCC_CONCURRENCY_TERMINATE: FW terminated the * TWT session due to SCC (Single Channel Concurrency) and MCC (Multi Channel * Concurrency). Used on the TWT_TERMINATE notification from the firmware. + * @QCA_WLAN_VENDOR_TWT_STATUS_ROAMING_IN_PROGRESS: FW rejected the TWT setup + * request due to roaming in progress. + * @QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS: FW rejected the TWT + * setup request due to channel switch in progress. */ enum qca_wlan_vendor_twt_status { QCA_WLAN_VENDOR_TWT_STATUS_OK = 0, @@ -8563,6 +8599,8 @@ enum qca_wlan_vendor_twt_status { QCA_WLAN_VENDOR_TWT_STATUS_PEER_INITIATED_TERMINATE = 16, QCA_WLAN_VENDOR_TWT_STATUS_ROAM_INITIATED_TERMINATE = 17, QCA_WLAN_VENDOR_TWT_STATUS_SCC_MCC_CONCURRENCY_TERMINATE = 18, + QCA_WLAN_VENDOR_TWT_STATUS_ROAMING_IN_PROGRESS = 19, + QCA_WLAN_VENDOR_TWT_STATUS_CHANNEL_SWITCH_IN_PROGRESS = 20, }; /** |