aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorAvinash Patil <patila@marvell.com>2012-06-28 23:30:28 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:35:59 -0400
commit5370c83684d9e7247b4026ca193b813580653377 (patch)
treea070e0943133054282273f32b5d8baae3d844702 /drivers/net/wireless
parentbd6aa0302506b48bb40c59abd916d543707a1a93 (diff)
mwifiex: add change_beacon cfg80211 handler
This patch adds support for change_beacon handler which is needed for setting modified management IEs to driver and FW. Signed-off-by: Avinash Patil <patila@marvell.com> Signed-off-by: Bing Zhao <bzhao@marvell.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index f38693d95743..0170e87f7ca4 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -914,6 +914,33 @@ static int mwifiex_cfg80211_set_cqm_rssi_config(struct wiphy *wiphy,
914 return 0; 914 return 0;
915} 915}
916 916
917/* cfg80211 operation handler for change_beacon.
918 * Function retrieves and sets modified management IEs to FW.
919 */
920static int mwifiex_cfg80211_change_beacon(struct wiphy *wiphy,
921 struct net_device *dev,
922 struct cfg80211_beacon_data *data)
923{
924 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
925
926 if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
927 wiphy_err(wiphy, "%s: bss_type mismatched\n", __func__);
928 return -EINVAL;
929 }
930
931 if (!priv->bss_started) {
932 wiphy_err(wiphy, "%s: bss not started\n", __func__);
933 return -EINVAL;
934 }
935
936 if (mwifiex_set_mgmt_ies(priv, data)) {
937 wiphy_err(wiphy, "%s: setting mgmt ies failed\n", __func__);
938 return -EFAULT;
939 }
940
941 return 0;
942}
943
917/* cfg80211 operation handler for stop ap. 944/* cfg80211 operation handler for stop ap.
918 * Function stops BSS running at uAP interface. 945 * Function stops BSS running at uAP interface.
919 */ 946 */
@@ -1697,6 +1724,7 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
1697 .set_bitrate_mask = mwifiex_cfg80211_set_bitrate_mask, 1724 .set_bitrate_mask = mwifiex_cfg80211_set_bitrate_mask,
1698 .start_ap = mwifiex_cfg80211_start_ap, 1725 .start_ap = mwifiex_cfg80211_start_ap,
1699 .stop_ap = mwifiex_cfg80211_stop_ap, 1726 .stop_ap = mwifiex_cfg80211_stop_ap,
1727 .change_beacon = mwifiex_cfg80211_change_beacon,
1700 .set_cqm_rssi_config = mwifiex_cfg80211_set_cqm_rssi_config, 1728 .set_cqm_rssi_config = mwifiex_cfg80211_set_cqm_rssi_config,
1701}; 1729};
1702 1730