@@ -4278,7 +4278,6 @@ netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,
4278
4278
struct ethhdr * ehdr = (struct ethhdr * )skb -> data ;
4279
4279
struct ieee80211_key * key ;
4280
4280
struct sta_info * sta ;
4281
- bool offload = true;
4282
4281
4283
4282
if (unlikely (skb -> len < ETH_HLEN )) {
4284
4283
kfree_skb (skb );
@@ -4294,18 +4293,22 @@ netdev_tx_t ieee80211_subif_start_xmit_8023(struct sk_buff *skb,
4294
4293
4295
4294
if (unlikely (IS_ERR_OR_NULL (sta ) || !sta -> uploaded ||
4296
4295
!test_sta_flag (sta , WLAN_STA_AUTHORIZED ) ||
4297
- sdata -> control_port_protocol == ehdr -> h_proto ))
4298
- offload = false;
4299
- else if ((key = rcu_dereference (sta -> ptk [sta -> ptk_idx ])) &&
4300
- (!(key -> flags & KEY_FLAG_UPLOADED_TO_HARDWARE ) ||
4301
- key -> conf .cipher == WLAN_CIPHER_SUITE_TKIP ))
4302
- offload = false;
4303
-
4304
- if (offload )
4305
- ieee80211_8023_xmit (sdata , dev , sta , key , skb );
4306
- else
4307
- ieee80211_subif_start_xmit (skb , dev );
4296
+ sdata -> control_port_protocol == ehdr -> h_proto ))
4297
+ goto skip_offload ;
4298
+
4299
+ key = rcu_dereference (sta -> ptk [sta -> ptk_idx ]);
4300
+ if (!key )
4301
+ key = rcu_dereference (sdata -> default_unicast_key );
4302
+
4303
+ if (key && (!(key -> flags & KEY_FLAG_UPLOADED_TO_HARDWARE ) ||
4304
+ key -> conf .cipher == WLAN_CIPHER_SUITE_TKIP ))
4305
+ goto skip_offload ;
4306
+
4307
+ ieee80211_8023_xmit (sdata , dev , sta , key , skb );
4308
+ goto out ;
4308
4309
4310
+ skip_offload :
4311
+ ieee80211_subif_start_xmit (skb , dev );
4309
4312
out :
4310
4313
rcu_read_unlock ();
4311
4314
0 commit comments