From 99046ab7856b839cf39aabf34a4f1a05433cc49d Mon Sep 17 00:00:00 2001 From: Avinash Patil Date: Thu, 28 Jun 2012 20:30:28 -0700 Subject: [PATCH] --- yaml --- r: 315231 b: refs/heads/master c: 5370c83684d9e7247b4026ca193b813580653377 h: refs/heads/master i: 315229: 5b691e1161bc15055fb76132582a91f924753f89 315227: 283431ea056e87ad11634d97eb2ab80ab35f7ae6 315223: df08ee232ac9ae36c5227473361c9deedfaee2c6 315215: 2d62f165ab95308972ebf462cd040f8c41d6b9e4 315199: 93800e707650df1e97c994787ab50a2fea85aaa4 v: v3 --- [refs] | 2 +- trunk/drivers/net/wireless/mwifiex/cfg80211.c | 28 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 6cd0be0dde7d..3c41d58efdae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bd6aa0302506b48bb40c59abd916d543707a1a93 +refs/heads/master: 5370c83684d9e7247b4026ca193b813580653377 diff --git a/trunk/drivers/net/wireless/mwifiex/cfg80211.c b/trunk/drivers/net/wireless/mwifiex/cfg80211.c index f38693d95743..0170e87f7ca4 100644 --- a/trunk/drivers/net/wireless/mwifiex/cfg80211.c +++ b/trunk/drivers/net/wireless/mwifiex/cfg80211.c @@ -914,6 +914,33 @@ static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy, return 0; } +/* cfg80211 operation handler for change_beacon. + * Function retrieves and sets modified management IEs to FW. + */ +static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy, + struct net_device *dev, + struct cfg80211_beacon_data *data) +{ + struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); + + if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) { + wiphy_err(wiphy, "%s: bss_type mismatched\n", __func__); + return -EINVAL; + } + + if (!priv->bss_started) { + wiphy_err(wiphy, "%s: bss not started\n", __func__); + return -EINVAL; + } + + if (mwifiex_set_mgmt_ies(priv, data)) { + wiphy_err(wiphy, "%s: setting mgmt ies failed\n", __func__); + return -EFAULT; + } + + return 0; +} + /* cfg80211 operation handler for stop ap. * Function stops BSS running at uAP interface. */ @@ -1697,6 +1724,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = { .set_bitrate_mask = mwifiex_cfg80211_set_bitrate_mask, .start_ap = mwifiex_cfg80211_start_ap, .stop_ap = mwifiex_cfg80211_stop_ap, + .change_beacon = mwifiex_cfg80211_change_beacon, .set_cqm_rssi_config = mwifiex_cfg80211_set_cqm_rssi_config, };