|
@@ -415,7 +415,8 @@ static int ccmp_encrypt_skb(struct ieee80211_tx_data *tx, struct sk_buff *skb)
|
|
|
memmove(pos, pos + CCMP_HDR_LEN, hdrlen);
|
|
|
|
|
|
/* the HW only needs room for the IV, but not the actual IV */
|
|
|
- if (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE)
|
|
|
+ if (info->control.hw_key &&
|
|
|
+ (info->control.hw_key->flags & IEEE80211_KEY_FLAG_PUT_IV_SPACE))
|
|
|
return 0;
|
|
|
|
|
|
hdr = (struct ieee80211_hdr *) pos;
|