|
@@ -5045,8 +5045,22 @@ struct hdd_adapter *hdd_open_adapter(struct hdd_context *hdd_ctx, uint8_t sessio
|
|
|
|
|
|
switch (session_type) {
|
|
|
case QDF_STA_MODE:
|
|
|
- if (!hdd_ctx->config->mac_provision)
|
|
|
+ if (!hdd_ctx->config->mac_provision) {
|
|
|
hdd_reset_locally_admin_bit(hdd_ctx, macAddr);
|
|
|
+ /*
|
|
|
+ * After resetting locally administered bit
|
|
|
+ * again check if the new mac address is already
|
|
|
+ * exists.
|
|
|
+ */
|
|
|
+ status = hdd_check_for_existing_macaddr(hdd_ctx,
|
|
|
+ macAddr);
|
|
|
+ if (QDF_STATUS_E_FAILURE == status) {
|
|
|
+ hdd_err("Duplicate MAC addr: " MAC_ADDRESS_STR
|
|
|
+ " already exists",
|
|
|
+ MAC_ADDR_ARRAY(macAddr));
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/* fall through */
|
|
|
case QDF_P2P_CLIENT_MODE:
|