diff options
author | Arend van Spriel <arend@broadcom.com> | 2011-11-10 14:30:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-11 14:28:39 -0500 |
commit | ad4d71f69ebe2acab75d0a8a66ab9f7609151cce (patch) | |
tree | 74f7ec8f3b9ffd1f9a982402077568a4a9f8b79f | |
parent | 122d36fd5ac99305d294012044198894648bf0f8 (diff) |
brcm80211: smac: remove usage of brcmu_pkttotlen
The function brcmu_pkttotlen calculates the total length of a sk_buff
chain following the next pointer. In brcmsmac this is not needed as
in each place where it was used the provided sk_buff had a NULL pointer
as next field value.
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmsmac/main.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c index 7f27dbdb6b60..43f7a724dda8 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c | |||
@@ -649,7 +649,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi, | |||
649 | len = roundup(len, 4); | 649 | len = roundup(len, 4); |
650 | ampdu_len += (len + (ndelim + 1) * AMPDU_DELIMITER_LEN); | 650 | ampdu_len += (len + (ndelim + 1) * AMPDU_DELIMITER_LEN); |
651 | 651 | ||
652 | dma_len += (u16) brcmu_pkttotlen(p); | 652 | dma_len += (u16) p->len; |
653 | 653 | ||
654 | BCMMSG(wlc->wiphy, "wl%d: ampdu_len %d" | 654 | BCMMSG(wlc->wiphy, "wl%d: ampdu_len %d" |
655 | " seg_cnt %d null delim %d\n", | 655 | " seg_cnt %d null delim %d\n", |
@@ -741,9 +741,7 @@ brcms_c_sendampdu(struct ampdu_info *ampdu, struct brcms_txq_info *qi, | |||
741 | if (p) { | 741 | if (p) { |
742 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && | 742 | if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && |
743 | ((u8) (p->priority) == tid)) { | 743 | ((u8) (p->priority) == tid)) { |
744 | 744 | plen = p->len + AMPDU_MAX_MPDU_OVERHEAD; | |
745 | plen = brcmu_pkttotlen(p) + | ||
746 | AMPDU_MAX_MPDU_OVERHEAD; | ||
747 | plen = max(scb_ampdu->min_len, plen); | 745 | plen = max(scb_ampdu->min_len, plen); |
748 | 746 | ||
749 | if ((plen + ampdu_len) > max_ampdu_bytes) { | 747 | if ((plen + ampdu_len) > max_ampdu_bytes) { |
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c index 0e8873eba9c3..6a679c9848ab 100644 --- a/drivers/net/wireless/brcm80211/brcmsmac/main.c +++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c | |||
@@ -949,7 +949,7 @@ brcms_c_dotxstatus(struct brcms_c_info *wlc, struct tx_status *txs) | |||
949 | tx_info->flags |= IEEE80211_TX_STAT_ACK; | 949 | tx_info->flags |= IEEE80211_TX_STAT_ACK; |
950 | } | 950 | } |
951 | 951 | ||
952 | totlen = brcmu_pkttotlen(p); | 952 | totlen = p->len; |
953 | free_pdu = true; | 953 | free_pdu = true; |
954 | 954 | ||
955 | brcms_c_txfifo_complete(wlc, queue, 1); | 955 | brcms_c_txfifo_complete(wlc, queue, 1); |
@@ -6716,7 +6716,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw, | |||
6716 | qos = ieee80211_is_data_qos(h->frame_control); | 6716 | qos = ieee80211_is_data_qos(h->frame_control); |
6717 | 6717 | ||
6718 | /* compute length of frame in bytes for use in PLCP computations */ | 6718 | /* compute length of frame in bytes for use in PLCP computations */ |
6719 | len = brcmu_pkttotlen(p); | 6719 | len = p->len; |
6720 | phylen = len + FCS_LEN; | 6720 | phylen = len + FCS_LEN; |
6721 | 6721 | ||
6722 | /* Get tx_info */ | 6722 | /* Get tx_info */ |