|
@@ -212,7 +212,7 @@ static const struct wiphy_wowlan_support wowlan_support_reg_init = {
|
|
|
struct sock *cesium_nl_srv_sock;
|
|
|
struct completion wlan_start_comp;
|
|
|
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
|
|
|
-void wlan_hdd_auto_shutdown_cb(void);
|
|
|
+static void wlan_hdd_auto_shutdown_cb(void);
|
|
|
#endif
|
|
|
|
|
|
/**
|
|
@@ -258,7 +258,6 @@ void wlan_hdd_txrx_pause_cb(uint8_t vdev_id,
|
|
|
adapter = hdd_get_adapter_by_vdev(hdd_ctx, vdev_id);
|
|
|
|
|
|
wlan_hdd_netif_queue_control(adapter, action, reason);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/*
|
|
@@ -427,6 +426,7 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
|
|
|
case NETDEV_GOING_DOWN:
|
|
|
if (adapter->scan_info.mScanPending != false) {
|
|
|
unsigned long rc;
|
|
|
+
|
|
|
INIT_COMPLETION(adapter->scan_info.
|
|
|
abortscan_event_var);
|
|
|
hdd_abort_mac_scan(adapter->pHddCtx,
|
|
@@ -436,9 +436,8 @@ static int __hdd_netdev_notifier_call(struct notifier_block *nb,
|
|
|
rc = wait_for_completion_timeout(
|
|
|
&adapter->scan_info.abortscan_event_var,
|
|
|
msecs_to_jiffies(WLAN_WAIT_TIME_ABORTSCAN));
|
|
|
- if (!rc) {
|
|
|
+ if (!rc)
|
|
|
hdd_err("Timeout occurred while waiting for abortscan");
|
|
|
- }
|
|
|
} else {
|
|
|
hdd_debug("Scan is not Pending from user");
|
|
|
}
|
|
@@ -494,6 +493,7 @@ static int curr_con_mode;
|
|
|
enum phy_ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width)
|
|
|
{
|
|
|
uint8_t fw_ch_bw;
|
|
|
+
|
|
|
fw_ch_bw = wma_get_vht_ch_width();
|
|
|
switch (ch_width) {
|
|
|
case NL80211_CHAN_WIDTH_20_NOHT:
|
|
@@ -501,7 +501,6 @@ enum phy_ch_width hdd_map_nl_chan_width(enum nl80211_chan_width ch_width)
|
|
|
return CH_WIDTH_20MHZ;
|
|
|
case NL80211_CHAN_WIDTH_40:
|
|
|
return CH_WIDTH_40MHZ;
|
|
|
- break;
|
|
|
case NL80211_CHAN_WIDTH_80:
|
|
|
return CH_WIDTH_80MHZ;
|
|
|
case NL80211_CHAN_WIDTH_80P80:
|
|
@@ -565,9 +564,8 @@ int hdd_qdf_trace_enable(QDF_MODULE_ID module_id, uint32_t bitmask)
|
|
|
* specified in cfg.ini, so leave the logging level alone (it
|
|
|
* will remain at the "compiled in" default value)
|
|
|
*/
|
|
|
- if (CFG_QDF_TRACE_ENABLE_DEFAULT == bitmask) {
|
|
|
+ if (CFG_QDF_TRACE_ENABLE_DEFAULT == bitmask)
|
|
|
return 0;
|
|
|
- }
|
|
|
|
|
|
qdf_print_idx = qdf_get_pidx();
|
|
|
|
|
@@ -586,6 +584,7 @@ int hdd_qdf_trace_enable(QDF_MODULE_ID module_id, uint32_t bitmask)
|
|
|
if (QDF_STATUS_SUCCESS != status)
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
+
|
|
|
level++;
|
|
|
bitmask >>= 1;
|
|
|
}
|
|
@@ -810,11 +809,10 @@ static void hdd_update_tgt_services(hdd_context_t *hdd_ctx,
|
|
|
cfg->en_tdls_offchan;
|
|
|
config->fEnableTDLSBufferSta = config->fEnableTDLSBufferSta &&
|
|
|
cfg->en_tdls_uapsd_buf_sta;
|
|
|
- if (config->fTDLSUapsdMask && cfg->en_tdls_uapsd_sleep_sta) {
|
|
|
+ if (config->fTDLSUapsdMask && cfg->en_tdls_uapsd_sleep_sta)
|
|
|
config->fEnableTDLSSleepSta = true;
|
|
|
- } else {
|
|
|
+ else
|
|
|
config->fEnableTDLSSleepSta = false;
|
|
|
- }
|
|
|
#endif
|
|
|
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
|
|
|
config->isRoamOffloadEnabled &= cfg->en_roam_offload;
|
|
@@ -1597,6 +1595,7 @@ bool hdd_is_valid_mac_address(const uint8_t *pMacAddr)
|
|
|
{
|
|
|
int xdigit = 0;
|
|
|
int separator = 0;
|
|
|
+
|
|
|
while (*pMacAddr) {
|
|
|
if (isxdigit(*pMacAddr)) {
|
|
|
xdigit++;
|
|
@@ -2331,7 +2330,7 @@ static int __hdd_stop(struct net_device *dev)
|
|
|
* cleanup the data pipes and wait until the control plane is stabilized
|
|
|
* for this interface. The call also needs to wait until the above
|
|
|
* mentioned actions are completed before returning to the caller.
|
|
|
- * Notice that the hdd_stop_adapter is requested not to close the session
|
|
|
+ * Notice that hdd_stop_adapter is requested not to close the session
|
|
|
* That is intentional to be able to scan if it is a STA/P2P interface
|
|
|
*/
|
|
|
hdd_stop_adapter(hdd_ctx, adapter, true);
|
|
@@ -2524,6 +2523,7 @@ static int hdd_set_mac_address(struct net_device *dev, void *addr)
|
|
|
uint8_t *wlan_hdd_get_intf_addr(hdd_context_t *hdd_ctx)
|
|
|
{
|
|
|
int i;
|
|
|
+
|
|
|
for (i = 0; i < QDF_MAX_CONCURRENCY_PERSONA; i++) {
|
|
|
if (0 == ((hdd_ctx->config->intfAddrMask) & (1 << i)))
|
|
|
break;
|
|
@@ -2539,6 +2539,7 @@ uint8_t *wlan_hdd_get_intf_addr(hdd_context_t *hdd_ctx)
|
|
|
void wlan_hdd_release_intf_addr(hdd_context_t *hdd_ctx, uint8_t *releaseAddr)
|
|
|
{
|
|
|
int i;
|
|
|
+
|
|
|
for (i = 0; i < QDF_MAX_CONCURRENCY_PERSONA; i++) {
|
|
|
if (!memcmp(releaseAddr,
|
|
|
&hdd_ctx->config->intfMacAddr[i].bytes[0],
|
|
@@ -2547,7 +2548,6 @@ void wlan_hdd_release_intf_addr(hdd_context_t *hdd_ctx, uint8_t *releaseAddr)
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
#ifdef WLAN_FEATURE_PACKET_FILTERING
|
|
@@ -2626,7 +2626,6 @@ out:
|
|
|
if (mc_list_request)
|
|
|
qdf_mem_free(mc_list_request);
|
|
|
EXIT();
|
|
|
-
|
|
|
}
|
|
|
|
|
|
|
|
@@ -2666,7 +2665,7 @@ static uint16_t hdd_select_queue(struct net_device *dev, struct sk_buff *skb
|
|
|
return hdd_wmm_select_queue(dev, skb);
|
|
|
}
|
|
|
|
|
|
-static struct net_device_ops wlan_drv_ops = {
|
|
|
+static const struct net_device_ops wlan_drv_ops = {
|
|
|
.ndo_open = hdd_open,
|
|
|
.ndo_stop = hdd_stop,
|
|
|
.ndo_uninit = hdd_uninit,
|
|
@@ -2682,7 +2681,7 @@ static struct net_device_ops wlan_drv_ops = {
|
|
|
};
|
|
|
|
|
|
/* Monitor mode net_device_ops, doesnot Tx and most of operations. */
|
|
|
-static struct net_device_ops wlan_mon_drv_ops = {
|
|
|
+static const struct net_device_ops wlan_mon_drv_ops = {
|
|
|
.ndo_open = hdd_mon_open,
|
|
|
.ndo_stop = hdd_stop,
|
|
|
.ndo_get_stats = hdd_get_stats,
|
|
@@ -3184,6 +3183,7 @@ void hdd_cleanup_actionframe(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
|
|
|
|
|
|
if (NULL != cfgState->buf) {
|
|
|
unsigned long rc;
|
|
|
+
|
|
|
rc = wait_for_completion_timeout(
|
|
|
&adapter->tx_action_cnf_event,
|
|
|
msecs_to_jiffies(ACTION_FRAME_TX_TIMEOUT));
|
|
@@ -3196,7 +3196,6 @@ void hdd_cleanup_actionframe(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
|
|
|
hdd_send_action_cnf(adapter, false);
|
|
|
}
|
|
|
}
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -3324,19 +3323,18 @@ static void hdd_cleanup_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|
|
* The adapter is marked as closed. When hdd_wlan_exit() call returns,
|
|
|
* the driver is almost closed and cannot handle either control
|
|
|
* messages or data. However, unregister_netdevice() call above will
|
|
|
- * eventually invoke hdd_stop (ndo_close) driver callback, which attempts
|
|
|
- * to close the active connections (basically excites control path) which
|
|
|
+ * eventually invoke hdd_stop(ndo_close) driver callback, which attempts
|
|
|
+ * to close the active connections(basically excites control path) which
|
|
|
* is not right. Setting this flag helps hdd_stop() to recognize that
|
|
|
* the interface is closed and restricts any operations on that
|
|
|
*/
|
|
|
clear_bit(DEVICE_IFACE_OPENED, &adapter->event_flags);
|
|
|
|
|
|
if (test_bit(NET_DEVICE_REGISTERED, &adapter->event_flags)) {
|
|
|
- if (rtnl_held) {
|
|
|
+ if (rtnl_held)
|
|
|
unregister_netdevice(pWlanDev);
|
|
|
- } else {
|
|
|
+ else
|
|
|
unregister_netdev(pWlanDev);
|
|
|
- }
|
|
|
/*
|
|
|
* Note that the adapter is no longer valid at this point
|
|
|
* since the memory has been reclaimed
|
|
@@ -3350,6 +3348,7 @@ static QDF_STATUS hdd_check_for_existing_macaddr(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t *adapterNode = NULL, *pNext = NULL;
|
|
|
hdd_adapter_t *adapter;
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
status = hdd_get_front_adapter(hdd_ctx, &adapterNode);
|
|
|
while (NULL != adapterNode && QDF_STATUS_SUCCESS == status) {
|
|
|
adapter = adapterNode->pAdapter;
|
|
@@ -3749,9 +3748,9 @@ hdd_adapter_t *hdd_open_adapter(hdd_context_t *hdd_ctx, uint8_t session_type,
|
|
|
hdd_cleanup_adapter(hdd_ctx, adapter, rtnl_held);
|
|
|
adapter = NULL;
|
|
|
}
|
|
|
- if (NULL != pHddAdapterNode) {
|
|
|
+ if (NULL != pHddAdapterNode)
|
|
|
qdf_mem_free(pHddAdapterNode);
|
|
|
- }
|
|
|
+
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
@@ -3875,6 +3874,7 @@ void wlan_hdd_reset_prob_rspies(hdd_adapter_t *pHostapdAdapter)
|
|
|
{
|
|
|
struct qdf_mac_addr *bssid = NULL;
|
|
|
tSirUpdateIE updateIE;
|
|
|
+
|
|
|
switch (pHostapdAdapter->device_mode) {
|
|
|
case QDF_STA_MODE:
|
|
|
case QDF_P2P_CLIENT_MODE:
|
|
@@ -3964,7 +3964,9 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|
|
hdd_ctx->hHal,
|
|
|
adapter->sessionId,
|
|
|
eCSR_DISCONNECT_REASON_UNSPECIFIED);
|
|
|
- /* success implies disconnect command got queued up successfully */
|
|
|
+ /* success implies disconnect command got
|
|
|
+ * queued up successfully
|
|
|
+ */
|
|
|
if (qdf_ret_status == QDF_STATUS_SUCCESS) {
|
|
|
rc = wait_for_completion_timeout(
|
|
|
&adapter->disconnect_comp_var,
|
|
@@ -3981,9 +3983,9 @@ QDF_STATUS hdd_stop_adapter(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter,
|
|
|
wireless_send_event(adapter->dev, SIOCGIWAP, &wrqu,
|
|
|
NULL);
|
|
|
}
|
|
|
- if (scan_info != NULL && scan_info->mScanPending) {
|
|
|
+ if (scan_info != NULL && scan_info->mScanPending)
|
|
|
wlan_hdd_scan_abort(adapter);
|
|
|
- }
|
|
|
+
|
|
|
hdd_lro_disable(hdd_ctx, adapter);
|
|
|
wlan_hdd_cleanup_remain_on_channel_ctx(adapter);
|
|
|
|
|
@@ -4308,6 +4310,7 @@ static void hdd_cfg80211_connect_timeout(struct net_device *dev,
|
|
|
tSirResultCodes timeout_reason)
|
|
|
{
|
|
|
enum nl80211_timeout_reason nl_timeout_reason;
|
|
|
+
|
|
|
nl_timeout_reason = hdd_convert_timeout_reason(timeout_reason);
|
|
|
|
|
|
cfg80211_connect_timeout(dev, bssid, NULL, 0, GFP_KERNEL,
|
|
@@ -4335,6 +4338,7 @@ static void __hdd_connect_bss(struct net_device *dev, const u8 *bssid,
|
|
|
tSirResultCodes timeout_reason)
|
|
|
{
|
|
|
enum nl80211_timeout_reason nl_timeout_reason;
|
|
|
+
|
|
|
nl_timeout_reason = hdd_convert_timeout_reason(timeout_reason);
|
|
|
|
|
|
cfg80211_connect_bss(dev, bssid, bss, req_ie, req_ie_len,
|
|
@@ -4510,13 +4514,16 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx)
|
|
|
adapter->isLinkUpSvcNeeded = false;
|
|
|
adapter->scan_info.mScanPending = false;
|
|
|
|
|
|
- /* Indicate disconnect event to supplicant if associated previously */
|
|
|
+ /* Indicate disconnect event to supplicant
|
|
|
+ * if associated previously
|
|
|
+ */
|
|
|
if (eConnectionState_Associated == connState ||
|
|
|
eConnectionState_IbssConnected == connState ||
|
|
|
eConnectionState_NotConnected == connState ||
|
|
|
eConnectionState_IbssDisconnected == connState ||
|
|
|
eConnectionState_Disconnecting == connState) {
|
|
|
union iwreq_data wrqu;
|
|
|
+
|
|
|
memset(&wrqu, '\0', sizeof(wrqu));
|
|
|
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
|
|
|
memset(wrqu.ap_addr.sa_data, '\0', ETH_ALEN);
|
|
@@ -4531,14 +4538,13 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx)
|
|
|
WLAN_REASON_UNSPECIFIED);
|
|
|
} else if (eConnectionState_Connecting == connState) {
|
|
|
/*
|
|
|
- * Indicate connect failure to supplicant if we were in the
|
|
|
- * process of connecting
|
|
|
+ * Indicate connect failure to supplicant if we
|
|
|
+ * were in the process of connecting
|
|
|
*/
|
|
|
hdd_connect_result(adapter->dev, NULL, NULL,
|
|
|
NULL, 0, NULL, 0,
|
|
|
WLAN_STATUS_ASSOC_DENIED_UNSPEC,
|
|
|
- GFP_KERNEL, false,
|
|
|
- 0);
|
|
|
+ GFP_KERNEL, false, 0);
|
|
|
}
|
|
|
|
|
|
hdd_register_tx_flow_control(adapter,
|
|
@@ -4548,7 +4554,7 @@ QDF_STATUS hdd_start_all_adapters(hdd_context_t *hdd_ctx)
|
|
|
break;
|
|
|
|
|
|
case QDF_SAP_MODE:
|
|
|
- if (hdd_ctx->config->sap_internal_restart)
|
|
|
+ if (hdd_ctx->config->sap_internal_restart)
|
|
|
hdd_init_ap_mode(adapter, true);
|
|
|
|
|
|
break;
|
|
@@ -4583,6 +4589,7 @@ QDF_STATUS hdd_get_front_adapter(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t **padapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_peek_front(&hdd_ctx->hddAdapters,
|
|
|
(qdf_list_node_t **) padapterNode);
|
|
@@ -4595,6 +4602,7 @@ QDF_STATUS hdd_get_next_adapter(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t **pNextAdapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_peek_next(&hdd_ctx->hddAdapters,
|
|
|
(qdf_list_node_t *) adapterNode,
|
|
@@ -4608,6 +4616,7 @@ QDF_STATUS hdd_remove_adapter(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t *adapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_remove_node(&hdd_ctx->hddAdapters,
|
|
|
&adapterNode->node);
|
|
@@ -4619,6 +4628,7 @@ QDF_STATUS hdd_remove_front_adapter(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t **padapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_remove_front(&hdd_ctx->hddAdapters,
|
|
|
(qdf_list_node_t **) padapterNode);
|
|
@@ -4630,6 +4640,7 @@ QDF_STATUS hdd_add_adapter_back(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t *adapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_insert_back(&hdd_ctx->hddAdapters,
|
|
|
(qdf_list_node_t *) adapterNode);
|
|
@@ -4641,6 +4652,7 @@ QDF_STATUS hdd_add_adapter_front(hdd_context_t *hdd_ctx,
|
|
|
hdd_adapter_list_node_t *adapterNode)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
+
|
|
|
qdf_spin_lock_bh(&hdd_ctx->hdd_adapter_lock);
|
|
|
status = qdf_list_insert_front(&hdd_ctx->hddAdapters,
|
|
|
(qdf_list_node_t *) adapterNode);
|
|
@@ -4662,9 +4674,9 @@ hdd_adapter_t *hdd_get_adapter_by_macaddr(hdd_context_t *hdd_ctx,
|
|
|
|
|
|
if (adapter
|
|
|
&& !qdf_mem_cmp(adapter->macAddressCurrent.bytes,
|
|
|
- macAddr, sizeof(tSirMacAddr))) {
|
|
|
+ macAddr, sizeof(tSirMacAddr)))
|
|
|
return adapter;
|
|
|
- }
|
|
|
+
|
|
|
status = hdd_get_next_adapter(hdd_ctx, adapterNode, &pNext);
|
|
|
adapterNode = pNext;
|
|
|
}
|
|
@@ -4823,7 +4835,8 @@ uint8_t hdd_get_operating_channel(hdd_context_t *hdd_ctx,
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
- break; /* Found the device of interest. break the loop */
|
|
|
+ /* Found the device of interest. break the loop */
|
|
|
+ break;
|
|
|
}
|
|
|
|
|
|
status = hdd_get_next_adapter(hdd_ctx, adapterNode, &pNext);
|
|
@@ -4924,7 +4937,8 @@ static QDF_STATUS hdd_abort_sched_scan_all_adapters(hdd_context_t *hdd_ctx)
|
|
|
if (err)
|
|
|
hdd_err("Unable to stop scheduled scan");
|
|
|
}
|
|
|
- status = hdd_get_next_adapter(hdd_ctx, adapter_node, &next_node);
|
|
|
+ status = hdd_get_next_adapter(hdd_ctx, adapter_node,
|
|
|
+ &next_node);
|
|
|
adapter_node = next_node;
|
|
|
}
|
|
|
|
|
@@ -4945,8 +4959,6 @@ static QDF_STATUS hdd_abort_sched_scan_all_adapters(hdd_context_t *hdd_ctx)
|
|
|
static void hdd_wlan_unregister_ip6_notifier(hdd_context_t *hdd_ctx)
|
|
|
{
|
|
|
unregister_inet6addr_notifier(&hdd_ctx->ipv6_notifier);
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -5850,7 +5862,7 @@ static void hdd_pld_request_bus_bandwidth(hdd_context_t *hdd_ctx,
|
|
|
hdd_ctx->hbw_requested = false;
|
|
|
}
|
|
|
if (cds_sched_handle_throughput_req(false))
|
|
|
- hdd_err("low bandwidth set rx affinity fail");
|
|
|
+ hdd_warn("low bandwidth set rx affinity fail");
|
|
|
} else {
|
|
|
if (!hdd_ctx->hbw_requested) {
|
|
|
pld_request_pm_qos(hdd_ctx->parent_dev, 1);
|
|
@@ -5858,7 +5870,7 @@ static void hdd_pld_request_bus_bandwidth(hdd_context_t *hdd_ctx,
|
|
|
}
|
|
|
|
|
|
if (cds_sched_handle_throughput_req(true))
|
|
|
- hdd_err("high bandwidth set rx affinity fail");
|
|
|
+ hdd_warn("high bandwidth set rx affinity fail");
|
|
|
}
|
|
|
hdd_napi_apply_throughput_policy(hdd_ctx, tx_packets, rx_packets);
|
|
|
}
|
|
@@ -5903,7 +5915,7 @@ static void hdd_pld_request_bus_bandwidth(hdd_context_t *hdd_ctx,
|
|
|
else
|
|
|
next_tx_level = WLAN_SVC_TP_LOW;
|
|
|
|
|
|
- if (hdd_ctx->cur_tx_level != next_tx_level) {
|
|
|
+ if (hdd_ctx->cur_tx_level != next_tx_level) {
|
|
|
hdd_debug("change TCP TX trigger level %d, average_tx: %llu",
|
|
|
next_tx_level, temp_tx);
|
|
|
hdd_ctx->cur_tx_level = next_tx_level;
|
|
@@ -6196,7 +6208,6 @@ void wlan_hdd_display_tx_rx_histogram(hdd_context_t *hdd_ctx)
|
|
|
hdd_ctx->hdd_txrx_hist[i].
|
|
|
next_tx_level));
|
|
|
}
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -6213,7 +6224,7 @@ void wlan_hdd_clear_tx_rx_histogram(hdd_context_t *hdd_ctx)
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * wlan_hdd_display_netif_queue_history() - display netif queue operation history
|
|
|
+ * wlan_hdd_display_netif_queue_history() - display netif queue history
|
|
|
* @pHddCtx: hdd context
|
|
|
*
|
|
|
* Return: none
|
|
@@ -6883,7 +6894,6 @@ void hdd_ch_avoid_cb(void *hdd_context, void *indi_param)
|
|
|
return;
|
|
|
}
|
|
|
hdd_unsafe_channel_restart_sap(hdd_ctxt);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -6981,7 +6991,6 @@ void hdd_indicate_mgmt_frame(tSirSmeMgmtFrameInd *frame_ind)
|
|
|
frame_ind->frameType,
|
|
|
frame_ind->rxChan,
|
|
|
frame_ind->rxRssi);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
static void hdd_lte_coex_restart_sap(hdd_adapter_t *adapter,
|
|
@@ -8223,6 +8232,7 @@ static int hdd_platform_wlan_mac(hdd_context_t *hdd_ctx)
|
|
|
|
|
|
if (!QDF_IS_STATUS_SUCCESS(status))
|
|
|
return -EAGAIN;
|
|
|
+
|
|
|
if (no_of_mac_addr < max_mac_addr)
|
|
|
hdd_populate_random_mac_addr(hdd_ctx, max_mac_addr -
|
|
|
no_of_mac_addr);
|
|
@@ -8624,7 +8634,7 @@ static int hdd_features_init(hdd_context_t *hdd_ctx, hdd_adapter_t *adapter)
|
|
|
hdd_set_idle_ps_config(hdd_ctx, false);
|
|
|
|
|
|
if (hdd_ctx->config->enable_go_cts2self_for_sta)
|
|
|
- sme_set_cts2self_for_p2p_go(hdd_ctx->hHal);
|
|
|
+ sme_set_cts2self_for_p2p_go(hdd_ctx->hHal);
|
|
|
|
|
|
if (hdd_lro_init(hdd_ctx))
|
|
|
hdd_err("Unable to initialize LRO in fw");
|
|
@@ -9590,10 +9600,8 @@ void wlan_hdd_send_svc_nlink_msg(int radio, int type, void *data, int len)
|
|
|
|
|
|
skb = alloc_skb(NLMSG_SPACE(WLAN_NL_MAX_PAYLOAD), flags);
|
|
|
|
|
|
- if (skb == NULL) {
|
|
|
- hdd_err("alloc_skb failed");
|
|
|
+ if (skb == NULL)
|
|
|
return;
|
|
|
- }
|
|
|
|
|
|
nlh = (struct nlmsghdr *)skb->data;
|
|
|
nlh->nlmsg_pid = 0; /* from kernel */
|
|
@@ -9660,8 +9668,6 @@ void wlan_hdd_send_svc_nlink_msg(int radio, int type, void *data, int len)
|
|
|
skb_put(skb, NLMSG_SPACE(sizeof(tAniMsgHdr) + len + tlv_len));
|
|
|
|
|
|
nl_srv_bcast_svc(skb);
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
#ifdef FEATURE_WLAN_AUTO_SHUTDOWN
|
|
@@ -9947,7 +9953,7 @@ QDF_STATUS wlan_hdd_check_custom_con_channel_rules(hdd_adapter_t *sta_adapter,
|
|
|
sme_get_ap_channel_from_scan_cache(roam_profile,
|
|
|
scan_cache,
|
|
|
&channel_id);
|
|
|
- if ((QDF_STATUS_SUCCESS == status)) {
|
|
|
+ if (QDF_STATUS_SUCCESS == status) {
|
|
|
if ((QDF_SAP_MODE == device_mode) &&
|
|
|
(channel_id < SIR_11A_CHANNEL_BEGIN)) {
|
|
|
if (hdd_ap_ctx->operatingChannel != channel_id) {
|
|
@@ -10027,7 +10033,6 @@ void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter)
|
|
|
hdd_err("Can't stop ap because its not started");
|
|
|
}
|
|
|
mutex_unlock(&hdd_ctx->sap_lock);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -10095,7 +10100,6 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter, bool reinit)
|
|
|
|
|
|
end:
|
|
|
mutex_unlock(&hdd_ctx->sap_lock);
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -10154,6 +10158,7 @@ void hdd_get_fw_version(hdd_context_t *hdd_ctx,
|
|
|
int wlan_hdd_get_cpu(void)
|
|
|
{
|
|
|
int cpu_index = get_cpu();
|
|
|
+
|
|
|
put_cpu();
|
|
|
return cpu_index;
|
|
|
}
|
|
@@ -10334,8 +10339,6 @@ static void __hdd_module_exit(void)
|
|
|
|
|
|
qdf_print_idx = qdf_get_pidx();
|
|
|
qdf_print_ctrl_cleanup(qdf_print_idx);
|
|
|
-
|
|
|
- return;
|
|
|
}
|
|
|
|
|
|
#ifndef MODULE
|
|
@@ -10370,7 +10373,6 @@ static ssize_t wlan_boot_cb(struct kobject *kobj,
|
|
|
wlan_loader->loaded_state = MODULE_INITIALIZED;
|
|
|
|
|
|
return count;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -10381,7 +10383,6 @@ static ssize_t wlan_boot_cb(struct kobject *kobj,
|
|
|
*/
|
|
|
static void hdd_sysfs_cleanup(void)
|
|
|
{
|
|
|
-
|
|
|
/* remove from group */
|
|
|
if (wlan_loader->boot_wlan_obj && wlan_loader->attr_group)
|
|
|
sysfs_remove_group(wlan_loader->boot_wlan_obj,
|
|
@@ -10416,18 +10417,14 @@ static int wlan_init_sysfs(void)
|
|
|
int ret = -ENOMEM;
|
|
|
|
|
|
wlan_loader = kzalloc(sizeof(*wlan_loader), GFP_KERNEL);
|
|
|
- if (!wlan_loader) {
|
|
|
- pr_err("%s: memory alloc failed\n", __func__);
|
|
|
+ if (!wlan_loader)
|
|
|
return -ENOMEM;
|
|
|
- }
|
|
|
|
|
|
wlan_loader->boot_wlan_obj = NULL;
|
|
|
wlan_loader->attr_group = kzalloc(sizeof(*(wlan_loader->attr_group)),
|
|
|
GFP_KERNEL);
|
|
|
- if (!wlan_loader->attr_group) {
|
|
|
- pr_err("%s: malloc attr_group failed\n", __func__);
|
|
|
+ if (!wlan_loader->attr_group)
|
|
|
goto error_return;
|
|
|
- }
|
|
|
|
|
|
wlan_loader->loaded_state = 0;
|
|
|
wlan_loader->attr_group->attrs = attrs;
|
|
@@ -10642,7 +10639,7 @@ static int hdd_register_req_mode(hdd_context_t *hdd_ctx,
|
|
|
break;
|
|
|
case QDF_GLOBAL_EPPING_MODE:
|
|
|
status = epping_open();
|
|
|
- if (status != QDF_STATUS_SUCCESS) {
|
|
|
+ if (status != QDF_STATUS_SUCCESS) {
|
|
|
hdd_err("Failed to open in eeping mode: %d", status);
|
|
|
ret = -EINVAL;
|
|
|
break;
|
|
@@ -11078,13 +11075,10 @@ enum sap_acs_dfs_mode wlan_hdd_get_dfs_mode(enum dfs_mode mode)
|
|
|
switch (mode) {
|
|
|
case DFS_MODE_ENABLE:
|
|
|
return ACS_DFS_MODE_ENABLE;
|
|
|
- break;
|
|
|
case DFS_MODE_DISABLE:
|
|
|
return ACS_DFS_MODE_DISABLE;
|
|
|
- break;
|
|
|
case DFS_MODE_DEPRIORITIZE:
|
|
|
return ACS_DFS_MODE_DEPRIORITIZE;
|
|
|
- break;
|
|
|
default:
|
|
|
hdd_debug("ACS dfs mode is NONE");
|
|
|
return ACS_DFS_MODE_NONE;
|
|
@@ -11107,9 +11101,8 @@ int hdd_enable_disable_ca_event(hdd_context_t *hddctx, uint8_t set_value)
|
|
|
{
|
|
|
QDF_STATUS status;
|
|
|
|
|
|
- if (0 != wlan_hdd_validate_context(hddctx)) {
|
|
|
+ if (0 != wlan_hdd_validate_context(hddctx))
|
|
|
return -EAGAIN;
|
|
|
- }
|
|
|
|
|
|
if (!hddctx->config->goptimize_chan_avoid_event) {
|
|
|
hdd_warn("goptimize_chan_avoid_event ini param disabled");
|