aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-05-08 07:09:08 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-16 16:39:41 -0400
commit4325f6caad98c075b39f0eaaac6693a0dd43f646 (patch)
treefe0b8cf54b924d0206db99fca8966ff1f601325e /net/mac80211/rx.c
parent04a161f4609dfa387313456fa7ea469fff12cc0d (diff)
wireless: move crypto constants to ieee80211.h
mac80211 and the Intel drivers all define crypto constants, move them to ieee80211.h instead. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 22e412b0767f..6e2c8c5236c4 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1622,7 +1622,7 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
1622 entry->ccmp = 1; 1622 entry->ccmp = 1;
1623 memcpy(entry->last_pn, 1623 memcpy(entry->last_pn,
1624 rx->key->u.ccmp.rx_pn[queue], 1624 rx->key->u.ccmp.rx_pn[queue],
1625 CCMP_PN_LEN); 1625 IEEE80211_CCMP_PN_LEN);
1626 } 1626 }
1627 return RX_QUEUED; 1627 return RX_QUEUED;
1628 } 1628 }
@@ -1641,21 +1641,21 @@ ieee80211_rx_h_defragment(struct ieee80211_rx_data *rx)
1641 * (IEEE 802.11i, 8.3.3.4.5) */ 1641 * (IEEE 802.11i, 8.3.3.4.5) */
1642 if (entry->ccmp) { 1642 if (entry->ccmp) {
1643 int i; 1643 int i;
1644 u8 pn[CCMP_PN_LEN], *rpn; 1644 u8 pn[IEEE80211_CCMP_PN_LEN], *rpn;
1645 int queue; 1645 int queue;
1646 if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_CCMP) 1646 if (!rx->key || rx->key->conf.cipher != WLAN_CIPHER_SUITE_CCMP)
1647 return RX_DROP_UNUSABLE; 1647 return RX_DROP_UNUSABLE;
1648 memcpy(pn, entry->last_pn, CCMP_PN_LEN); 1648 memcpy(pn, entry->last_pn, IEEE80211_CCMP_PN_LEN);
1649 for (i = CCMP_PN_LEN - 1; i >= 0; i--) { 1649 for (i = IEEE80211_CCMP_PN_LEN - 1; i >= 0; i--) {
1650 pn[i]++; 1650 pn[i]++;
1651 if (pn[i]) 1651 if (pn[i])
1652 break; 1652 break;
1653 } 1653 }
1654 queue = rx->security_idx; 1654 queue = rx->security_idx;
1655 rpn = rx->key->u.ccmp.rx_pn[queue]; 1655 rpn = rx->key->u.ccmp.rx_pn[queue];
1656 if (memcmp(pn, rpn, CCMP_PN_LEN)) 1656 if (memcmp(pn, rpn, IEEE80211_CCMP_PN_LEN))
1657 return RX_DROP_UNUSABLE; 1657 return RX_DROP_UNUSABLE;
1658 memcpy(entry->last_pn, pn, CCMP_PN_LEN); 1658 memcpy(entry->last_pn, pn, IEEE80211_CCMP_PN_LEN);
1659 } 1659 }
1660 1660
1661 skb_pull(rx->skb, ieee80211_hdrlen(fc)); 1661 skb_pull(rx->skb, ieee80211_hdrlen(fc));