Search Linux Wireless

Re: [RFC V3 2/2] ath10k: add tx hw 802.11 encapusaltion offloading support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 02/04/2019 11:27, Sebastian Gottschall wrote:
Am 01.04.2019 um 16:02 schrieb John Crispin:


On 01/04/2019 15:14, John Crispin wrote:
@@ -5185,6 +5214,23 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
          break;
      }
  +    switch (vif->type) {
+    case NL80211_IFTYPE_AP:
+        hw_encap = 1;
+        break;
+    case NL80211_IFTYPE_STATION:
+//        if (!sdata->u.mgd.use_4addr)
+            hw_encap = 1;
+        break;
+    case NL80211_IFTYPE_AP_VLAN:
+//        if (!sdata->wdev.use_4addr)
+            hw_encap = 1;
+        break;
+    default:
+        break;
+    }
+    ieee80211_set_hw_80211_encap(vif, ar->ethernetmode & hw_encap);
+
      /* Using vdev_id as queue number will make it very easy to do per-vif        * tx queue locking. This shouldn't wrap due to interface combinations        * but do a modulo for correctness sake and prevent using offchannel tx

Hi

I am not sure what the best way to handle the 4addr mode is. sdata is part of the subsystem and is not exposed to the drivers.Calling  ieee80211_set_hw_80211_encap() from within the driver looked best to me at first glance and would avoid adding an extra op call to figure out if the if encap is supported. Any pointers on what the preferred solution would look like are welcome.

    John

you may do the 4addr check within ieee80211_set_hw_80211_encap, there is no need for dealing with that in ath10k or do i miss something?

Sebastian

Correct, I'll add that in V4

    John





[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux