wil6210: use cfg80211_inform_bss_frame()
authorVladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Wed, 13 Mar 2013 12:12:44 +0000 (14:12 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 13 Mar 2013 18:23:04 +0000 (14:23 -0400)
Avoid unnecessary frame parsing

Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/wil6210/wmi.c

index dd3b7b1f0856c915150b059892c288c7b015d939..9c069428557e640988ad5512137915a78133d12a 100644 (file)
@@ -324,17 +324,9 @@ static void wmi_evt_rx_mgmt(struct wil6210_priv *wil, int id, void *d, int len)
 
        if (ieee80211_is_beacon(fc) || ieee80211_is_probe_resp(fc)) {
                struct cfg80211_bss *bss;
-               u64 tsf = le64_to_cpu(rx_mgmt_frame->u.beacon.timestamp);
-               u16 cap = le16_to_cpu(rx_mgmt_frame->u.beacon.capab_info);
-               u16 bi = le16_to_cpu(rx_mgmt_frame->u.beacon.beacon_int);
-               const u8 *ie_buf = rx_mgmt_frame->u.beacon.variable;
-               size_t ie_len = d_len - offsetof(struct ieee80211_mgmt,
-                                                u.beacon.variable);
-               wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
-
-               bss = cfg80211_inform_bss(wiphy, channel, rx_mgmt_frame->bssid,
-                                         tsf, cap, bi, ie_buf, ie_len,
-                                         signal, GFP_KERNEL);
+
+               bss = cfg80211_inform_bss_frame(wiphy, channel, rx_mgmt_frame,
+                                               d_len, signal, GFP_KERNEL);
                if (bss) {
                        wil_dbg_wmi(wil, "Added BSS %pM\n",
                                    rx_mgmt_frame->bssid);