mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	cfg80211: process non country IE conflicting first
By dealing with non country IE conficts first we can shift the code that deals with the conflict to the left. This has no functional changes. Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
		
							parent
							
								
									b23e7a9e6b
								
							
						
					
					
						commit
						2f1c6c572d
					
				
					 1 changed files with 20 additions and 19 deletions
				
			
		| 
						 | 
					@ -1539,11 +1539,14 @@ __reg_process_hint_country_ie(struct wiphy *wiphy,
 | 
				
			||||||
		return REG_REQ_ALREADY_SET;
 | 
							return REG_REQ_ALREADY_SET;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	last_wiphy = wiphy_idx_to_wiphy(lr->wiphy_idx);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (unlikely(!is_an_alpha2(country_ie_request->alpha2)))
 | 
						if (unlikely(!is_an_alpha2(country_ie_request->alpha2)))
 | 
				
			||||||
		return -EINVAL;
 | 
							return -EINVAL;
 | 
				
			||||||
	if (lr->initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
 | 
					
 | 
				
			||||||
 | 
						if (lr->initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE)
 | 
				
			||||||
 | 
							return REG_REQ_OK;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						last_wiphy = wiphy_idx_to_wiphy(lr->wiphy_idx);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (last_wiphy != wiphy) {
 | 
						if (last_wiphy != wiphy) {
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * Two cards with two APs claiming different
 | 
							 * Two cards with two APs claiming different
 | 
				
			||||||
| 
						 | 
					@ -1563,8 +1566,6 @@ __reg_process_hint_country_ie(struct wiphy *wiphy,
 | 
				
			||||||
		return REG_REQ_OK;
 | 
							return REG_REQ_OK;
 | 
				
			||||||
	return REG_REQ_ALREADY_SET;
 | 
						return REG_REQ_ALREADY_SET;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
	return REG_REQ_OK;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * reg_process_hint_country_ie - process regulatory requests from country IEs
 | 
					 * reg_process_hint_country_ie - process regulatory requests from country IEs
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue