|
@@ -374,7 +374,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
|
|
struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX);
|
|
struct queue_entry *entry = rt2x00queue_get_entry(queue, Q_INDEX);
|
|
struct txentry_desc txdesc;
|
|
struct txentry_desc txdesc;
|
|
struct skb_frame_desc *skbdesc;
|
|
struct skb_frame_desc *skbdesc;
|
|
- unsigned int iv_len = IEEE80211_SKB_CB(skb)->control.iv_len;
|
|
|
|
|
|
+ unsigned int iv_len;
|
|
|
|
|
|
if (unlikely(rt2x00queue_full(queue)))
|
|
if (unlikely(rt2x00queue_full(queue)))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
@@ -410,8 +410,11 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb)
|
|
* the frame so we can provide it to the driver seperately.
|
|
* the frame so we can provide it to the driver seperately.
|
|
*/
|
|
*/
|
|
if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc.flags) &&
|
|
if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc.flags) &&
|
|
- !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags))
|
|
|
|
|
|
+ !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc.flags) &&
|
|
|
|
+ (IEEE80211_SKB_CB(skb)->control.hw_key != NULL)) {
|
|
|
|
+ iv_len = IEEE80211_SKB_CB(skb)->control.hw_key->iv_len;
|
|
rt2x00crypto_tx_remove_iv(skb, iv_len);
|
|
rt2x00crypto_tx_remove_iv(skb, iv_len);
|
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
/*
|
|
* It could be possible that the queue was corrupted and this
|
|
* It could be possible that the queue was corrupted and this
|