|
@@ -419,11 +419,11 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
|
|
{
|
|
{
|
|
struct ieee80211_key_conf *keyconf = info->control.hw_key;
|
|
struct ieee80211_key_conf *keyconf = info->control.hw_key;
|
|
u8 *crypto_hdr = skb_frag->data + hdrlen;
|
|
u8 *crypto_hdr = skb_frag->data + hdrlen;
|
|
|
|
+ enum iwl_tx_cmd_sec_ctrl type = TX_CMD_SEC_CCM;
|
|
u64 pn;
|
|
u64 pn;
|
|
|
|
|
|
switch (keyconf->cipher) {
|
|
switch (keyconf->cipher) {
|
|
case WLAN_CIPHER_SUITE_CCMP:
|
|
case WLAN_CIPHER_SUITE_CCMP:
|
|
- case WLAN_CIPHER_SUITE_CCMP_256:
|
|
|
|
iwl_mvm_set_tx_cmd_ccmp(info, tx_cmd);
|
|
iwl_mvm_set_tx_cmd_ccmp(info, tx_cmd);
|
|
iwl_mvm_set_tx_cmd_pn(info, crypto_hdr);
|
|
iwl_mvm_set_tx_cmd_pn(info, crypto_hdr);
|
|
break;
|
|
break;
|
|
@@ -447,13 +447,16 @@ static void iwl_mvm_set_tx_cmd_crypto(struct iwl_mvm *mvm,
|
|
break;
|
|
break;
|
|
case WLAN_CIPHER_SUITE_GCMP:
|
|
case WLAN_CIPHER_SUITE_GCMP:
|
|
case WLAN_CIPHER_SUITE_GCMP_256:
|
|
case WLAN_CIPHER_SUITE_GCMP_256:
|
|
|
|
+ type = TX_CMD_SEC_GCMP;
|
|
|
|
+ /* Fall through */
|
|
|
|
+ case WLAN_CIPHER_SUITE_CCMP_256:
|
|
/* TODO: Taking the key from the table might introduce a race
|
|
/* TODO: Taking the key from the table might introduce a race
|
|
* when PTK rekeying is done, having an old packets with a PN
|
|
* when PTK rekeying is done, having an old packets with a PN
|
|
* based on the old key but the message encrypted with a new
|
|
* based on the old key but the message encrypted with a new
|
|
* one.
|
|
* one.
|
|
* Need to handle this.
|
|
* Need to handle this.
|
|
*/
|
|
*/
|
|
- tx_cmd->sec_ctl |= TX_CMD_SEC_GCMP | TX_CMD_SEC_KEY_FROM_TABLE;
|
|
|
|
|
|
+ tx_cmd->sec_ctl |= type | TX_CMD_SEC_KEY_FROM_TABLE;
|
|
tx_cmd->key[0] = keyconf->hw_key_idx;
|
|
tx_cmd->key[0] = keyconf->hw_key_idx;
|
|
iwl_mvm_set_tx_cmd_pn(info, crypto_hdr);
|
|
iwl_mvm_set_tx_cmd_pn(info, crypto_hdr);
|
|
break;
|
|
break;
|
|
@@ -645,7 +648,11 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb)
|
|
if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
|
|
if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE ||
|
|
info.control.vif->type == NL80211_IFTYPE_AP ||
|
|
info.control.vif->type == NL80211_IFTYPE_AP ||
|
|
info.control.vif->type == NL80211_IFTYPE_ADHOC) {
|
|
info.control.vif->type == NL80211_IFTYPE_ADHOC) {
|
|
- sta_id = mvmvif->bcast_sta.sta_id;
|
|
|
|
|
|
+ if (info.control.vif->type == NL80211_IFTYPE_P2P_DEVICE)
|
|
|
|
+ sta_id = mvmvif->bcast_sta.sta_id;
|
|
|
|
+ else
|
|
|
|
+ sta_id = mvmvif->mcast_sta.sta_id;
|
|
|
|
+
|
|
queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info,
|
|
queue = iwl_mvm_get_ctrl_vif_queue(mvm, &info,
|
|
hdr->frame_control);
|
|
hdr->frame_control);
|
|
if (queue < 0)
|
|
if (queue < 0)
|