mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-30 18:07:52 +00:00
ucentral: development update
* fix ovs deadlock * add tpt led trigger to ath11k * update ucentral-wifi * add open-flow to data model Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -82,7 +82,7 @@ ovs_xx() {
|
|||||||
case "$cfgtype" in
|
case "$cfgtype" in
|
||||||
ovs)
|
ovs)
|
||||||
"$ovs_ctl" "$action" \
|
"$ovs_ctl" "$action" \
|
||||||
--system-id=random
|
--system-id=random 1000>&-
|
||||||
;;
|
;;
|
||||||
ovn_*)
|
ovn_*)
|
||||||
"$ovn_ctl" "${action}_${cfgtype#ovn_}"
|
"$ovn_ctl" "${action}_${cfgtype#ovn_}"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
|
|||||||
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
|
PKG_SOURCE_URL=https://github.com/blogic/ucentral-schema.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2021-02-15
|
PKG_SOURCE_DATE:=2021-02-15
|
||||||
PKG_SOURCE_VERSION:=852fe19044db490ddaf9cd5112a916c82cc6f467
|
PKG_SOURCE_VERSION:=5ecb05a4a8069f4ca07203e0fd28f7125e5fe374
|
||||||
|
|
||||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||||
PKG_LICENSE:=BSD-3-Clause
|
PKG_LICENSE:=BSD-3-Clause
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ PKG_RELEASE:=1
|
|||||||
PKG_SOURCE_URL=https://github.com/blogic/ucentral-wifi.git
|
PKG_SOURCE_URL=https://github.com/blogic/ucentral-wifi.git
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_DATE:=2021-04-13
|
PKG_SOURCE_DATE:=2021-04-13
|
||||||
PKG_SOURCE_VERSION:=17c442426a864144e17ef82120ed8cef8e7e7272
|
PKG_SOURCE_VERSION:=17691102b2cf9f17074bf2d8155974ba1c804b8f
|
||||||
#PKG_MIRROR_HASH:=a8000b3cf43ce9ebfa7305661475fec98ec1dba2dc7b062028c2e17d7c2ec50b
|
#PKG_MIRROR_HASH:=a8000b3cf43ce9ebfa7305661475fec98ec1dba2dc7b062028c2e17d7c2ec50b
|
||||||
|
|
||||||
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
|
||||||
@@ -26,6 +26,11 @@ TARGET_CFLAGS += \
|
|||||||
-I$(STAGING_DIR)/usr/include \
|
-I$(STAGING_DIR)/usr/include \
|
||||||
-I$(STAGING_DIR)/usr/include/libnl-tiny
|
-I$(STAGING_DIR)/usr/include/libnl-tiny
|
||||||
|
|
||||||
|
define Build/Prepare
|
||||||
|
$(Build/Prepare/Default)
|
||||||
|
$(CP) $(STAGING_DIR)/usr/include/mac80211/uapi/linux/nl80211.h $(PKG_BUILD_DIR)/nl80211_copy.h
|
||||||
|
endef
|
||||||
|
|
||||||
define Package/ucentral-wifi/install
|
define Package/ucentral-wifi/install
|
||||||
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ucentral-wifi $(1)/usr/sbin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ucentral-wifi $(1)/usr/sbin/
|
||||||
|
|||||||
210
feeds/wifi-ax/mac80211/patches/pending/215-tpt-trigger.patch
Normal file
210
feeds/wifi-ax/mac80211/patches/pending/215-tpt-trigger.patch
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
Index: backports-20200902_001-4.4.60-931c337125/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
===================================================================
|
||||||
|
--- backports-20200902_001-4.4.60-931c337125.orig/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
+++ backports-20200902_001-4.4.60-931c337125/drivers/net/wireless/ath/ath11k/mac.c
|
||||||
|
@@ -191,6 +191,20 @@ static struct ieee80211_rate ath11k_lega
|
||||||
|
{ .bitrate = 540, .hw_value = ATH11K_HW_RATE_OFDM_54M },
|
||||||
|
};
|
||||||
|
|
||||||
|
+static const struct ieee80211_tpt_blink ath11k_tpt_blink[] = {
|
||||||
|
+ { .throughput = 0 * 1024, .blink_time = 334 },
|
||||||
|
+ { .throughput = 1 * 1024, .blink_time = 260 },
|
||||||
|
+ { .throughput = 5 * 1024, .blink_time = 220 },
|
||||||
|
+ { .throughput = 10 * 1024, .blink_time = 190 },
|
||||||
|
+ { .throughput = 20 * 1024, .blink_time = 170 },
|
||||||
|
+ { .throughput = 50 * 1024, .blink_time = 150 },
|
||||||
|
+ { .throughput = 70 * 1024, .blink_time = 130 },
|
||||||
|
+ { .throughput = 100 * 1024, .blink_time = 110 },
|
||||||
|
+ { .throughput = 200 * 1024, .blink_time = 80 },
|
||||||
|
+ { .throughput = 300 * 1024, .blink_time = 50 },
|
||||||
|
+ { .throughput = 600 * 1024, .blink_time = 20 },
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
static const int
|
||||||
|
ath11k_phymodes[NUM_NL80211_BANDS][ATH11K_CHAN_WIDTH_NUM] = {
|
||||||
|
[NL80211_BAND_2GHZ] = {
|
||||||
|
@@ -8240,6 +8254,10 @@ static int __ath11k_mac_register(struct
|
||||||
|
if (ab->nss.enabled)
|
||||||
|
ieee80211_hw_set(ar->hw, SUPPORTS_NSS_OFFLOAD);
|
||||||
|
|
||||||
|
+ ieee80211_create_tpt_led_trigger(ar->hw, IEEE80211_TPT_LEDTRIG_FL_RADIO,
|
||||||
|
+ ath11k_tpt_blink,
|
||||||
|
+ ARRAY_SIZE(ath11k_tpt_blink));
|
||||||
|
+
|
||||||
|
ret = ieee80211_register_hw(ar->hw);
|
||||||
|
if (ret) {
|
||||||
|
ath11k_err(ar->ab, "ieee80211 registration failed: %d\n", ret);
|
||||||
|
--- a/net/mac80211/led.h
|
||||||
|
+++ b/net/mac80211/led.h
|
||||||
|
@@ -86,19 +86,19 @@ static inline void ieee80211_mod_tpt_led
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
-ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, __le16 fc, int bytes)
|
||||||
|
+ieee80211_tpt_led_trig_tx(struct ieee80211_local *local, int bytes)
|
||||||
|
{
|
||||||
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
|
- if (ieee80211_is_data(fc) && atomic_read(&local->tpt_led_active))
|
||||||
|
+ if (atomic_read(&local->tpt_led_active))
|
||||||
|
local->tpt_led_trigger->tx_bytes += bytes;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
-ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, __le16 fc, int bytes)
|
||||||
|
+ieee80211_tpt_led_trig_rx(struct ieee80211_local *local, int bytes)
|
||||||
|
{
|
||||||
|
#ifdef CPTCFG_MAC80211_LEDS
|
||||||
|
- if (ieee80211_is_data(fc) && atomic_read(&local->tpt_led_active))
|
||||||
|
+ if (atomic_read(&local->tpt_led_active))
|
||||||
|
local->tpt_led_trigger->rx_bytes += bytes;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
--- a/net/mac80211/rx.c
|
||||||
|
+++ b/net/mac80211/rx.c
|
||||||
|
@@ -4767,6 +4767,7 @@ void ieee80211_rx_napi(struct ieee80211_
|
||||||
|
struct ieee80211_rate *rate = NULL;
|
||||||
|
struct ieee80211_supported_band *sband;
|
||||||
|
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
||||||
|
+ struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
|
|
||||||
|
WARN_ON_ONCE(softirq_count() == 0);
|
||||||
|
|
||||||
|
@@ -4871,9 +4872,8 @@ void ieee80211_rx_napi(struct ieee80211_
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ieee80211_tpt_led_trig_rx(local,
|
||||||
|
- ((struct ieee80211_hdr *)skb->data)->frame_control,
|
||||||
|
- skb->len);
|
||||||
|
+ if (ieee80211_is_data_present(hdr->frame_control))
|
||||||
|
+ ieee80211_tpt_led_trig_rx(local, skb->len);
|
||||||
|
|
||||||
|
__ieee80211_rx_handle_packet(hw, pubsta, skb, napi);
|
||||||
|
|
||||||
|
--- a/net/mac80211/tx.c
|
||||||
|
+++ b/net/mac80211/tx.c
|
||||||
|
@@ -1716,8 +1716,8 @@ static bool ieee80211_tx_frags(struct ie
|
||||||
|
* Returns false if the frame couldn't be transmitted but was queued instead.
|
||||||
|
*/
|
||||||
|
static bool __ieee80211_tx(struct ieee80211_local *local,
|
||||||
|
- struct sk_buff_head *skbs, int led_len,
|
||||||
|
- struct sta_info *sta, bool txpending)
|
||||||
|
+ struct sk_buff_head *skbs, struct sta_info *sta,
|
||||||
|
+ bool txpending)
|
||||||
|
{
|
||||||
|
struct ieee80211_tx_info *info;
|
||||||
|
struct ieee80211_sub_if_data *sdata;
|
||||||
|
@@ -1764,8 +1764,6 @@ static bool __ieee80211_tx(struct ieee80
|
||||||
|
|
||||||
|
result = ieee80211_tx_frags(local, vif, sta, skbs, txpending);
|
||||||
|
|
||||||
|
- ieee80211_tpt_led_trig_tx(local, fc, led_len);
|
||||||
|
-
|
||||||
|
WARN_ON_ONCE(!skb_queue_empty(skbs));
|
||||||
|
|
||||||
|
return result;
|
||||||
|
@@ -1914,7 +1912,6 @@ static bool ieee80211_tx(struct ieee8021
|
||||||
|
ieee80211_tx_result res_prepare;
|
||||||
|
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
|
||||||
|
bool result = true;
|
||||||
|
- int led_len;
|
||||||
|
|
||||||
|
if (unlikely(skb->len < 10)) {
|
||||||
|
dev_kfree_skb(skb);
|
||||||
|
@@ -1922,7 +1919,6 @@ static bool ieee80211_tx(struct ieee8021
|
||||||
|
}
|
||||||
|
|
||||||
|
/* initialises tx */
|
||||||
|
- led_len = skb->len;
|
||||||
|
res_prepare = ieee80211_tx_prepare(sdata, &tx, sta, skb);
|
||||||
|
|
||||||
|
if (unlikely(res_prepare == TX_DROP)) {
|
||||||
|
@@ -1945,8 +1941,7 @@ static bool ieee80211_tx(struct ieee8021
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (!invoke_tx_handlers_late(&tx))
|
||||||
|
- result = __ieee80211_tx(local, &tx.skbs, led_len,
|
||||||
|
- tx.sta, txpending);
|
||||||
|
+ result = __ieee80211_tx(local, &tx.skbs, tx.sta, txpending);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
@@ -3945,6 +3940,7 @@ void __ieee80211_subif_start_xmit(struct
|
||||||
|
struct sta_info *sta;
|
||||||
|
struct sk_buff *next;
|
||||||
|
struct ieee80211_sub_if_data *ap_sdata;
|
||||||
|
+ int len = skb->len;
|
||||||
|
|
||||||
|
if (unlikely(skb->len < ETH_HLEN)) {
|
||||||
|
kfree_skb(skb);
|
||||||
|
@@ -3999,10 +3995,8 @@ void __ieee80211_subif_start_xmit(struct
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
/* we cannot process non-linear frames on this path */
|
||||||
|
- if (skb_linearize(skb)) {
|
||||||
|
- kfree_skb(skb);
|
||||||
|
- goto out;
|
||||||
|
- }
|
||||||
|
+ if (skb_linearize(skb))
|
||||||
|
+ goto out_free;
|
||||||
|
|
||||||
|
/* the frame could be fragmented, software-encrypted, and other
|
||||||
|
* things so we cannot really handle checksum offload with it -
|
||||||
|
@@ -4036,7 +4030,10 @@ void __ieee80211_subif_start_xmit(struct
|
||||||
|
goto out;
|
||||||
|
out_free:
|
||||||
|
kfree_skb(skb);
|
||||||
|
+ len = 0;
|
||||||
|
out:
|
||||||
|
+ if (len)
|
||||||
|
+ ieee80211_tpt_led_trig_tx(local, len);
|
||||||
|
rcu_read_unlock();
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4203,8 +4200,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s
|
||||||
|
}
|
||||||
|
|
||||||
|
static bool ieee80211_tx_8023(struct ieee80211_sub_if_data *sdata,
|
||||||
|
- struct sk_buff *skb, int led_len,
|
||||||
|
- struct sta_info *sta,
|
||||||
|
+ struct sk_buff *skb, struct sta_info *sta,
|
||||||
|
bool txpending)
|
||||||
|
{
|
||||||
|
struct ieee80211_local *local = sdata->local;
|
||||||
|
@@ -4214,6 +4210,8 @@ static bool ieee80211_tx_8023(struct iee
|
||||||
|
unsigned long flags;
|
||||||
|
int q = info->hw_queue;
|
||||||
|
|
||||||
|
+ ieee80211_tpt_led_trig_tx(local, skb->len);
|
||||||
|
+
|
||||||
|
if (ieee80211_queue_skb(local, sdata, sta, skb))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
@@ -4314,7 +4312,7 @@ static void ieee80211_8023_xmit(struct i
|
||||||
|
info->control.flags |= IEEE80211_TX_CTRL_HW_80211_ENCAP;
|
||||||
|
info->control.vif = &sdata->vif;
|
||||||
|
|
||||||
|
- ieee80211_tx_8023(sdata, skb, skb->len, sta, false);
|
||||||
|
+ ieee80211_tx_8023(sdata, skb, sta, false);
|
||||||
|
|
||||||
|
return;
|
||||||
|
|
||||||
|
@@ -4438,7 +4436,7 @@ static bool ieee80211_tx_pending_skb(str
|
||||||
|
if (IS_ERR(sta) || (sta && !sta->uploaded))
|
||||||
|
sta = NULL;
|
||||||
|
|
||||||
|
- result = ieee80211_tx_8023(sdata, skb, skb->len, sta, true);
|
||||||
|
+ result = ieee80211_tx_8023(sdata, skb, sta, true);
|
||||||
|
} else {
|
||||||
|
struct sk_buff_head skbs;
|
||||||
|
|
||||||
|
@@ -4448,7 +4446,7 @@ static bool ieee80211_tx_pending_skb(str
|
||||||
|
hdr = (struct ieee80211_hdr *)skb->data;
|
||||||
|
sta = sta_info_get(sdata, hdr->addr1);
|
||||||
|
|
||||||
|
- result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
|
||||||
|
+ result = __ieee80211_tx(local, &skbs, sta, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
@@ -278,23 +278,23 @@ index 0000000000..35b4d9b529
|
|||||||
+cig,wf188n|\
|
+cig,wf188n|\
|
||||||
+cig,wf194c)
|
+cig,wf194c)
|
||||||
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" "tx rx link"
|
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0" "tx rx link"
|
||||||
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tx"
|
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||||
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tx"
|
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||||
+ ;;
|
+ ;;
|
||||||
+esac
|
+esac
|
||||||
+
|
+
|
||||||
+case "$board" in
|
+case "$board" in
|
||||||
+edgecore,eap101)
|
+edgecore,eap101)
|
||||||
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tx"
|
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||||
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tx"
|
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||||
+ ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "eth1"
|
+ ucidef_set_led_netdev "lan1" "lan1" "green:lan1" "eth1"
|
||||||
+ ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "eth2"
|
+ ucidef_set_led_netdev "lan2" "lan2" "green:lan2" "eth2"
|
||||||
+ ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
+ ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
||||||
+ ;;
|
+ ;;
|
||||||
+edgecore,eap102)
|
+edgecore,eap102)
|
||||||
+ ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
+ ucidef_set_led_netdev "poe" "poe" "green:wan" "eth0"
|
||||||
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tx"
|
+ ucidef_set_led_wlan "wlan5g" "WLAN5G" "green:wifi5" "phy0tpt"
|
||||||
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tx"
|
+ ucidef_set_led_wlan "wlan2g" "WLAN2G" "green:wifi2" "phy1tpt"
|
||||||
+ ;;
|
+ ;;
|
||||||
+esac
|
+esac
|
||||||
+
|
+
|
||||||
|
|||||||
Reference in New Issue
Block a user