|
@@ -6545,6 +6545,7 @@ wlan_hdd_wifi_config_policy[QCA_WLAN_VENDOR_ATTR_CONFIG_MAX + 1] = {
|
|
|
[QCA_WLAN_VENDOR_ATTR_DISCONNECT_IES] = {
|
|
|
.type = NLA_BINARY,
|
|
|
.len = SIR_MAC_MAX_ADD_IE_LENGTH + 2},
|
|
|
+ [QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON] = {.type = NLA_U8 },
|
|
|
|
|
|
};
|
|
|
|
|
@@ -6877,6 +6878,61 @@ static int wlan_hdd_cfg80211_wifi_set_rx_blocksize(struct hdd_adapter *adapter,
|
|
|
return ret_val;
|
|
|
}
|
|
|
|
|
|
+/**
|
|
|
+ * hdd_set_roam_reason_vsie_status() - enable/disable inclusion of
|
|
|
+ * roam reason vsie in Reassoc
|
|
|
+ *
|
|
|
+ * @adapter: hdd adapter
|
|
|
+ * @attr: nla attr sent by supplicant
|
|
|
+ *
|
|
|
+ * Return: 0 on success, negative errno on failure
|
|
|
+ */
|
|
|
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
+static int hdd_set_roam_reason_vsie_status(struct hdd_adapter *adapter,
|
|
|
+ const struct nlattr *attr)
|
|
|
+{
|
|
|
+ uint8_t roam_reason_vsie_enabled;
|
|
|
+ int errno;
|
|
|
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
|
|
|
+ struct hdd_context *hdd_ctx = NULL;
|
|
|
+
|
|
|
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+ if (!hdd_ctx) {
|
|
|
+ hdd_err("hdd_ctx failure");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ roam_reason_vsie_enabled = nla_get_u8(attr);
|
|
|
+ if (roam_reason_vsie_enabled > 1)
|
|
|
+ roam_reason_vsie_enabled = 1;
|
|
|
+
|
|
|
+ status =
|
|
|
+ ucfg_mlme_set_roam_reason_vsie_status(hdd_ctx->psoc,
|
|
|
+ roam_reason_vsie_enabled);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("set roam reason vsie failed");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ errno = sme_cli_set_command
|
|
|
+ (adapter->vdev_id,
|
|
|
+ WMI_VDEV_PARAM_ENABLE_DISABLE_ROAM_REASON_VSIE,
|
|
|
+ roam_reason_vsie_enabled, VDEV_CMD);
|
|
|
+ if (errno) {
|
|
|
+ hdd_err("Failed to set beacon report error vsie");
|
|
|
+ status = QDF_STATUS_E_FAILURE;
|
|
|
+ }
|
|
|
+
|
|
|
+ return qdf_status_to_os_return(status);
|
|
|
+}
|
|
|
+#else
|
|
|
+static int hdd_set_roam_reason_vsie_status(struct hdd_adapter *adapter,
|
|
|
+ const struct nlattr *attr)
|
|
|
+{
|
|
|
+ return -ENOTSUPP;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
static int hdd_config_access_policy(struct hdd_adapter *adapter,
|
|
|
struct nlattr *tb[])
|
|
|
{
|
|
@@ -7812,6 +7868,8 @@ static const struct independent_setters independent_setters[] = {
|
|
|
{QCA_WLAN_VENDOR_ATTR_CONFIG_ELNA_BYPASS,
|
|
|
hdd_set_elna_bypass},
|
|
|
#endif
|
|
|
+ {QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON,
|
|
|
+ hdd_set_roam_reason_vsie_status},
|
|
|
};
|
|
|
|
|
|
#ifdef WLAN_FEATURE_ELNA
|
|
@@ -7842,6 +7900,50 @@ static int hdd_get_elna_bypass(struct hdd_adapter *adapter,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
+/**
|
|
|
+ * hdd_get_roam_reason_vsie_status() - Get roam_reason_vsie
|
|
|
+ * @adapter: Pointer to HDD adapter
|
|
|
+ * @skb: sk buffer to hold nl80211 attributes
|
|
|
+ * @attr: Pointer to struct nlattr
|
|
|
+ *
|
|
|
+ * Return: 0 on success; error number otherwise
|
|
|
+ */
|
|
|
+#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
+static int hdd_get_roam_reason_vsie_status(struct hdd_adapter *adapter,
|
|
|
+ struct sk_buff *skb,
|
|
|
+ const struct nlattr *attr)
|
|
|
+{
|
|
|
+ uint8_t roam_reason_vsie_enabled;
|
|
|
+ struct hdd_context *hdd_ctx = NULL;
|
|
|
+ QDF_STATUS status;
|
|
|
+
|
|
|
+ hdd_ctx = WLAN_HDD_GET_CTX(adapter);
|
|
|
+
|
|
|
+ status = ucfg_mlme_get_roam_reason_vsie_status
|
|
|
+ (hdd_ctx->psoc,
|
|
|
+ &roam_reason_vsie_enabled);
|
|
|
+ if (QDF_IS_STATUS_ERROR(status)) {
|
|
|
+ hdd_err("get roam reason vsie failed");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+ hdd_debug("is roam_reason_vsie_enabled %d", roam_reason_vsie_enabled);
|
|
|
+ if (nla_put_u8(skb, QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON,
|
|
|
+ roam_reason_vsie_enabled)) {
|
|
|
+ hdd_err("nla_put failure");
|
|
|
+ return -EINVAL;
|
|
|
+ }
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+#else
|
|
|
+static int hdd_get_roam_reason_vsie_status(struct hdd_adapter *adapter,
|
|
|
+ struct sk_buff *skb,
|
|
|
+ const struct nlattr *attr)
|
|
|
+{
|
|
|
+ return -EINVAL;
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
/**
|
|
|
* typedef config_getter_fn - get configuration handler
|
|
|
* @adapter: The adapter being configured
|
|
@@ -7874,6 +7976,9 @@ static const struct config_getters config_getters[] = {
|
|
|
sizeof(uint8_t),
|
|
|
hdd_get_elna_bypass},
|
|
|
#endif
|
|
|
+ {QCA_WLAN_VENDOR_ATTR_CONFIG_ROAM_REASON,
|
|
|
+ sizeof(uint8_t),
|
|
|
+ hdd_get_roam_reason_vsie_status},
|
|
|
};
|
|
|
|
|
|
/**
|