mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-15 01:01:56 -04:00
qcacld-3.0: Fix rx wake lock getting acquired for bcast/mcast frames
RX wake lock is only required for: 1) Unicast data packets 2) Local ARP data packet Fix logic in hdd_is_arp_local() such that RX wake lock is only acquired for above 2 data packet types. Change-Id: I38899ed19f3481396663ba316abab0965e2cec56 CRs-Fixed: 2044288
This commit is contained in:
parent
7aa33ca833
commit
ef3a336f3f
1 changed files with 12 additions and 8 deletions
|
|
@ -1058,20 +1058,24 @@ static bool hdd_is_arp_local(struct sk_buff *skb)
|
|||
memcpy(&tip, arp_ptr, 4);
|
||||
hdd_info("ARP packet: local IP: %x dest IP: %x",
|
||||
ifa->ifa_local, tip);
|
||||
if (ifa->ifa_local != tip)
|
||||
return false;
|
||||
if (ifa->ifa_local == tip)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_is_rx_wake_lock_needed() - check if wake lock is needed
|
||||
* @skb: pointer to sk_buff
|
||||
*
|
||||
* Return: true if wake lock is needed or false otherwise.
|
||||
*/
|
||||
* 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 &&
|
||||
|
|
|
|||
Loading…
Reference in a new issue