mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	wifi: mac80211: update TIM for S1G specification changes
Updates to the TIM information element to match changes made in the IEEE Std 802.11ah-2020. Signed-off-by: Kieran Frewen <kieran.frewen@morsemicro.com> Co-developed-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Signed-off-by: Gilad Itzkovitch <gilad.itzkovitch@morsemicro.com> Link: https://lore.kernel.org/r/20221106221602.25714-1-gilad.itzkovitch@morsemicro.com [use skb_put_data/skb_put_u8] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
		
							parent
							
								
									8950b5988a
								
							
						
					
					
						commit
						209d70d34a
					
				
					 1 changed files with 9 additions and 5 deletions
				
			
		|  | @ -4774,9 +4774,9 @@ static void __ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata, | |||
| 			ps->dtim_count--; | ||||
| 	} | ||||
| 
 | ||||
| 	tim = pos = skb_put(skb, 6); | ||||
| 	tim = pos = skb_put(skb, 5); | ||||
| 	*pos++ = WLAN_EID_TIM; | ||||
| 	*pos++ = 4; | ||||
| 	*pos++ = 3; | ||||
| 	*pos++ = ps->dtim_count; | ||||
| 	*pos++ = link_conf->dtim_period; | ||||
| 
 | ||||
|  | @ -4807,13 +4807,17 @@ static void __ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata, | |||
| 		/* Bitmap control */ | ||||
| 		*pos++ = n1 | aid0; | ||||
| 		/* Part Virt Bitmap */ | ||||
| 		skb_put(skb, n2 - n1); | ||||
| 		memcpy(pos, ps->tim + n1, n2 - n1 + 1); | ||||
| 		skb_put_data(skb, ps->tim + n1, n2 - n1 + 1); | ||||
| 
 | ||||
| 		tim[1] = n2 - n1 + 4; | ||||
| 	} else { | ||||
| 		*pos++ = aid0; /* Bitmap control */ | ||||
| 		*pos++ = 0; /* Part Virt Bitmap */ | ||||
| 
 | ||||
| 		if (ieee80211_get_link_sband(link)->band != NL80211_BAND_S1GHZ) { | ||||
| 			tim[1] = 4; | ||||
| 			/* Part Virt Bitmap */ | ||||
| 			skb_put_u8(skb, 0); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Kieran Frewen
						Kieran Frewen