Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fff32c04 authored by Luis R. Rodriguez's avatar Luis R. Rodriguez Committed by John W. Linville
Browse files

cfg80211: allow drivers that agree on regulatory to agree



This allows drivers that agree on regulatory to share their
regulatory domain.

Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent fb1fc7ad
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -1157,6 +1157,16 @@ static int ignore_request(struct wiphy *wiphy, enum reg_set_by set_by,
				return 0;
				return 0;
			return -EALREADY;
			return -EALREADY;
		}
		}

		/*
		 * This would happen if you unplug and plug your card
		 * back in or if you add a new device for which the previously
		 * loaded card also agrees on the regulatory domain.
		 */
		if (last_request->initiator == REGDOM_SET_BY_DRIVER &&
		    alpha2_equal(cfg80211_regdomain->alpha2, alpha2))
			return -EALREADY;

		return REG_INTERSECT;
		return REG_INTERSECT;
	case REGDOM_SET_BY_USER:
	case REGDOM_SET_BY_USER:
		if (last_request->initiator == REGDOM_SET_BY_COUNTRY_IE)
		if (last_request->initiator == REGDOM_SET_BY_COUNTRY_IE)