summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Ahn <sahn@qti.qualcomm.com>2015-04-29 19:20:17 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-05-12 17:56:40 +0530
commitfbc0ff5d93f2ad7f77dfef6003408ad6118e1439 (patch)
tree642c41521cda8e09a20bf1f15d1b2fad50f22f4c
parentb5baede14742e16cb5e431e7e553c722a8d0f9ec (diff)
qcacld: Fix having wlan0 and wlanocb0 up concurrently
In the cfg.ini file, gDot11PMode=2 is used to have both wlan0 and wlanocb0 up concurrently. This has been fixed by fixing the OCB initialization code and RX code. Change-Id: I0fe4bf94cdd2d9b99c2953c4ad3264f2e5d2458b CRs-Fixed: 832546
-rw-r--r--CORE/HDD/src/wlan_hdd_ocb.c20
-rw-r--r--CORE/SERVICES/WMA/wma_ocb.c1
2 files changed, 15 insertions, 6 deletions
diff --git a/CORE/HDD/src/wlan_hdd_ocb.c b/CORE/HDD/src/wlan_hdd_ocb.c
index 379e53c39491..0a7147bce3f5 100644
--- a/CORE/HDD/src/wlan_hdd_ocb.c
+++ b/CORE/HDD/src/wlan_hdd_ocb.c
@@ -346,6 +346,7 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
VOS_STATUS vos_status = VOS_STATUS_E_FAILURE;
WLAN_STADescType sta_desc = {0};
hdd_context_t *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
+ hdd_station_ctx_t *pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(adapter);
u_int8_t peer_id;
v_MACADDR_t wildcardBSSID = {
{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
@@ -359,12 +360,7 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
return -EINVAL;
}
- /*
- * Register adapter for STA ID 0
- * TODO-OCB: This is for standalone 802.11p only. We need to change this
- * for concurrent mode
- */
- hdd_ctx->sta_to_adapter[0] = adapter;
+ hdd_ctx->sta_to_adapter[peer_id] = adapter;
sta_desc.ucSTAId = peer_id;
/* Fill in MAC addresses */
@@ -389,6 +385,15 @@ static int hdd_ocb_register_sta(hdd_adapter_t *adapter)
return -EINVAL;
}
+ if (pHddStaCtx->conn_info.staId[0] != 0 &&
+ pHddStaCtx->conn_info.staId[0] != peer_id) {
+ hddLog(LOGE, FL("The ID for the OCB station has changed."));
+ }
+
+ pHddStaCtx->conn_info.staId[0] = peer_id;
+ vos_copy_macaddr(&pHddStaCtx->conn_info.peerMacAddress[0],
+ &adapter->macAddressCurrent);
+
return 0;
}
@@ -958,6 +963,9 @@ int wlan_hdd_cfg80211_ocb_set_config(struct wiphy *wiphy,
wlan_hdd_ocb_config_channel_to_sir_ocb_config_channel(
config->channels, nla_data(channel_array), channel_count);
+ /* Identify the vdev interface */
+ config->session_id = adapter->sessionId;
+
/* Release all the mac addresses used for OCB */
for (i = 0; i < adapter->ocb_mac_addr_count; i++) {
wlan_hdd_release_intf_addr(adapter->pHddCtx,
diff --git a/CORE/SERVICES/WMA/wma_ocb.c b/CORE/SERVICES/WMA/wma_ocb.c
index bbf127e0af5d..3a87aa1bf45f 100644
--- a/CORE/SERVICES/WMA/wma_ocb.c
+++ b/CORE/SERVICES/WMA/wma_ocb.c
@@ -139,6 +139,7 @@ int wma_ocb_set_config_req(tp_wma_handle wma_handle,
return status;
}
req.chan = OCB_FREQ_TO_CHAN(config_req->channels[0].chan_freq);
+ req.vdev_id = msg->vdev_id;
if (wma_handle->ocb_config_req)
vos_mem_free(wma_handle->ocb_config_req);