key->conf.keyidx,
                          sta ? sta->sta.addr : bcast_addr, ret);
 
-       /* cannot do software crypto with encapsulation offload */
-       if (sdata->hw_80211_encap)
-               return -EINVAL;
-
  out_unsupported:
        switch (key->conf.cipher) {
        case WLAN_CIPHER_SUITE_WEP40:
        case WLAN_CIPHER_SUITE_TKIP:
        case WLAN_CIPHER_SUITE_CCMP:
        case WLAN_CIPHER_SUITE_CCMP_256:
+       case WLAN_CIPHER_SUITE_GCMP:
+       case WLAN_CIPHER_SUITE_GCMP_256:
+               /* We cannot do software crypto of data frames with
+                * encapsulation offload enabled. However for 802.11w to
+                * function properly we need cmac/gmac keys.
+                */
+               if (sdata->hw_80211_encap)
+                       return -EINVAL;
+               /* Fall through */
+
        case WLAN_CIPHER_SUITE_AES_CMAC:
        case WLAN_CIPHER_SUITE_BIP_CMAC_256:
        case WLAN_CIPHER_SUITE_BIP_GMAC_128:
        case WLAN_CIPHER_SUITE_BIP_GMAC_256:
-       case WLAN_CIPHER_SUITE_GCMP:
-       case WLAN_CIPHER_SUITE_GCMP_256:
                /* all of these we can do in software - if driver can */
                if (ret == 1)
                        return 0;