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

Commit 98d5572d authored by Kiran Kumar Lokere's avatar Kiran Kumar Lokere Committed by Gerrit - the friendly Code Review server
Browse files

cfg80211: Define new API to send reg change event



Define new exported cfg80211 api cfg80211_send_reg_change_event()
to send regulatory update event to user-space.

CRs-Fixed: 2183721
Change-Id: I32e12c8db22a63b9166481dfec937716fb15d855
Signed-off-by: default avatarKiran Kumar Lokere <klokere@codeaurora.org>
parent a961632a
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -82,6 +82,9 @@ struct wiphy;
/* Indicate support for including KEK length in rekey data */
#define CFG80211_REKEY_DATA_KEK_LEN 1

/* Indicate support for regulatory update sync event */
#define CFG80211_REG_UPDATE_SYNC_EVENT 1

/*
 * wireless hardware capability structures
 */
@@ -5771,6 +5774,14 @@ void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
 */
void cfg80211_ap_stopped(struct net_device *netdev, gfp_t gfp);

/**
 * cfg80211_send_reg_change_event - notify user-space of regulatory change
 * @request: regulatory request
 * @wiphy: the wiphy to use
 */
void cfg80211_send_reg_change_event(struct regulatory_request *request,
				    struct wiphy *wiphy);

/* Logging, debugging and troubleshooting/diagnostic helpers. */

/* wiphy_printk helpers, similar to dev_printk */
+8 −0
Original line number Diff line number Diff line
@@ -1796,6 +1796,14 @@ static void update_all_wiphy_regulatory(enum nl80211_reg_initiator initiator)
	reg_check_channels();
}

void cfg80211_send_reg_change_event(struct regulatory_request *request,
				    struct wiphy *wiphy)
{
	request->wiphy_idx  = get_wiphy_idx(wiphy);
	nl80211_send_reg_change_event(request);
}
EXPORT_SYMBOL(cfg80211_send_reg_change_event);

static void handle_channel_custom(struct wiphy *wiphy,
				  struct ieee80211_channel *chan,
				  const struct ieee80211_regdomain *regd)