]> err.no Git - linux-2.6/commitdiff
iwlwifi: Bug fix, CCMP with HW encryption with AGG
authorMax Stepanov <max.stepanov@intel.com>
Wed, 12 Mar 2008 23:58:48 +0000 (16:58 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 25 Mar 2008 20:41:46 +0000 (16:41 -0400)
This patch fixes a bug in security. Enables CCMP HW encryption with
aggregations.

Signed-off-by: Max Stepanov <max.stepanov@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-4965-commands.h
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 35f592dc40c659059f435d045e565ca1a7efd96b..1025ffeb8fa84c115a62ba2a9160f52eb51a5756 100644 (file)
@@ -1045,6 +1045,10 @@ struct iwl4965_rx_mpdu_res_start {
  * MAC header) to DWORD boundary. */
 #define TX_CMD_FLG_MH_PAD_MSK __constant_cpu_to_le32(1 << 20)
 
+/* accelerate aggregation support
+ * 0 - no CCMP encryption; 1 - CCMP encryption */
+#define TX_CMD_FLG_AGG_CCMP_MSK __constant_cpu_to_le32(1 << 22)
+
 /* HCCA-AP - disable duration overwriting. */
 #define TX_CMD_FLG_DUR_MSK __constant_cpu_to_le32(1 << 25)
 
index 0b7335181719da86a8356f8e321903fefc90cf05..d0cb36b9efe31d8cffb94cb74d9da6ccc9d20fe8 100644 (file)
@@ -2427,6 +2427,8 @@ static void iwl4965_build_tx_cmd_hwcrypto(struct iwl4965_priv *priv,
        case ALG_CCMP:
                cmd->cmd.tx.sec_ctl = TX_CMD_SEC_CCM;
                memcpy(cmd->cmd.tx.key, keyinfo->key, keyinfo->keylen);
+               if (ctl->flags & IEEE80211_TXCTL_AMPDU)
+                       cmd->cmd.tx.tx_flags |= TX_CMD_FLG_AGG_CCMP_MSK;
                IWL_DEBUG_TX("tx_cmd with aes hwcrypto\n");
                break;