mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	wifi: mac80211: support MLO authentication/association with one link
It might seem a bit pointless to do a multi-link operation connection with just a single link, but this is already a big change, so for now, limit MLO connections to a single link. Extending that to multiple links will require * work on parsing the multi-link element with STA profile properly, including element fragmentation; * checking the per-link status in the multi-link element * implementing logic to have active/inactive links to let drivers decide which links should be active; * implementing multicast RX deduplication; * and likely more. For now this is still useful since it lets us do multi-link connections for the purposes of testing APIs and the higher layers such as wpa_supplicant. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
		
							parent
							
								
									425f4b5fce
								
							
						
					
					
						commit
						81151ce462
					
				
					 4 changed files with 872 additions and 243 deletions
				
			
		| 
						 | 
				
			
			@ -389,37 +389,55 @@ struct ieee80211_mgd_auth_data {
 | 
			
		|||
	bool peer_confirmed;
 | 
			
		||||
	bool timeout_started;
 | 
			
		||||
 | 
			
		||||
	u8 ap_addr[ETH_ALEN] __aligned(2);
 | 
			
		||||
 | 
			
		||||
	u16 sae_trans, sae_status;
 | 
			
		||||
	size_t data_len;
 | 
			
		||||
	u8 data[];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct ieee80211_mgd_assoc_data {
 | 
			
		||||
	struct {
 | 
			
		||||
		struct cfg80211_bss *bss;
 | 
			
		||||
	const u8 *supp_rates;
 | 
			
		||||
 | 
			
		||||
	unsigned long timeout;
 | 
			
		||||
	int tries;
 | 
			
		||||
 | 
			
		||||
	u16 capability;
 | 
			
		||||
	u8 prev_bssid[ETH_ALEN];
 | 
			
		||||
	u8 ssid[IEEE80211_MAX_SSID_LEN];
 | 
			
		||||
	u8 ssid_len;
 | 
			
		||||
	u8 supp_rates_len;
 | 
			
		||||
	bool wmm, uapsd;
 | 
			
		||||
	bool need_beacon;
 | 
			
		||||
	bool synced;
 | 
			
		||||
	bool timeout_started;
 | 
			
		||||
		u8 addr[ETH_ALEN] __aligned(2);
 | 
			
		||||
 | 
			
		||||
		u8 ap_ht_param;
 | 
			
		||||
 | 
			
		||||
		struct ieee80211_vht_cap ap_vht_cap;
 | 
			
		||||
 | 
			
		||||
		size_t elems_len;
 | 
			
		||||
		u8 *elems; /* pointing to inside ie[] below */
 | 
			
		||||
 | 
			
		||||
		ieee80211_conn_flags_t conn_flags;
 | 
			
		||||
	} link[IEEE80211_MLD_MAX_NUM_LINKS];
 | 
			
		||||
 | 
			
		||||
	u8 ap_addr[ETH_ALEN] __aligned(2);
 | 
			
		||||
 | 
			
		||||
	/* this is for a workaround, so we use it only for non-MLO */
 | 
			
		||||
	const u8 *supp_rates;
 | 
			
		||||
	u8 supp_rates_len;
 | 
			
		||||
 | 
			
		||||
	unsigned long timeout;
 | 
			
		||||
	int tries;
 | 
			
		||||
 | 
			
		||||
	u8 prev_ap_addr[ETH_ALEN];
 | 
			
		||||
	u8 ssid[IEEE80211_MAX_SSID_LEN];
 | 
			
		||||
	u8 ssid_len;
 | 
			
		||||
	bool wmm, uapsd;
 | 
			
		||||
	bool need_beacon;
 | 
			
		||||
	bool synced;
 | 
			
		||||
	bool timeout_started;
 | 
			
		||||
	bool s1g;
 | 
			
		||||
 | 
			
		||||
	unsigned int assoc_link_id;
 | 
			
		||||
 | 
			
		||||
	u8 fils_nonces[2 * FILS_NONCE_LEN];
 | 
			
		||||
	u8 fils_kek[FILS_MAX_KEK_LEN];
 | 
			
		||||
	size_t fils_kek_len;
 | 
			
		||||
 | 
			
		||||
	size_t ie_len;
 | 
			
		||||
	u8 *ie_pos; /* used to fill ie[] with link[].elems */
 | 
			
		||||
	u8 ie[];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										1032
									
								
								net/mac80211/mlme.c
									
									
									
									
									
								
							
							
						
						
									
										1032
									
								
								net/mac80211/mlme.c
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -2478,7 +2478,7 @@ int ieee80211_lookup_ra_sta(struct ieee80211_sub_if_data *sdata,
 | 
			
		|||
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		sta = sta_info_get(sdata, sdata->deflink.u.mgd.bssid);
 | 
			
		||||
		sta = sta_info_get(sdata, sdata->vif.cfg.ap_addr);
 | 
			
		||||
		if (!sta)
 | 
			
		||||
			return -ENOLINK;
 | 
			
		||||
		break;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -50,6 +50,9 @@ void cfg80211_rx_assoc_resp(struct net_device *dev,
 | 
			
		|||
		/* need to have local link addresses for MLO connections */
 | 
			
		||||
		WARN_ON(cr.ap_mld_addr && !cr.links[link_id].addr);
 | 
			
		||||
 | 
			
		||||
		printk(KERN_CRIT "BSS pointer 0x%lx\n", (unsigned long)cr.links[link_id].bss);
 | 
			
		||||
		BUG_ON(!cr.links[link_id].bss->channel);
 | 
			
		||||
 | 
			
		||||
		if (cr.links[link_id].bss->channel->band == NL80211_BAND_S1GHZ) {
 | 
			
		||||
			WARN_ON(link_id);
 | 
			
		||||
			cr.resp_ie = (u8 *)&mgmt->u.s1g_assoc_resp.variable;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue