summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrinivas Girigowda <sgirigow@codeaurora.org>2017-03-25 17:21:35 -0700
committerSandeep Puligilla <spuligil@codeaurora.org>2017-03-31 16:00:21 -0700
commit02b5f9a8c3039b15635e38e3b757afda02b8e8cf (patch)
tree084353d277aee93560c255de937b88c83efca829
parent0a467f0f2ec9d07457e235d9df0c4f166af21d11 (diff)
qcacld-3.0: Fix kernel checkpatch warnings in wlan_hdd_tdls.c
Fix kernel checkpatch warnings in wlan_hdd_tdls.c. Change-Id: Id135de58aaea2f1bf2978aeda76226cbf2310e93 CRs-Fixed: 2024274
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c208
1 files changed, 106 insertions, 102 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index be0bb7aea9ea..9dbdff8a0eeb 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -53,7 +53,6 @@
static int32_t wlan_hdd_tdls_peer_reset_discovery_processed(tdlsCtx_t *
pHddTdlsCtx);
static void wlan_hdd_tdls_timers_destroy(tdlsCtx_t *pHddTdlsCtx);
-int wpa_tdls_is_allowed_force_peer(tdlsCtx_t *pHddTdlsCtx, u8 *mac);
static void wlan_hdd_tdls_ct_handler(void *user_data);
/**
@@ -223,7 +222,7 @@ void wlan_hdd_tdls_disable_offchan_and_teardown_links(hdd_context_t *hddctx)
if (eTDLS_SUPPORT_NOT_ENABLED == hddctx->tdls_mode) {
hdd_notice("TDLS mode is disabled OR not enabled in FW");
- return ;
+ return;
}
adapter = hdd_get_adapter(hddctx, QDF_STA_MODE);
@@ -333,9 +332,9 @@ static uint32_t wlan_hdd_tdls_discovery_sent_cnt(hdd_context_t *pHddCtx)
pAdapter = pAdapterNode->pAdapter;
pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
- if (NULL != pHddTdlsCtx) {
+ if (NULL != pHddTdlsCtx)
count = count + pHddTdlsCtx->discovery_sent_cnt;
- }
+
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
}
@@ -374,14 +373,13 @@ static void wlan_hdd_tdls_check_power_save_prohibited(hdd_adapter_t *pAdapter)
if ((0 == pHddCtx->connected_peer_count) &&
(0 == wlan_hdd_tdls_discovery_sent_cnt(pHddCtx))) {
sme_set_tdls_power_save_prohibited(WLAN_HDD_GET_HAL_CTX
- (pHddTdlsCtx->pAdapter),
+ (pHddTdlsCtx->pAdapter),
pAdapter->sessionId, 0);
return;
}
sme_set_tdls_power_save_prohibited(WLAN_HDD_GET_HAL_CTX
(pHddTdlsCtx->pAdapter),
pAdapter->sessionId, 1);
- return;
}
/**
@@ -402,7 +400,6 @@ static void wlan_hdd_tdls_free_scan_request(tdls_scan_context_t *tdls_scan_ctx)
tdls_scan_ctx->reject = 0;
tdls_scan_ctx->magic = 0;
tdls_scan_ctx->scan_request = NULL;
- return;
}
/**
@@ -468,7 +465,6 @@ static void wlan_hdd_tdls_discovery_timeout_peer_cb(void *userData)
mutex_unlock(&pHddCtx->tdls_lock);
EXIT();
- return;
}
/**
@@ -828,7 +824,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter)
pHddCtx->valid_mac_entries = 0;
pHddTdlsCtx->last_flush_ts = 0;
- /* remember configuration even if it is not used right now. it could be used later */
pHddTdlsCtx->threshold_config.tx_period_t =
pHddCtx->config->fTDLSTxStatsPeriod;
pHddTdlsCtx->threshold_config.tx_packet_n =
@@ -900,8 +895,6 @@ void wlan_hdd_tdls_exit(hdd_adapter_t *pAdapter)
goto done;
}
- /* must stop timer here before freeing peer list, because peerIdleTimer is
- part of peer list structure. */
wlan_hdd_tdls_timers_destroy(pHddTdlsCtx);
wlan_hdd_tdls_free_list(pHddTdlsCtx);
@@ -1093,6 +1086,7 @@ void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
uint32_t state = 0;
int32_t res = 0;
hdd_context_t *pHddCtx;
+
if (curr_peer == NULL) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
FL("curr_peer is NULL"));
@@ -1115,15 +1109,14 @@ void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
/* If TDLS link status is already passed the discovery state
* then clear discovery attempt count
*/
- if (status >= eTDLS_LINK_DISCOVERED) {
+ if (status >= eTDLS_LINK_DISCOVERED)
curr_peer->discovery_attempt = 0;
- }
if (curr_peer->isForcedPeer && curr_peer->state_change_notification) {
uint32_t opclass;
uint32_t channel;
-
hdd_adapter_t *adapter = curr_peer->pHddTdlsCtx->pAdapter;
+
curr_peer->reason = reason;
hdd_info("Peer is forced and the reason:%d", reason);
@@ -1135,7 +1128,6 @@ void wlan_hdd_tdls_set_peer_link_status(hddTdlsPeer_t *curr_peer,
opclass, channel,
state, res, adapter);
}
- return;
}
/**
@@ -1172,9 +1164,8 @@ void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
/* If TDLS link status is already passed the discovery state
* then clear discovery attempt count
*/
- if (linkStatus >= eTDLS_LINK_DISCOVERED) {
+ if (linkStatus >= eTDLS_LINK_DISCOVERED)
curr_peer->discovery_attempt = 0;
- }
if (curr_peer->isForcedPeer && curr_peer->state_change_notification) {
uint32_t opclass;
@@ -1190,8 +1181,6 @@ void wlan_hdd_tdls_set_link_status(hdd_adapter_t *pAdapter,
(curr_peer->state_change_notification)(mac, opclass, channel,
state, res, adapter);
}
-
- return;
}
/**
@@ -1208,8 +1197,8 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
tdlsCtx_t *pHddTdlsCtx;
hdd_context_t *pHddCtx;
int status = 0;
- ENTER();
+ ENTER();
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
@@ -1239,17 +1228,18 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
wlan_hdd_tdls_check_power_save_prohibited(pAdapter);
- if (0 == pHddTdlsCtx->discovery_sent_cnt) {
+ if (0 == pHddTdlsCtx->discovery_sent_cnt)
qdf_mc_timer_stop(&pHddTdlsCtx->peerDiscoveryTimeoutTimer);
- }
hdd_notice("Discovery(%u) Response from " MAC_ADDRESS_STR
" link_status %d", pHddTdlsCtx->discovery_sent_cnt,
MAC_ADDR_ARRAY(curr_peer->peerMac), curr_peer->link_status);
if (eTDLS_LINK_DISCOVERING == curr_peer->link_status) {
- /* Since we are here, it means Throughput threshold is alredy met. Make sure RSSI
- threshold is also met before setting up TDLS link */
+ /* Since we are here, it means Throughput threshold is
+ * alredy met. Make sure RSSI
+ * threshold is also met before setting up TDLS link
+ */
if ((int32_t) curr_peer->rssi >
(int32_t) pHddTdlsCtx->threshold_config.
rssi_trigger_threshold) {
@@ -1277,8 +1267,9 @@ int wlan_hdd_tdls_recv_discovery_resp(hdd_adapter_t *pAdapter,
eTDLS_LINK_IDLE,
eTDLS_LINK_UNSPECIFIED);
- /* if RSSI threshold is not met then allow further discovery
- * attempts by decrementing count for the last attempt
+ /* if RSSI threshold is not met then allow
+ * further discovery attempts by decrementing
+ * count for the last attempt
*/
if (curr_peer->discovery_attempt)
curr_peer->discovery_attempt--;
@@ -1620,8 +1611,6 @@ static void wlan_tdd_tdls_reset_tx_rx(tdlsCtx_t *pHddTdlsCtx)
tmp->rx_pkt = 0;
}
}
-
- return;
}
/**
@@ -1803,9 +1792,8 @@ int wlan_hdd_tdls_set_params(struct net_device *dev,
tdlsInfo_t *tdlsParams;
QDF_STATUS qdf_ret_status = QDF_STATUS_E_FAILURE;
- if (wlan_hdd_tdls_check_config(config) != 0) {
+ if (wlan_hdd_tdls_check_config(config) != 0)
return -EINVAL;
- }
/* config->tdls is mapped to 0->1, 1->2, 2->3 */
req_tdls_mode = config->tdls + 1;
@@ -1823,7 +1811,9 @@ int wlan_hdd_tdls_set_params(struct net_device *dev,
return -EINVAL;
}
- /* copy the configuration only when given tdls mode is implicit trigger enable */
+ /* Copy the configuration only when given tdls mode
+ * is implicit trigger enable
+ */
if (eTDLS_SUPPORT_ENABLED == req_tdls_mode ||
eTDLS_SUPPORT_EXTERNAL_CONTROL == req_tdls_mode) {
memcpy(&pHddTdlsCtx->threshold_config, config,
@@ -1880,7 +1870,8 @@ int wlan_hdd_tdls_set_params(struct net_device *dev,
dump_tdls_state_param_setting(tdlsParams);
- qdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal, tdlsParams, true);
+ qdf_ret_status = sme_update_fw_tdls_state(pHddCtx->hHal,
+ tdlsParams, true);
if (QDF_STATUS_SUCCESS != qdf_ret_status) {
qdf_mem_free(tdlsParams);
return -EINVAL;
@@ -2014,7 +2005,9 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
tdls_param->tdls_state = hdd_ctx->tdls_mode;
tdls_param->tdls_options = 0;
- /* Do not enable TDLS offchannel, if AP prohibited TDLS channel switch */
+ /* Do not enable TDLS offchannel,
+ * if AP prohibited TDLS channel switch
+ */
if ((hdd_ctx->config->fEnableTDLSOffChannel) &&
(!tdls_chan_swit_prohibited)) {
tdls_param->tdls_options |= ENA_TDLS_OFFCHAN;
@@ -2066,7 +2059,6 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited,
mutex_unlock(&hdd_ctx->tdls_lock);
done:
cds_set_tdls_ct_mode(hdd_ctx);
- return;
}
/**
@@ -2185,8 +2177,10 @@ int wlan_hdd_tdls_set_extctrl_param(hdd_adapter_t *pAdapter, const uint8_t *mac,
{
hddTdlsPeer_t *curr_peer;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+
if (!pHddCtx)
return -EINVAL;
+
mutex_lock(&pHddCtx->tdls_lock);
curr_peer = wlan_hdd_tdls_find_peer(pAdapter, mac);
if (curr_peer == NULL) {
@@ -2284,9 +2278,8 @@ hddTdlsPeer_t *wlan_hdd_tdls_find_peer(hdd_adapter_t *pAdapter,
return NULL;
pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
- if (NULL == pHddTdlsCtx) {
+ if (NULL == pHddTdlsCtx)
return NULL;
- }
key = wlan_hdd_tdls_hash_key(mac);
@@ -2328,9 +2321,8 @@ hddTdlsPeer_t *wlan_hdd_tdls_find_all_peer(hdd_context_t *pHddCtx,
if (NULL != pHddTdlsCtx) {
curr_peer =
wlan_hdd_tdls_find_peer(pAdapter, mac);
- if (curr_peer) {
+ if (curr_peer)
return curr_peer;
- }
}
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
@@ -2683,7 +2675,7 @@ static hddTdlsPeer_t *wlan_hdd_tdls_find_progress_peer(hdd_adapter_t *pAdapter,
struct list_head *head;
hddTdlsPeer_t *curr_peer;
struct list_head *pos;
- tdlsCtx_t *pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);;
+ tdlsCtx_t *pHddTdlsCtx = WLAN_HDD_GET_TDLS_CTX_PTR(pAdapter);
if (NULL == pHddTdlsCtx) {
hdd_notice("pHddTdlsCtx is NULL");
@@ -2738,9 +2730,8 @@ hddTdlsPeer_t *wlan_hdd_tdls_is_progress(hdd_context_t *pHddCtx,
curr_peer =
wlan_hdd_tdls_find_progress_peer(pAdapter, mac,
skip_self);
- if (curr_peer) {
+ if (curr_peer)
return curr_peer;
- }
}
status = hdd_get_next_adapter(pHddCtx, pAdapterNode, &pNext);
pAdapterNode = pNext;
@@ -2942,35 +2933,35 @@ int wlan_hdd_tdls_scan_callback(hdd_adapter_t *pAdapter, struct wiphy *wiphy,
(pHddCtx->config->fEnableTDLSSleepSta) &&
(allPeersBufStas)) {
mutex_unlock(&pHddCtx->tdls_lock);
- /* All connected peers bufStas and we can be sleepSta
- * so allow scan
+ /* All connected peers bufStas and we can be
+ * sleepSta so allow scan
*/
hdd_debug("All peers (num %d) bufSTAs, we can be sleep sta, so allow scan, tdls mode changed to %d",
connectedTdlsPeers,
pHddCtx->tdls_mode);
return 1;
- } else {
- for (i = 0; i < num; i++) {
- hdd_debug("indicate TDLS teadown (staId %d)",
- connectedPeerList[i]->staId);
- wlan_hdd_tdls_indicate_teardown
- (connectedPeerList[i]->pHddTdlsCtx->
- pAdapter, connectedPeerList[i],
- eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
- hdd_send_wlan_tdls_teardown_event(
- eTDLS_TEARDOWN_SCAN,
- connectedPeerList[i]->peerMac);
- }
- mutex_unlock(&pHddCtx->tdls_lock);
}
+ for (i = 0; i < num; i++) {
+ hdd_debug("indicate TDLS teadown (staId %d)",
+ connectedPeerList[i]->staId);
+ wlan_hdd_tdls_indicate_teardown
+ (connectedPeerList[i]->pHddTdlsCtx->
+ pAdapter, connectedPeerList[i],
+ eSIR_MAC_TDLS_TEARDOWN_UNSPEC_REASON);
+ hdd_send_wlan_tdls_teardown_event(
+ eTDLS_TEARDOWN_SCAN,
+ connectedPeerList[i]->peerMac);
+ }
+ mutex_unlock(&pHddCtx->tdls_lock);
/* schedule scan */
delay =
(unsigned long)(TDLS_DELAY_SCAN_PER_CONNECTION *
connectedTdlsPeers);
hdd_debug("tdls enabled (mode %d), connected_peers %d. schedule scan %lu msec",
- pHddCtx->tdls_mode,
- wlan_hdd_tdls_connected_peers(pAdapter), delay);
+ pHddCtx->tdls_mode,
+ wlan_hdd_tdls_connected_peers(pAdapter),
+ delay);
wlan_hdd_tdls_scan_init_work(pHddCtx, wiphy,
request,
@@ -3098,12 +3089,15 @@ int wlan_hdd_set_callback(hddTdlsPeer_t *curr_peer,
{
hdd_context_t *pHddCtx;
hdd_adapter_t *pAdapter;
+
if (!curr_peer)
return -EINVAL;
+
pAdapter = curr_peer->pHddTdlsCtx->pAdapter;
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- if ((NULL == pHddCtx))
+ if (NULL == pHddCtx)
return -EINVAL;
+
curr_peer->state_change_notification = callback;
return 0;
}
@@ -3298,9 +3292,10 @@ __wlan_hdd_cfg80211_exttdls_get_status(struct wiphy *wiphy,
ret = wlan_hdd_validate_context(pHddCtx);
if (0 != ret)
return -EINVAL;
- if (pHddCtx->config->fTDLSExternalControl == false) {
+
+ if (pHddCtx->config->fTDLSExternalControl == false)
return -ENOTSUPP;
- }
+
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TDLS_GET_STATUS_MAX,
data, data_len, wlan_hdd_tdls_config_get_status_policy)) {
hdd_err("Invalid attribute");
@@ -3556,9 +3551,9 @@ static int wlan_hdd_cfg80211_exttdls_callback(const uint8_t *mac,
if (wlan_hdd_validate_context(pHddCtx))
return -EINVAL;
- if (pHddCtx->config->fTDLSExternalControl == false) {
+ if (pHddCtx->config->fTDLSExternalControl == false)
return -ENOTSUPP;
- }
+
skb = cfg80211_vendor_event_alloc(pHddCtx->wiphy,
NULL,
EXTTDLS_EVENT_BUF_SIZE + NLMSG_HDRLEN,
@@ -3752,9 +3747,9 @@ static int __wlan_hdd_cfg80211_exttdls_disable(struct wiphy *wiphy,
status = wlan_hdd_validate_context(pHddCtx);
if (0 != status)
return -EINVAL;
- if (pHddCtx->config->fTDLSExternalControl == false) {
+ if (pHddCtx->config->fTDLSExternalControl == false)
return -ENOTSUPP;
- }
+
if (nla_parse(tb, QCA_WLAN_VENDOR_ATTR_TDLS_DISABLE_MAX,
data, data_len, wlan_hdd_tdls_config_disable_policy)) {
hdd_err("Invalid ATTR");
@@ -3877,8 +3872,9 @@ int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
}
/* first to check if we reached to maximum supported TDLS peer.
- TODO: for now, return -EPERM looks working fine,
- but need to check if any other errno fit into this category. */
+ * TODO: for now, return -EPERM looks working fine,
+ * but need to check if any other errno fit into this category
+ */
numCurrTdlsPeers = wlan_hdd_tdls_connected_peers(pAdapter);
if (pHddCtx->max_num_tdls_sta <= numCurrTdlsPeers) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
@@ -3892,6 +3888,7 @@ int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
goto error;
} else {
hddTdlsPeer_t *pTdlsPeer;
+
pTdlsPeer = wlan_hdd_tdls_find_peer(pAdapter, mac);
if (pTdlsPeer) {
link_status = pTdlsPeer->link_status;
@@ -4077,6 +4074,7 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0))
#if !(TDLS_MGMT_VERSION2)
u32 peer_capability;
+
peer_capability = 0;
#endif
#endif
@@ -4152,7 +4150,8 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
mutex_unlock(&pHddCtx->tdls_lock);
}
/* Discard TDLS Discovery request and setup confirm if violates
- ACM rules */
+ * ACM rules
+ */
if ((SIR_MAC_TDLS_DIS_REQ == action_code ||
SIR_MAC_TDLS_SETUP_CNF == action_code) &&
(hdd_wmm_is_active(pAdapter)) &&
@@ -4167,10 +4166,11 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
SIR_MAC_TDLS_SETUP_RSP == action_code) {
numCurrTdlsPeers = wlan_hdd_tdls_connected_peers(pAdapter);
if (pHddCtx->max_num_tdls_sta <= numCurrTdlsPeers) {
- /* supplicant still sends tdls_mgmt(SETUP_REQ) even after
- we return error code at 'add_station()'. Hence we have this
- check again in addtion to add_station().
- Anyway, there is no hard to double-check. */
+ /* supplicant still sends tdls_mgmt(SETUP_REQ) even
+ * after we return error code at 'add_station()'. Hence
+ * we have this check again in addtion to add_station().
+ * Anyway, there is no hard to double-check.
+ */
if (SIR_MAC_TDLS_SETUP_REQ == action_code) {
QDF_TRACE(QDF_MODULE_ID_HDD,
QDF_TRACE_LEVEL_ERROR,
@@ -4181,8 +4181,9 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
pHddCtx->max_num_tdls_sta);
return -EINVAL;
} else {
- /* maximum reached. tweak to send error code to peer and return
- error code to supplicant */
+ /* maximum reached. tweak to send error code to
+ * peer and return error code to supplicant
+ */
status_code = eSIR_MAC_UNSPEC_FAILURE_STATUS;
QDF_TRACE(QDF_MODULE_ID_HDD,
QDF_TRACE_LEVEL_ERROR,
@@ -4192,11 +4193,13 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
status_code, numCurrTdlsPeers,
pHddCtx->max_num_tdls_sta);
max_sta_failed = -EPERM;
- /* fall through to send setup resp with failure status
- code */
+ /* fall through to send setup resp with failure
+ * status code
+ */
}
} else {
hddTdlsPeer_t *pTdlsPeer;
+
mutex_lock(&pHddCtx->tdls_lock);
pTdlsPeer =
wlan_hdd_tdls_find_peer(pAdapter, peer);
@@ -4226,8 +4229,8 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
/*Except teardown responder will not be used so just make 0 */
responder = 0;
if (SIR_MAC_TDLS_TEARDOWN == action_code) {
-
hddTdlsPeer_t *pTdlsPeer;
+
mutex_lock(&pHddCtx->tdls_lock);
pTdlsPeer = wlan_hdd_tdls_find_peer(pAdapter, peerMac);
if (!pTdlsPeer) {
@@ -4255,7 +4258,8 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
}
/* For explicit trigger of DIS_REQ come out of BMPS for
- successfully receiving DIS_RSP from peer. */
+ * successfully receiving DIS_RSP from peer.
+ */
if ((SIR_MAC_TDLS_SETUP_RSP == action_code) ||
(SIR_MAC_TDLS_SETUP_CNF == action_code) ||
(SIR_MAC_TDLS_DIS_RSP == action_code) ||
@@ -4280,8 +4284,9 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
status = sme_send_tdls_mgmt_frame(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, peerMac,
- action_code, dialog_token, status_code,
- peer_capability, (uint8_t *) buf, len,
+ action_code, dialog_token,
+ status_code, peer_capability,
+ (uint8_t *) buf, len,
!responder);
if (QDF_STATUS_SUCCESS != status) {
@@ -4365,15 +4370,13 @@ static int __wlan_hdd_cfg80211_tdls_mgmt(struct wiphy *wiphy,
hdd_info("Mgmt Tx Completion status %ld TxCompletion %u",
rc, pAdapter->mgmtTxCompletionStatus);
- if (max_sta_failed) {
+ if (max_sta_failed)
return max_sta_failed;
- }
- if (SIR_MAC_TDLS_SETUP_RSP == action_code) {
+ if (SIR_MAC_TDLS_SETUP_RSP == action_code)
return wlan_hdd_tdls_set_responder(pAdapter, peerMac, false);
- } else if (SIR_MAC_TDLS_SETUP_CNF == action_code) {
+ else if (SIR_MAC_TDLS_SETUP_CNF == action_code)
return wlan_hdd_tdls_set_responder(pAdapter, peerMac, true);
- }
return 0;
}
@@ -4490,6 +4493,7 @@ int wlan_hdd_tdls_extctrl_config_peer(hdd_adapter_t *pAdapter,
hddTdlsPeer_t *pTdlsPeer;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int status = 0;
+
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
"%s : NL80211_TDLS_SETUP for " MAC_ADDRESS_STR,
__func__, MAC_ADDR_ARRAY(peer));
@@ -4591,6 +4595,7 @@ int wlan_hdd_tdls_extctrl_deconfig_peer(hdd_adapter_t *pAdapter,
hddTdlsPeer_t *pTdlsPeer;
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
int status = 0;
+
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_INFO,
"%s : NL80211_TDLS_TEARDOWN for " MAC_ADDRESS_STR,
__func__, MAC_ADDR_ARRAY(peer));
@@ -4668,8 +4673,8 @@ ret_status:
}
/**
- * __wlan_hdd_cfg80211_tdls_oper() - helper function to handle cfg80211 operation
- * on an TDLS peer
+ * __wlan_hdd_cfg80211_tdls_oper() - helper function to handle cfg80211
+ * operation on an TDLS peer
* @wiphy: wiphy
* @dev: net device
* @peer: MAC address of the TDLS peer
@@ -4793,9 +4798,9 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, peer,
&tdlsLinkEstablishParams);
- /* Send TDLS peer UAPSD capabilities to the firmware and
- * register with the TL on after the response for this operation
- * is received .
+ /* Send TDLS peer UAPSD capabilities to the
+ * firmware and register with the TL on after
+ * the response for this operation is received
*/
rc = wait_for_completion_timeout
(&pAdapter->
@@ -4989,7 +4994,9 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
} else
mutex_unlock(&pHddCtx->tdls_lock);
- /* Update TL about the UAPSD masks , to route the packets to firmware */
+ /* Update TL about the UAPSD masks,
+ * to route the packets to firmware
+ */
if ((true ==
pHddCtx->config->fEnableTDLSBufferSta)
|| pHddCtx->config->fTDLSUapsdMask) {
@@ -4999,6 +5006,7 @@ static int __wlan_hdd_cfg80211_tdls_oper(struct wiphy *wiphy,
SME_AC_BK,
SME_AC_BE};
uint8_t tlTid[4] = { 7, 5, 2, 3 };
+
hdd_info("Update TL about UAPSD masks");
for (ac = 0; ac < 4; ac++) {
status = sme_enable_uapsd_for_ac(
@@ -5227,9 +5235,9 @@ hddTdlsPeer_t *wlan_hdd_tdls_find_first_connected_peer(hdd_adapter_t *adapter)
return NULL;
hdd_tdls_ctx = WLAN_HDD_GET_TDLS_CTX_PTR(adapter);
- if (NULL == hdd_tdls_ctx) {
+ if (NULL == hdd_tdls_ctx)
return NULL;
- }
+
for (i = 0; i < TDLS_PEER_LIST_SIZE; i++) {
head = &hdd_tdls_ctx->peer_list[i];
list_for_each(pos, head) {
@@ -5566,7 +5574,6 @@ void wlan_hdd_tdls_update_rx_pkt_cnt(hdd_adapter_t *adapter,
rx_cnt_return:
qdf_spin_unlock_bh(&hdd_ctx->tdls_ct_spinlock);
- return;
}
/**
@@ -5630,7 +5637,6 @@ void wlan_hdd_tdls_update_tx_pkt_cnt(hdd_adapter_t *adapter,
tx_cnt_return:
qdf_spin_unlock_bh(&hdd_ctx->tdls_ct_spinlock);
- return;
}
/**
@@ -5695,7 +5701,6 @@ done:
hdd_tdls_ctx->curr_candidate = NULL;
hdd_tdls_ctx->magic = 0;
EXIT();
- return;
}
/**
@@ -5806,7 +5811,6 @@ static void wlan_hdd_tdls_idle_handler(void *user_data)
}
error_idle_return:
mutex_unlock(&hdd_ctx->tdls_lock);
- return;
}
/**
@@ -5877,7 +5881,9 @@ static void tdls_ct_process_connected_link(hddTdlsPeer_t *curr_peer,
hdd_tdls_ctx->threshold_config.idle_packet_n))) {
if (!curr_peer->is_peer_idle_timer_initialised) {
uint8_t staId = (uint8_t)curr_peer->staId;
+
tdlsConnInfo_t *tdls_info;
+
tdls_info = wlan_hdd_get_conn_info(hdd_ctx, staId);
qdf_mc_timer_init(&curr_peer->peer_idle_timer,
QDF_TIMER_TYPE_SW,
@@ -6109,10 +6115,10 @@ int hdd_set_tdls_scan_type(hdd_context_t *hdd_ctx, int val)
if ((val != 0) && (val != 1)) {
hdd_err("Incorrect value of tdls scan type: %d", val);
return -EINVAL;
- } else {
- hdd_ctx->config->enable_tdls_scan = val;
- return 0;
}
+
+ hdd_ctx->config->enable_tdls_scan = val;
+ return 0;
}
/**
@@ -6287,7 +6293,5 @@ void hdd_tdls_notify_p2p_roc(hdd_context_t *hdd_ctx,
qdf_mc_timer_start(&hdd_ctx->tdls_source_timer,
hdd_ctx->config->tdls_enable_defer_time);
-
- return;
}