forked from mirror/openwrt
33fb6c738bc4 P2P2: Enable some testing parameters without CONFIG_TESTING_OPTIONS 56616c4183a6 P2P2: Update device name with USD device found 1d791939dcdf Cancel pending connect radio work when network is removed 8235e21d7fe3 P2P: Fix preferred frequency list size handling in p2p_check_pref_chan() 4bc754d9c727 Add QCA vendor interface to enable/disable TX power limit d65f5705df98 Add QCA vendor attribute to disable A-MSDU address check validation 74881765b7fb nl80211: Use i802_bss in qca_set_allowed_ap_freqs() to use correct ifindex ca8303135cbb P2P2: Set P2P mode to the driver on P2P GO device 063ae7af68dc ACS: Fix incorrect index calculation for primary channel 4aa3a58377c1 ACS: Validate all channels in a segment before selection 02c9d3376224 ACS: Extend support to exclude 6 GHz non-PSC in non-offloaded ACS 307365eb57bb tests: Add test for ACS exclude 6 GHz non-PSC 0721e4886316 Add QCA vendor attribute to configure EHT RTWT support 76b39db44c77 QCA vendor attribute to configure BTM MLD Recommendation For Multiple APs support 2faeffdeca22 AP MLD: Properly deinit sm of non-ML STA connected to ML AP e4f4e5a872a5 AP MLD: Fix STA's flag wrongly updated in SME-in-driver cases ec6cade42c0f Increase buffer size to handle long freq_list entries in config 0522585da7b0 Write freq_list as per-network item in wpa_supplicant.conf 5e527704b912 Use SCS reconfiguration logic under CONFIG_NO_ROBUST_AV 5d6214a724c1 PASN: Clear driver/firwmare ranging context if PASN Auth 1 fails 14dc782d50db DPP: Avoid generating DPP shared secret(z) for non-association links 40326b60b17a RSNO: Allow OWE to be configured in RSN overrides in AP processing acadef1b04d5 hostapd_cli: Open a new hostapd connection on ping failure when using -a ac0d9bd80ec5 Add QCA vendor attributes to configure global TX chain mask f5b8ef6c966a Add QCA vendor attributes for MSDU TX statistics 6c11fcefe4fc hostapd: Prevent blocking sends on control interface monitor socket 0bbb8a66f64c AP MLD: Remove redundant outer loop in hostapd_notif_disassoc_mld() 52fb5ccd91f3 AP MLD: Avoid using mld_id to identify partners 7bb930d50b5f wpa_supplicant: Add option to disable 80+80 MHz opclass advertisement 9001059bd6ad tests: Make dbus_connect_oom more robust 663fb1940231 AP MLD: Fix hostapd_is_mld_ap() check 590f3bdb4c61 AP MLD: Rename hostapd_is_mld_ap() to hostapd_is_multiple_link_mld() b13b69a235f7 Add VLANID in the AP-STA-CONNECTED events c1e8b1c6462b SAE: Assign VLAN when using PMKSA caching 9bc29dcdfdee SAE: Default password binding through control interface 9de127c31c40 tests: More testing coverage for SAE with multiple passwords 5ce1d4180386 nl80211: Fix crash by cancelling scan timeout before a BSS is removed ca266cc24d87 nl80211: Fix crash by setting the drv->ctx properly Signed-off-by: Felix Fietkau <nbd@nbd.name>
105 lines
2.8 KiB
Diff
105 lines
2.8 KiB
Diff
--- a/src/ap/ieee802_1x.c
|
|
+++ b/src/ap/ieee802_1x.c
|
|
@@ -2005,6 +2005,25 @@ static int ieee802_1x_update_vlan(struct
|
|
}
|
|
#endif /* CONFIG_NO_VLAN */
|
|
|
|
+static int ieee802_1x_update_wispr(struct hostapd_data *hapd,
|
|
+ struct sta_info *sta,
|
|
+ struct radius_msg *msg)
|
|
+{
|
|
+ memset(sta->bandwidth, 0, sizeof(sta->bandwidth));
|
|
+
|
|
+ if (radius_msg_get_wispr(msg, sta->bandwidth))
|
|
+ return 0;
|
|
+
|
|
+ if (!sta->bandwidth[0] && !sta->bandwidth[1])
|
|
+ return 0;
|
|
+
|
|
+ hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE8021X,
|
|
+ HOSTAPD_LEVEL_INFO,
|
|
+ "received wispr bandwidth from RADIUS server %d/%d",
|
|
+ sta->bandwidth[0], sta->bandwidth[1]);
|
|
+
|
|
+ return 0;
|
|
+}
|
|
|
|
/**
|
|
* ieee802_1x_receive_auth - Process RADIUS frames from Authentication Server
|
|
@@ -2121,6 +2140,7 @@ ieee802_1x_receive_auth(struct radius_ms
|
|
ieee802_1x_check_hs20(hapd, sta, msg,
|
|
session_timeout_set ?
|
|
(int) session_timeout : -1);
|
|
+ ieee802_1x_update_wispr(hapd, sta, msg);
|
|
break;
|
|
case RADIUS_CODE_ACCESS_REJECT:
|
|
sm->eap_if->aaaFail = true;
|
|
--- a/src/ap/sta_info.h
|
|
+++ b/src/ap/sta_info.h
|
|
@@ -95,6 +95,7 @@ struct sta_info {
|
|
u8 supported_rates[WLAN_SUPP_RATES_MAX];
|
|
int supported_rates_len;
|
|
u8 qosinfo; /* Valid when WLAN_STA_WMM is set */
|
|
+ u32 bandwidth[2];
|
|
|
|
#ifdef CONFIG_MESH
|
|
enum mesh_plink_state plink_state;
|
|
--- a/src/radius/radius.c
|
|
+++ b/src/radius/radius.c
|
|
@@ -1377,6 +1377,35 @@ radius_msg_get_cisco_keys(struct radius_
|
|
return keys;
|
|
}
|
|
|
|
+#define RADIUS_VENDOR_ID_WISPR 14122
|
|
+#define RADIUS_WISPR_AV_BW_UP 7
|
|
+#define RADIUS_WISPR_AV_BW_DOWN 8
|
|
+
|
|
+int
|
|
+radius_msg_get_wispr(struct radius_msg *msg, u32 *bandwidth)
|
|
+{
|
|
+ int i;
|
|
+
|
|
+ if (msg == NULL || bandwidth == NULL)
|
|
+ return 1;
|
|
+
|
|
+ for (i = 0; i < 2; i++) {
|
|
+ size_t keylen;
|
|
+ u8 *key;
|
|
+
|
|
+ key = radius_msg_get_vendor_attr(msg, RADIUS_VENDOR_ID_WISPR,
|
|
+ RADIUS_WISPR_AV_BW_UP + i, &keylen);
|
|
+ if (!key)
|
|
+ continue;
|
|
+
|
|
+ if (keylen == 4)
|
|
+ bandwidth[i] = ntohl(*((u32 *)key));
|
|
+ os_free(key);
|
|
+ }
|
|
+
|
|
+ return 0;
|
|
+}
|
|
+
|
|
|
|
int radius_msg_add_mppe_keys(struct radius_msg *msg,
|
|
const u8 *req_authenticator,
|
|
--- a/src/radius/radius.h
|
|
+++ b/src/radius/radius.h
|
|
@@ -232,6 +232,10 @@ enum {
|
|
RADIUS_VENDOR_ATTR_WFA_HS20_T_C_URL = 10,
|
|
};
|
|
|
|
+#define RADIUS_VENDOR_ID_WISPR 14122
|
|
+#define RADIUS_WISPR_AV_BW_UP 7
|
|
+#define RADIUS_WISPR_AV_BW_DOWN 8
|
|
+
|
|
#ifdef _MSC_VER
|
|
#pragma pack(pop)
|
|
#endif /* _MSC_VER */
|
|
@@ -304,6 +308,7 @@ radius_msg_get_ms_keys(struct radius_msg
|
|
struct radius_ms_mppe_keys *
|
|
radius_msg_get_cisco_keys(struct radius_msg *msg, struct radius_msg *sent_msg,
|
|
const u8 *secret, size_t secret_len);
|
|
+int radius_msg_get_wispr(struct radius_msg *msg, u32 *bandwidth);
|
|
int radius_msg_add_mppe_keys(struct radius_msg *msg,
|
|
const u8 *req_authenticator,
|
|
const u8 *secret, size_t secret_len,
|