Subject: [PATCH 16/18] d80211: get rid of MICHAEL_MIC_HWACCEL define

From: Johannes Berg <[email-masked]>
Date: Mon, 21 Aug 2006 09:41:23 +0200

The symbol MICHAEL_MIC_HWACCEL is always defined and hence
all the ifdefs using it are useless. This patch removes it.

Signed-off-by: Johannes Berg <[email-masked]>

--- wireless-dev.orig/net/d80211/wpa.c	2006-08-20 17:32:40.058192788 +0200
+++ wireless-dev/net/d80211/wpa.c	2006-08-20 17:33:52.968192788 +0200
@@ -25,9 +25,6 @@
 #endif /* CONFIG_HOSTAPD_WPA_TESTING */

-#define MICHAEL_MIC_HWACCEL
-
-
 int ieee80211_get_hdr_info(const struct sk_buff *skb, u8 **sa, u8 **da,
 			   u8 *qos_tid, u8 **data, size_t *data_len)
 {
@@ -87,9 +84,7 @@ ieee80211_tx_h_michael_mic_add(struct ie
 	u16 fc;
 	struct sk_buff *skb = tx->skb;
 	int authenticator;
-#if defined(CONFIG_HOSTAPD_WPA_TESTING) || defined(MICHAEL_MIC_HWACCEL)
 	int wpa_test = 0;
-#endif
 
 	fc = tx->fc;
 
@@ -108,14 +103,12 @@ ieee80211_tx_h_michael_mic_add(struct ie
 	}
 #endif /* CONFIG_HOSTAPD_WPA_TESTING */
 
-#ifdef MICHAEL_MIC_HWACCEL
 	if (!tx->key->force_sw_encrypt && !tx->local->conf.sw_decrypt &&
 	    !tx->fragmented && !wpa_test) {
 		/* hwaccel - with no need for preallocated room for Michael MIC
 		 */
 		return TXRX_CONTINUE;
 	}
-#endif /* MICHAEL_MIC_HWACCEL */
 
 	if (skb_tailroom(skb) < MICHAEL_MIC_LEN) {
 		I802_DEBUG_INC(tx->local->tx_expand_skb_head);
@@ -188,7 +181,6 @@ ieee80211_rx_h_michael_mic_verify(struct
 		wpa_test = 1;
 #endif /* CONFIG_HOSTAPD_WPA_TESTING */
 
-#ifdef MICHAEL_MIC_HWACCEL
 	if ((rx->u.rx.status->flag & RX_FLAG_DECRYPTED) &&
 	    !rx->key->force_sw_encrypt && !rx->local->conf.sw_decrypt) {
 		if (rx->local->hw->wep_include_iv) {
@@ -201,7 +193,6 @@ ieee80211_rx_h_michael_mic_verify(struct
 		if (!rx->fragmented && !wpa_test)
 			goto remove_mic;
 	}
-#endif /* MICHAEL_MIC_HWACCEL */
 
 	if (ieee80211_get_hdr_info(skb, &sa, &da, &qos_tid, &data, &data_len)
 	    || data_len < MICHAEL_MIC_LEN)
@@ -277,9 +268,7 @@ ieee80211_rx_h_michael_mic_verify(struct
 		return TXRX_QUEUED;
 	}
 
-#ifdef MICHAEL_MIC_HWACCEL
  remove_mic:
-#endif /* MICHAEL_MIC_HWACCEL */
 	/* remove Michael MIC from payload */
 	skb_trim(skb, skb->len - MICHAEL_MIC_LEN);

--