]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
net: wireless: bcmdhd: set channel in AP mode
authorOm Prakash Singh <omp@nvidia.com>
Tue, 1 Oct 2013 09:55:48 +0000 (15:25 +0530)
committerBharat Nihalani <bnihalani@nvidia.com>
Fri, 4 Oct 2013 11:49:32 +0000 (04:49 -0700)
set_channel is removed in kernel 3.8 from cfg80211_ops. Configuration
AP channel in start_ap

Bug 1352126

Change-Id: Ib75a0bdaece2e5bf7ec046148e70649f817c6e48
Signed-off-by: Om Prakash Singh <omp@nvidia.com>
Reviewed-on: http://git-master/r/280670
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
drivers/net/wireless/bcmdhd/wl_cfg80211.c

index 2b0f9a5d22a7b0f968930b17d52841815843e59c..067d2bdf4cd30c769d26e155e052de969359c90b 100644 (file)
@@ -4774,7 +4774,7 @@ wl_cfg80211_change_bss(struct wiphy *wiphy,
 }
 
 static s32
-wl_cfg80211_set_channel(struct wiphy *wiphy,
+wl_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
        struct ieee80211_channel *chan,
        enum nl80211_channel_type channel_type)
 {
@@ -4790,7 +4790,6 @@ wl_cfg80211_set_channel(struct wiphy *wiphy,
                u32 bw_cap;
        } param = {0, 0};
        struct wl_priv *wl = wiphy_priv(wiphy);
-       struct net_device *dev = wl_to_prmry_ndev(wl);
 
        if (wl->p2p_net == dev) {
                dev = wl_to_prmry_ndev(wl);
@@ -5702,6 +5701,13 @@ wl_cfg80211_start_ap(
                WL_DBG(("Start AP req on P2P connection iface\n"));
        }
 
+       if ((err = wl_cfg80211_set_channel(wiphy, dev,
+               dev->ieee80211_ptr->preset_chandef.chan,
+               NL80211_CHAN_HT20) < 0)) {
+               WL_ERR(("Set channel failed \n"));
+               goto fail;
+       }
+
        if ((err = wl_cfg80211_bcn_set_params(info, dev,
                dev_role, bssidx)) < 0) {
                WL_ERR(("Beacon params set failed \n"));