source: branches/chaos_calmer/package/kernel/mac80211/patches/351-0049-brcmfmac-drop-unused-fields-from-struct-brcmf_pub.patch @ 49407

Last change on this file since 49407 was 49407, checked in by rmilecki, 12 months ago

mac80211: brcmfmac: backport changes from 2016-09-27

This fixes memory leaks, some possible crashes and bug that could cause
WARNING on every add_key/del_key call. It also replaces WARNING with
a simple message. They may still occur e.g. on station going out of
range and A-MPDU stall in the firmware.

Signed-off-by: Rafał Miłecki <rafal@…>

File size: 2.2 KB
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c

    From 2df86ad959c9d1cdbeb2f23a0801857731156692 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
    Date: Fri, 23 Sep 2016 15:27:46 +0200
    Subject: [PATCH] brcmfmac: drop unused fields from struct brcmf_pub
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    They seem to be there from the first day. We calculate these values but
    never use them.
    
    Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
    Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
    ---
     drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c     | 3 ---
     drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h     | 4 ----
     drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c | 2 --
     3 files changed, 9 deletions(-)
    
    a b int brcmf_net_attach(struct brcmf_if *if 
    508508        ndev->hard_header_len += drvr->hdrlen; 
    509509        ndev->ethtool_ops = &brcmf_ethtool_ops; 
    510510 
    511         drvr->rxsz = ndev->mtu + ndev->hard_header_len + 
    512                               drvr->hdrlen; 
    513  
    514511        /* set the mac address */ 
    515512        memcpy(ndev->dev_addr, ifp->mac_addr, ETH_ALEN); 
    516513 
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.h

    a b struct brcmf_pub { 
    112112 
    113113        /* Internal brcmf items */ 
    114114        uint hdrlen;            /* Total BRCMF header length (proto + bus) */ 
    115         uint rxsz;              /* Rx buffer size bus module should use */ 
    116115 
    117116        /* Dongle media info */ 
    118117        char fwver[BRCMF_DRIVER_FIRMWARE_VERSION_LEN]; 
    119118        u8 mac[ETH_ALEN];               /* MAC address obtained from dongle */ 
    120119 
    121         /* Multicast data packets sent to dongle */ 
    122         unsigned long tx_multicast; 
    123  
    124120        struct mac_address addresses[BRCMF_MAX_IFS]; 
    125121 
    126122        struct brcmf_if *iflist[BRCMF_MAX_IFS]; 
  • drivers/net/wireless/broadcom/brcm80211/brcmfmac/fwsignal.c

    a b int brcmf_fws_process_skb(struct brcmf_i 
    21042104        if (!skb->priority) 
    21052105                skb->priority = cfg80211_classify8021d(skb, NULL); 
    21062106 
    2107         drvr->tx_multicast += !!multicast; 
    2108  
    21092107        if (fws->avoid_queueing) { 
    21102108                rc = brcmf_proto_txdata(drvr, ifp->ifidx, 0, skb); 
    21112109                if (rc < 0) 
Note: See TracBrowser for help on using the repository browser.