We're not allowing this to be configurable on this kernel.
Nuke this entirely to reduce resource usage.
Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com>
#define CFG_CRASH_FW_TIMEOUT_ENABLE (1)
#define CFG_CRASH_FW_TIMEOUT_DEFAULT (1)
-/* Hold wakelock for unicast RX packets for the specified duration */
-#define CFG_RX_WAKELOCK_TIMEOUT_NAME "rx_wakelock_timeout"
-#define CFG_RX_WAKELOCK_TIMEOUT_DEFAULT (50)
-#define CFG_RX_WAKELOCK_TIMEOUT_MIN (0)
-#define CFG_RX_WAKELOCK_TIMEOUT_MAX (100)
-
/*
* <ini>
* enable_5g_band_pref - Enable preference for 5G from INI.
/* beacon count before channel switch */
uint8_t sap_chanswitch_beacon_cnt;
uint8_t sap_chanswitch_mode;
- uint32_t rx_wakelock_timeout;
#ifdef WLAN_FEATURE_WOW_PULSE
bool wow_pulse_support;
uint8_t wow_pulse_pin;
/** P2P Device MAC Address for the adapter */
struct qdf_mac_addr p2pDeviceAddress;
- qdf_wake_lock_t rx_wake_lock;
qdf_wake_lock_t sap_wake_lock;
#ifdef FEATURE_WLAN_TDLS
CFG_CRASH_FW_TIMEOUT_DEFAULT,
CFG_CRASH_FW_TIMEOUT_DISABLE,
CFG_CRASH_FW_TIMEOUT_ENABLE),
- REG_VARIABLE(CFG_RX_WAKELOCK_TIMEOUT_NAME, WLAN_PARAM_Integer,
- struct hdd_config, rx_wakelock_timeout,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_RX_WAKELOCK_TIMEOUT_DEFAULT,
- CFG_RX_WAKELOCK_TIMEOUT_MIN,
- CFG_RX_WAKELOCK_TIMEOUT_MAX),
REG_VARIABLE(CFG_SAP_CH_SWITCH_BEACON_CNT, WLAN_PARAM_Integer,
struct hdd_config, sap_chanswitch_beacon_cnt,
}
/**
- * hdd_rx_wake_lock_destroy() - Destroy RX wakelock
- * @hdd_ctx: HDD context.
- *
- * Destroy RX wakelock.
- *
- * Return: None.
- */
-static void hdd_rx_wake_lock_destroy(hdd_context_t *hdd_ctx)
-{
- qdf_wake_lock_destroy(&hdd_ctx->rx_wake_lock);
-}
-
-/**
- * hdd_rx_wake_lock_create() - Create RX wakelock
- * @hdd_ctx: HDD context.
- *
- * Create RX wakelock.
- *
- * Return: None.
- */
-static void hdd_rx_wake_lock_create(hdd_context_t *hdd_ctx)
-{
- qdf_wake_lock_create(&hdd_ctx->rx_wake_lock, "qcom_rx_wakelock");
-}
-
-/**
* hdd_roc_context_init() - Init ROC context
* @hdd_ctx: HDD context.
*
hdd_sap_context_destroy(hdd_ctx);
- hdd_rx_wake_lock_destroy(hdd_ctx);
-
hdd_tdls_context_destroy(hdd_ctx);
hdd_scan_context_destroy(hdd_ctx);
hdd_tdls_context_init(hdd_ctx, false);
- hdd_rx_wake_lock_create(hdd_ctx);
-
ret = hdd_sap_context_init(hdd_ctx);
if (ret)
goto scan_destroy;
scan_destroy:
hdd_scan_context_destroy(hdd_ctx);
- hdd_rx_wake_lock_destroy(hdd_ctx);
hdd_tdls_context_destroy(hdd_ctx);
list_destroy:
skb->protocol = eth_type_trans(skb, skb->dev);
- /* hold configurable wakelock for unicast traffic */
- if (pHddCtx->config->rx_wakelock_timeout &&
- skb->pkt_type != PACKET_BROADCAST &&
- skb->pkt_type != PACKET_MULTICAST) {
- cds_host_diag_log_work(&pHddCtx->rx_wake_lock,
- pHddCtx->config->rx_wakelock_timeout,
- WIFI_POWER_EVENT_WAKELOCK_HOLD_RX);
- qdf_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- pHddCtx->config->
- rx_wakelock_timeout);
- }
-
/* Remove SKB from internal tracking table before submitting
* it to stack
*/
return false;
}
-/**
- * hdd_is_arp_local() - check if local or non local arp
- * @skb: pointer to sk_buff
- *
- * Return: true if local arp or false otherwise.
- */
-static bool hdd_is_arp_local(struct sk_buff *skb)
-{
- struct arphdr *arp;
- struct in_ifaddr **ifap = NULL;
- struct in_ifaddr *ifa = NULL;
- struct in_device *in_dev;
- unsigned char *arp_ptr;
- __be32 tip;
-
- arp = (struct arphdr *)skb->data;
- if (arp->ar_op == htons(ARPOP_REQUEST)) {
- in_dev = __in_dev_get_rtnl(skb->dev);
- if (in_dev) {
- for (ifap = &in_dev->ifa_list; (ifa = *ifap) != NULL;
- ifap = &ifa->ifa_next) {
- if (!strcmp(skb->dev->name, ifa->ifa_label))
- break;
- }
- }
-
- if (ifa && ifa->ifa_local) {
- arp_ptr = (unsigned char *)(arp + 1);
- arp_ptr += (skb->dev->addr_len + 4 +
- skb->dev->addr_len);
- memcpy(&tip, arp_ptr, 4);
- hdd_debug("ARP packet: local IP: %x dest IP: %x",
- ifa->ifa_local, tip);
- if (ifa->ifa_local == tip)
- return true;
- }
- }
-
- return false;
-}
-
-/**
- * hdd_is_rx_wake_lock_needed() - check if wake lock is needed
- * @skb: pointer to sk_buff
- *
- * RX wake lock is needed for:
- * 1) Unicast data packet OR
- * 2) Local ARP data packet
- *
- * Return: true if wake lock is needed or false otherwise.
- */
-static bool hdd_is_rx_wake_lock_needed(struct sk_buff *skb)
-{
- if ((skb->pkt_type != PACKET_BROADCAST &&
- skb->pkt_type != PACKET_MULTICAST) || hdd_is_arp_local(skb))
- return true;
-
- return false;
-}
-
#ifdef WLAN_FEATURE_TSF_PLUS
static inline void hdd_tsf_timestamp_rx(hdd_context_t *hdd_ctx,
qdf_nbuf_t netbuf,
struct sk_buff *skb = NULL;
hdd_station_ctx_t *pHddStaCtx = NULL;
unsigned int cpu_index;
- bool wake_lock = false;
bool is_arp = false;
bool track_arp = false;
uint8_t pkt_type = 0;
return QDF_STATUS_SUCCESS;
}
- /* hold configurable wakelock for unicast traffic */
- if (pHddCtx->config->rx_wakelock_timeout &&
- pHddStaCtx->conn_info.uIsAuthenticated)
- wake_lock = hdd_is_rx_wake_lock_needed(skb);
-
- if (wake_lock) {
- cds_host_diag_log_work(&pHddCtx->rx_wake_lock,
- pHddCtx->config->rx_wakelock_timeout,
- WIFI_POWER_EVENT_WAKELOCK_HOLD_RX);
- qdf_wake_lock_timeout_acquire(&pHddCtx->rx_wake_lock,
- pHddCtx->config->
- rx_wakelock_timeout);
- }
-
/* Remove SKB from internal tracking table before submitting
* it to stack
*/