if (key_len) {
priv->keys[index].key = kzalloc(key_len, GFP_ATOMIC);
---- a/net/wireless/scan.c
-+++ b/net/wireless/scan.c
-@@ -673,9 +673,14 @@ cfg80211_bss_update(struct cfg80211_regi
- size_t used = dev->wiphy.bss_priv_size + sizeof(*res);
- size_t ielen = res->pub.len_proberesp_ies;
-
-+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28)
-+ if (0) {
-+ used = 0; /* just to shut up the compiler */
-+#else
- if (found->pub.proberesp_ies &&
- !found->proberesp_ies_allocated &&
- ksize(found) >= used + ielen) {
-+#endif
- memcpy(found->pub.proberesp_ies,
- res->pub.proberesp_ies, ielen);
- found->pub.len_proberesp_ies = ielen;
-@@ -709,9 +714,14 @@ cfg80211_bss_update(struct cfg80211_regi
- (found->pub.information_elements ==
- found->pub.beacon_ies);
-
-+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,28)
-+ if (0) {
-+ used = 0; /* just to shut up the compiler */
-+#else
- if (found->pub.beacon_ies &&
- !found->beacon_ies_allocated &&
- ksize(found) >= used + ielen) {
-+#endif
- memcpy(found->pub.beacon_ies,
- res->pub.beacon_ies, ielen);
- found->pub.len_beacon_ies = ielen;