ath6kl: Group wiphy initialization into ath6kl_cfg80211_init()
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Tue, 28 Feb 2012 14:50:19 +0000 (20:20 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Thu, 1 Mar 2012 06:30:18 +0000 (08:30 +0200)
There are some code which initializes various wiphy members
left outside ath6kl_cfg80211_init(), in ath6kl_core_init().
Move them into a single palce.

Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/core.c

index 5da0f292ec7943be86a806c78f2d32233c97573f..bad92441b78a43258e847e74bdf25e6824c87b09 100644 (file)
@@ -3077,6 +3077,20 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
 
        wiphy->max_sched_scan_ssids = 10;
 
+       ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM |
+                           WIPHY_FLAG_HAVE_AP_SME |
+                           WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
+                           WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
+
+       if (test_bit(ATH6KL_FW_CAPABILITY_SCHED_SCAN, ar->fw_capabilities))
+               ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
+
+       ar->wiphy->probe_resp_offload =
+               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
+               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
+               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P |
+               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U;
+
        ret = wiphy_register(wiphy);
        if (ret < 0) {
                ath6kl_err("couldn't register wiphy device\n");
index 39684650e843128defe7ac412d471f33ee16c77a..d078aedfbf7714cedaae9c7519657e88d24560e6 100644 (file)
@@ -154,20 +154,6 @@ int ath6kl_core_init(struct ath6kl *ar)
        if (uart_debug)
                ar->conf_flags |= ATH6KL_CONF_UART_DEBUG;
 
-       ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_FW_ROAM |
-                           WIPHY_FLAG_HAVE_AP_SME |
-                           WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
-                           WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
-
-       if (test_bit(ATH6KL_FW_CAPABILITY_SCHED_SCAN, ar->fw_capabilities))
-               ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
-
-       ar->wiphy->probe_resp_offload =
-               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS |
-               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
-               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P |
-               NL80211_PROBE_RESP_OFFLOAD_SUPPORT_80211U;
-
        set_bit(FIRST_BOOT, &ar->flag);
 
        ndev->hw_features |= NETIF_F_IP_CSUM | NETIF_F_RXCSUM;