Merge branch 'upstream-fixes' into upstream
[powerpc.git] / net / ieee80211 / softmac / ieee80211softmac_io.c
index 8cc8b20..82bfddb 100644 (file)
@@ -96,8 +96,7 @@ ieee80211softmac_alloc_mgt(u32 size)
        if(size > IEEE80211_DATA_LEN)
                return NULL;
        /* Allocate the frame */
-       data = kmalloc(size, GFP_ATOMIC);
-       memset(data, 0, size);
+       data = kzalloc(size, GFP_ATOMIC);
        return data;
 }
 
@@ -468,3 +467,17 @@ ieee80211softmac_send_mgt_frame(struct ieee80211softmac_device *mac,
        kfree(pkt);
        return 0;
 }
+
+/* Beacon handling */
+int ieee80211softmac_handle_beacon(struct net_device *dev,
+       struct ieee80211_beacon *beacon,
+       struct ieee80211_network *network)
+{
+       struct ieee80211softmac_device *mac = ieee80211_priv(dev);
+
+       if (mac->associated && memcmp(network->bssid, mac->associnfo.bssid, ETH_ALEN) == 0)
+               ieee80211softmac_process_erp(mac, network->erp_value);
+
+       return 0;
+}
+