• Amitkumar Karwar's avatar
    mwifiex: add packet coalesce support · 562fc5b3
    Amitkumar Karwar authored
    Coalesce filters are configured in firmware based on settings
    received from cfg80211.
    
    Packet type which is required by firmware is determined based on
    provided patterns in a rule:
    
    Unicast: if pattern '01' with offset 0 is found
    Multicast: if pattern '33:33' or '01:00:5e' with offset 0 is found
    Broadcast: if pattern 'ff:ff:ff:ff' with offset 0 is found
    
    Some example coalesce configuration files:
    
    1) Coalesce Rx data packets from 192.168.0.88
    mac address of our device is 00:50:43:21:53:7A
    Source IP address offset comes out as 52 after following
    calculations:
        32 bytes of HW 802.11 header + 8 bytes LLC +
        12 bytes in IPV4 header till source IP address
    Destination mac is at offset 6 in HW header.
    
    delay=100
    condition=1
    patterns=01,6+00:50:43:22,10+53:7A,52+c0:a8:00:58
    
    2) Coalesce all broadcast and multicast packets(Multiple packet
    types are not allowed in a single rule. Hence created separate
    rules)
    
    delay=400
    condition=1
    patterns=33:33
    delay=400
    condition=1
    patterns=ff:ff:ff:ff
    Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
    Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    562fc5b3
sta_cmdresp.c 29.5 KB