mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
qcacld-3.0: Remove usage of fixed broadcast sta id for IBSS
Remove the usage of fixed broadcast sta id of 1 for IBSS. Fixed broadcast std id of 1 was getting used for IBSS since no concurrency was supported for IBSS earlier and sta id 1 was always used as broadcast sta id. Now with concurrency being allowed with IBSS, this fixed broadcast sta id cannot be used. Make the broadcast sta id dynamic. Change-Id: I79222e276fbdd41a8938a3a26e58af9335f17ade CRs-Fixed: 953523
This commit is contained in:
parent
d32d7007fc
commit
faa640a6ae
4 changed files with 13 additions and 14 deletions
|
|
@ -51,10 +51,6 @@
|
|||
/* Timeout (in ms) for Link to Up before Registering Station */
|
||||
#define ASSOC_LINKUP_TIMEOUT 60
|
||||
|
||||
/* In pronto case, IBSS owns the first peer for bss peer.
|
||||
In Rome case, IBSS uses the 2nd peer as bss peer */
|
||||
#define IBSS_BROADCAST_STAID 1
|
||||
|
||||
/* Type Declarations */
|
||||
/**
|
||||
* typedef eConnectionState - Connection states
|
||||
|
|
|
|||
|
|
@ -657,6 +657,8 @@ struct hdd_station_ctx {
|
|||
|
||||
/* STA ctx debug variables */
|
||||
int staDebugState;
|
||||
|
||||
uint8_t broadcast_ibss_staid;
|
||||
};
|
||||
|
||||
#define BSS_STOP 0
|
||||
|
|
|
|||
|
|
@ -1093,12 +1093,11 @@ static CDF_STATUS hdd_dis_connect_handler(hdd_adapter_t *pAdapter,
|
|||
#endif
|
||||
if (eCSR_ROAM_IBSS_LEAVE == roamStatus) {
|
||||
uint8_t i;
|
||||
sta_id = IBSS_BROADCAST_STAID;
|
||||
sta_id = pHddStaCtx->broadcast_ibss_staid;
|
||||
vstatus = hdd_roam_deregister_sta(pAdapter, sta_id);
|
||||
if (!CDF_IS_STATUS_SUCCESS(vstatus)) {
|
||||
hddLog(LOGE,
|
||||
FL("hdd_roam_deregister_sta() failed for staID %d Status=%d [0x%x]"),
|
||||
sta_id, status, status);
|
||||
hdd_err("hdd_roam_deregister_sta() failed for staID %d Status=%d [0x%x]",
|
||||
sta_id, status, status);
|
||||
status = CDF_STATUS_E_FAILURE;
|
||||
}
|
||||
pHddCtx->sta_to_adapter[sta_id] = NULL;
|
||||
|
|
@ -2346,6 +2345,8 @@ static void hdd_roam_ibss_indication_handler(hdd_adapter_t *pAdapter,
|
|||
{
|
||||
hdd_context_t *pHddCtx =
|
||||
(hdd_context_t *) pAdapter->pHddCtx;
|
||||
hdd_station_ctx_t *hdd_sta_ctx =
|
||||
WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
|
||||
struct cdf_mac_addr broadcastMacAddr =
|
||||
CDF_MAC_ADDR_BROADCAST_INITIALIZER;
|
||||
|
||||
|
|
@ -2365,10 +2366,13 @@ static void hdd_roam_ibss_indication_handler(hdd_adapter_t *pAdapter,
|
|||
/* notify wmm */
|
||||
hdd_wmm_connect(pAdapter, pRoamInfo,
|
||||
eCSR_BSS_TYPE_IBSS);
|
||||
pHddCtx->sta_to_adapter[IBSS_BROADCAST_STAID] =
|
||||
|
||||
hdd_sta_ctx->broadcast_ibss_staid = pRoamInfo->staId;
|
||||
|
||||
pHddCtx->sta_to_adapter[pRoamInfo->staId] =
|
||||
pAdapter;
|
||||
hdd_roam_register_sta(pAdapter, pRoamInfo,
|
||||
IBSS_BROADCAST_STAID,
|
||||
pRoamInfo->staId,
|
||||
&broadcastMacAddr,
|
||||
pRoamInfo->pBssDesc);
|
||||
|
||||
|
|
@ -2705,9 +2709,6 @@ roam_roam_connect_status_update_handler(hdd_adapter_t *pAdapter,
|
|||
|
||||
pHddCtx->sta_to_adapter[pRoamInfo->staId] = pAdapter;
|
||||
|
||||
pHddCtx->sta_to_adapter[IBSS_BROADCAST_STAID] =
|
||||
pAdapter;
|
||||
|
||||
/* Register the Station with TL for the new peer. */
|
||||
cdf_status = hdd_roam_register_sta(pAdapter,
|
||||
pRoamInfo,
|
||||
|
|
|
|||
|
|
@ -333,7 +333,7 @@ int hdd_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if ((STAId == HDD_WLAN_INVALID_STA_ID) &&
|
||||
(cdf_is_macaddr_broadcast(pDestMacAddress) ||
|
||||
cdf_is_macaddr_group(pDestMacAddress))) {
|
||||
STAId = IBSS_BROADCAST_STAID;
|
||||
STAId = pHddStaCtx->broadcast_ibss_staid;
|
||||
CDF_TRACE(CDF_MODULE_ID_HDD_DATA,
|
||||
CDF_TRACE_LEVEL_INFO_LOW, "%s: BC/MC packet",
|
||||
__func__);
|
||||
|
|
|
|||
Loading…
Reference in a new issue