ath6kl: Use set_appie command to add Probe Request IEs
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 30 Aug 2011 18:57:59 +0000 (21:57 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 31 Aug 2011 07:13:01 +0000 (10:13 +0300)
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/wmi.h

index 5c98de36d163fd0b78d5f18de81993424c38db19..56a60c7f53c143ff26287e5968b1b5db5f9313a1 100644 (file)
@@ -776,6 +776,16 @@ static int ath6kl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
                                                  request->ssids[i].ssid);
        }
 
+       if (request->ie) {
+               ret = ath6kl_wmi_set_appie_cmd(ar->wmi, WMI_FRAME_PROBE_REQ,
+                                              request->ie, request->ie_len);
+               if (ret) {
+                       ath6kl_err("failed to set Probe Request appie for "
+                                  "scan");
+                       return ret;
+               }
+       }
+
        if (ath6kl_wmi_startscan_cmd(ar->wmi, WMI_LONG_SCAN, 0,
                                     false, 0, 0, 0, NULL) != 0) {
                ath6kl_err("wmi_startscan_cmd failed\n");
@@ -1770,6 +1780,7 @@ struct wireless_dev *ath6kl_cfg80211_init(struct device *dev)
            BIT(NL80211_IFTYPE_ADHOC);
        /* max num of ssids that can be probed during scanning */
        wdev->wiphy->max_scan_ssids = MAX_PROBED_SSID_INDEX;
+       wdev->wiphy->max_scan_ie_len = 1000; /* FIX: what is correct limit? */
        wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &ath6kl_band_2ghz;
        wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &ath6kl_band_5ghz;
        wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
index 5e2f6ce41ba1a9daa92603df55a007031b03db04..83af518fcafc133aa98d49d38a443d6a4a7d7471 100644 (file)
@@ -2218,6 +2218,9 @@ int ath6kl_wmi_info_req_cmd(struct wmi *wmi, u32 info_req_flags);
 
 int ath6kl_wmi_cancel_remain_on_chnl_cmd(struct wmi *wmi);
 
+int ath6kl_wmi_set_appie_cmd(struct wmi *wmi, u8 mgmt_frm_type, const u8 *ie,
+                            u8 ie_len);
+
 void *ath6kl_wmi_init(struct ath6kl *devt);
 void ath6kl_wmi_shutdown(struct wmi *wmi);