Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

+104 -132
+4 -3
drivers/net/wireless/ath/ath5k/base.c
··· 1214 1214 struct ath5k_hw *ah = sc->ah; 1215 1215 struct sk_buff *skb = bf->skb; 1216 1216 struct ath5k_desc *ds; 1217 + int ret; 1217 1218 1218 1219 if (!skb) { 1219 1220 skb = ath5k_rx_skb_alloc(sc, &bf->skbaddr); ··· 1241 1240 ds = bf->desc; 1242 1241 ds->ds_link = bf->daddr; /* link to self */ 1243 1242 ds->ds_data = bf->skbaddr; 1244 - ah->ah_setup_rx_desc(ah, ds, 1245 - skb_tailroom(skb), /* buffer size */ 1246 - 0); 1243 + ret = ah->ah_setup_rx_desc(ah, ds, ah->common.rx_bufsize, 0); 1244 + if (ret) 1245 + return ret; 1247 1246 1248 1247 if (sc->rxlink != NULL) 1249 1248 *sc->rxlink = bf->daddr;
+13 -62
drivers/net/wireless/ath/ath9k/beacon.c
··· 76 76 ds = bf->bf_desc; 77 77 flags = ATH9K_TXDESC_NOACK; 78 78 79 - if (((sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC) || 80 - (sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT)) && 81 - (ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 82 - ds->ds_link = bf->bf_daddr; /* self-linked */ 83 - flags |= ATH9K_TXDESC_VEOL; 84 - /* Let hardware handle antenna switching. */ 85 - antenna = 0; 86 - } else { 87 - ds->ds_link = 0; 88 - /* 89 - * Switch antenna every beacon. 90 - * Should only switch every beacon period, not for every SWBA 91 - * XXX assumes two antennae 92 - */ 93 - antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); 94 - } 79 + ds->ds_link = 0; 80 + /* 81 + * Switch antenna every beacon. 82 + * Should only switch every beacon period, not for every SWBA 83 + * XXX assumes two antennae 84 + */ 85 + antenna = ((sc->beacon.ast_be_xmit / sc->nbcnvifs) & 1 ? 2 : 1); 95 86 96 87 sband = &sc->sbands[common->hw->conf.channel->band]; 97 88 rate = sband->bitrates[rateidx].hw_value; ··· 206 215 return bf; 207 216 } 208 217 209 - /* 210 - * Startup beacon transmission for adhoc mode when they are sent entirely 211 - * by the hardware using the self-linked descriptor + veol trick. 212 - */ 213 - static void ath_beacon_start_adhoc(struct ath_softc *sc, 214 - struct ieee80211_vif *vif) 215 - { 216 - struct ath_hw *ah = sc->sc_ah; 217 - struct ath_common *common = ath9k_hw_common(ah); 218 - struct ath_buf *bf; 219 - struct ath_vif *avp; 220 - struct sk_buff *skb; 221 - 222 - avp = (void *)vif->drv_priv; 223 - 224 - if (avp->av_bcbuf == NULL) 225 - return; 226 - 227 - bf = avp->av_bcbuf; 228 - skb = bf->bf_mpdu; 229 - 230 - ath_beacon_setup(sc, avp, bf, 0); 231 - 232 - /* NB: caller is known to have already stopped tx dma */ 233 - ath9k_hw_puttxbuf(ah, sc->beacon.beaconq, bf->bf_daddr); 234 - ath9k_hw_txstart(ah, sc->beacon.beaconq); 235 - ath_print(common, ATH_DBG_BEACON, "TXDP%u = %llx (%p)\n", 236 - sc->beacon.beaconq, ito64(bf->bf_daddr), bf->bf_desc); 237 - } 238 - 239 218 int ath_beacon_alloc(struct ath_wiphy *aphy, struct ieee80211_vif *vif) 240 219 { 241 220 struct ath_softc *sc = aphy->sc; ··· 226 265 list_del(&avp->av_bcbuf->list); 227 266 228 267 if (sc->sc_ah->opmode == NL80211_IFTYPE_AP || 229 - !(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) { 268 + sc->sc_ah->opmode == NL80211_IFTYPE_ADHOC || 269 + sc->sc_ah->opmode == NL80211_IFTYPE_MESH_POINT) { 230 270 int slot; 231 271 /* 232 272 * Assign the vif to a beacon xmit slot. As ··· 236 274 avp->av_bslot = 0; 237 275 for (slot = 0; slot < ATH_BCBUF; slot++) 238 276 if (sc->beacon.bslot[slot] == NULL) { 239 - /* 240 - * XXX hack, space out slots to better 241 - * deal with misses 242 - */ 243 - if (slot+1 < ATH_BCBUF && 244 - sc->beacon.bslot[slot+1] == NULL) { 245 - avp->av_bslot = slot+1; 246 - break; 247 - } 248 277 avp->av_bslot = slot; 278 + 249 279 /* NB: keep looking for a double slot */ 280 + if (slot == 0 || !sc->beacon.bslot[slot-1]) 281 + break; 250 282 } 251 283 BUG_ON(sc->beacon.bslot[avp->av_bslot] != NULL); 252 284 sc->beacon.bslot[avp->av_bslot] = vif; ··· 677 721 * self-linked tx descriptor and let the hardware deal with things. 678 722 */ 679 723 intval |= ATH9K_BEACON_ENA; 680 - if (!(ah->caps.hw_caps & ATH9K_HW_CAP_VEOL)) 681 - ah->imask |= ATH9K_INT_SWBA; 724 + ah->imask |= ATH9K_INT_SWBA; 682 725 683 726 ath_beaconq_config(sc); 684 727 ··· 687 732 ath9k_beacon_init(sc, nexttbtt, intval); 688 733 sc->beacon.bmisscnt = 0; 689 734 ath9k_hw_set_interrupts(ah, ah->imask); 690 - 691 - /* FIXME: Handle properly when vif is NULL */ 692 - if (vif && ah->caps.hw_caps & ATH9K_HW_CAP_VEOL) 693 - ath_beacon_start_adhoc(sc, vif); 694 735 } 695 736 696 737 void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
+8 -2
drivers/net/wireless/ath/ath9k/hif_usb.c
··· 107 107 static void hif_usb_tx_cb(struct urb *urb) 108 108 { 109 109 struct tx_buf *tx_buf = (struct tx_buf *) urb->context; 110 - struct hif_device_usb *hif_dev = tx_buf->hif_dev; 110 + struct hif_device_usb *hif_dev; 111 111 struct sk_buff *skb; 112 112 113 - if (!hif_dev || !tx_buf) 113 + if (!tx_buf || !tx_buf->hif_dev) 114 114 return; 115 + 116 + hif_dev = tx_buf->hif_dev; 115 117 116 118 switch (urb->status) { 117 119 case 0: ··· 609 607 610 608 return 0; 611 609 err: 610 + if (tx_buf) { 611 + kfree(tx_buf->buf); 612 + kfree(tx_buf); 613 + } 612 614 ath9k_hif_usb_dealloc_tx_urbs(hif_dev); 613 615 return -ENOMEM; 614 616 }
+1
drivers/net/wireless/ath/ath9k/htc.h
··· 23 23 #include <linux/skbuff.h> 24 24 #include <linux/netdevice.h> 25 25 #include <linux/leds.h> 26 + #include <linux/slab.h> 26 27 #include <net/mac80211.h> 27 28 28 29 #include "common.h"
+3 -25
drivers/net/wireless/ath/ath9k/main.c
··· 752 752 struct ath_hw *ah = common->ah; 753 753 struct ath9k_keyval hk; 754 754 const u8 *mac = NULL; 755 - u8 gmac[ETH_ALEN]; 756 755 int ret = 0; 757 756 int idx; 758 757 ··· 775 776 memcpy(hk.kv_val, key->key, key->keylen); 776 777 777 778 if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { 778 - 779 - if (key->ap_addr) { 780 - /* 781 - * Group keys on hardware that supports multicast frame 782 - * key search use a mac that is the sender's address with 783 - * the high bit set instead of the app-specified address. 784 - */ 785 - memcpy(gmac, key->ap_addr, ETH_ALEN); 786 - gmac[0] |= 0x80; 787 - mac = gmac; 788 - 789 - if (key->alg == ALG_TKIP) 790 - idx = ath_reserve_key_cache_slot_tkip(common); 791 - else 792 - idx = ath_reserve_key_cache_slot(common); 793 - if (idx < 0) 794 - mac = NULL; /* no free key cache entries */ 795 - } 796 - 797 - if (!mac) { 798 - /* For now, use the default keys for broadcast keys. This may 799 - * need to change with virtual interfaces. */ 800 - idx = key->keyidx; 801 - } 779 + /* For now, use the default keys for broadcast keys. This may 780 + * need to change with virtual interfaces. */ 781 + idx = key->keyidx; 802 782 } else if (key->keyidx) { 803 783 if (WARN_ON(!sta)) 804 784 return -EOPNOTSUPP;
-1
drivers/net/wireless/ath/ath9k/pci.c
··· 28 28 { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */ 29 29 { PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */ 30 30 { PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */ 31 - { PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E AR9300 */ 32 31 { 0 } 33 32 }; 34 33
+12 -5
drivers/net/wireless/ath/ath9k/recv.c
··· 19 19 20 20 #define SKB_CB_ATHBUF(__skb) (*((struct ath_buf **)__skb->cb)) 21 21 22 + static inline bool ath9k_check_auto_sleep(struct ath_softc *sc) 23 + { 24 + return sc->ps_enabled && 25 + (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP); 26 + } 27 + 22 28 static struct ieee80211_hw * ath_get_virt_hw(struct ath_softc *sc, 23 29 struct ieee80211_hdr *hdr) 24 30 { ··· 622 616 hdr = (struct ieee80211_hdr *)skb->data; 623 617 624 618 /* Process Beacon and CAB receive in PS state */ 625 - if ((sc->ps_flags & PS_WAIT_FOR_BEACON) && 626 - ieee80211_is_beacon(hdr->frame_control)) 619 + if (((sc->ps_flags & PS_WAIT_FOR_BEACON) || ath9k_check_auto_sleep(sc)) 620 + && ieee80211_is_beacon(hdr->frame_control)) 627 621 ath_rx_ps_beacon(sc, skb); 628 622 else if ((sc->ps_flags & PS_WAIT_FOR_CAB) && 629 623 (ieee80211_is_data(hdr->frame_control) || ··· 938 932 sc->rx.rxotherant = 0; 939 933 } 940 934 941 - if (unlikely(sc->ps_flags & (PS_WAIT_FOR_BEACON | 942 - PS_WAIT_FOR_CAB | 943 - PS_WAIT_FOR_PSPOLL_DATA))) 935 + if (unlikely(ath9k_check_auto_sleep(sc) || 936 + (sc->ps_flags & (PS_WAIT_FOR_BEACON | 937 + PS_WAIT_FOR_CAB | 938 + PS_WAIT_FOR_PSPOLL_DATA)))) 944 939 ath_rx_ps(sc, skb); 945 940 946 941 ath_rx_send_to_mac80211(hw, sc, skb, rxs);
+1
drivers/net/wireless/iwlwifi/iwl-agn-ict.c
··· 30 30 #include <linux/module.h> 31 31 #include <linux/etherdevice.h> 32 32 #include <linux/sched.h> 33 + #include <linux/gfp.h> 33 34 #include <net/mac80211.h> 34 35 35 36 #include "iwl-dev.h"
+18 -3
drivers/net/wireless/iwlwifi/iwl-scan.c
··· 376 376 377 377 mutex_lock(&priv->mutex); 378 378 379 + if (priv->is_internal_short_scan == true) { 380 + IWL_DEBUG_SCAN(priv, "Internal scan already in progress\n"); 381 + goto unlock; 382 + } 383 + 379 384 if (!iwl_is_ready_rf(priv)) { 380 385 IWL_DEBUG_SCAN(priv, "not ready or exit pending\n"); 381 386 goto unlock; ··· 502 497 { 503 498 struct iwl_priv *priv = 504 499 container_of(work, struct iwl_priv, scan_completed); 500 + bool internal = false; 505 501 506 502 IWL_DEBUG_SCAN(priv, "SCAN complete scan\n"); 507 503 508 504 cancel_delayed_work(&priv->scan_check); 509 505 510 - if (!priv->is_internal_short_scan) 511 - ieee80211_scan_completed(priv->hw, false); 512 - else { 506 + mutex_lock(&priv->mutex); 507 + if (priv->is_internal_short_scan) { 513 508 priv->is_internal_short_scan = false; 514 509 IWL_DEBUG_SCAN(priv, "internal short scan completed\n"); 510 + internal = true; 515 511 } 512 + mutex_unlock(&priv->mutex); 513 + 514 + /* 515 + * Do not hold mutex here since this will cause mac80211 to call 516 + * into driver again into functions that will attempt to take 517 + * mutex. 518 + */ 519 + if (!internal) 520 + ieee80211_scan_completed(priv->hw, false); 516 521 517 522 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 518 523 return;
+1 -1
drivers/net/wireless/iwlwifi/iwl-sta.c
··· 431 431 struct iwl_link_quality_cmd *link_cmd; 432 432 unsigned long flags; 433 433 434 - if (*sta_id_r) 434 + if (sta_id_r) 435 435 *sta_id_r = IWL_INVALID_STATION; 436 436 437 437 ret = iwl_add_station_common(priv, addr, 0, NULL, &sta_id);
+10 -6
drivers/net/wireless/rndis_wlan.c
··· 2572 2572 2573 2573 static void rndis_wlan_do_link_down_work(struct usbnet *usbdev) 2574 2574 { 2575 - union iwreq_data evt; 2575 + struct rndis_wlan_private *priv = get_rndis_wlan_priv(usbdev); 2576 + 2577 + if (priv->connected) { 2578 + priv->connected = false; 2579 + memset(priv->bssid, 0, ETH_ALEN); 2580 + 2581 + deauthenticate(usbdev); 2582 + 2583 + cfg80211_disconnected(usbdev->net, 0, NULL, 0, GFP_KERNEL); 2584 + } 2576 2585 2577 2586 netif_carrier_off(usbdev->net); 2578 - 2579 - evt.data.flags = 0; 2580 - evt.data.length = 0; 2581 - memset(evt.ap_addr.sa_data, 0, ETH_ALEN); 2582 - wireless_send_event(usbdev->net, SIOCGIWAP, &evt, NULL); 2583 2587 } 2584 2588 2585 2589 static void rndis_wlan_worker(struct work_struct *work)
+5 -4
drivers/net/wireless/rt2x00/rt2400pci.c
··· 926 926 static int rt2400pci_set_state(struct rt2x00_dev *rt2x00dev, 927 927 enum dev_state state) 928 928 { 929 - u32 reg; 929 + u32 reg, reg2; 930 930 unsigned int i; 931 931 char put_to_sleep; 932 932 char bbp_state; ··· 947 947 * device has entered the correct state. 948 948 */ 949 949 for (i = 0; i < REGISTER_BUSY_COUNT; i++) { 950 - rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg); 951 - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE); 952 - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE); 950 + rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2); 951 + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE); 952 + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE); 953 953 if (bbp_state == state && rf_state == state) 954 954 return 0; 955 + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg); 955 956 msleep(10); 956 957 } 957 958
+5 -4
drivers/net/wireless/rt2x00/rt2500pci.c
··· 1084 1084 static int rt2500pci_set_state(struct rt2x00_dev *rt2x00dev, 1085 1085 enum dev_state state) 1086 1086 { 1087 - u32 reg; 1087 + u32 reg, reg2; 1088 1088 unsigned int i; 1089 1089 char put_to_sleep; 1090 1090 char bbp_state; ··· 1105 1105 * device has entered the correct state. 1106 1106 */ 1107 1107 for (i = 0; i < REGISTER_BUSY_COUNT; i++) { 1108 - rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg); 1109 - bbp_state = rt2x00_get_field32(reg, PWRCSR1_BBP_CURR_STATE); 1110 - rf_state = rt2x00_get_field32(reg, PWRCSR1_RF_CURR_STATE); 1108 + rt2x00pci_register_read(rt2x00dev, PWRCSR1, &reg2); 1109 + bbp_state = rt2x00_get_field32(reg2, PWRCSR1_BBP_CURR_STATE); 1110 + rf_state = rt2x00_get_field32(reg2, PWRCSR1_RF_CURR_STATE); 1111 1111 if (bbp_state == state && rf_state == state) 1112 1112 return 0; 1113 + rt2x00pci_register_write(rt2x00dev, PWRCSR1, reg); 1113 1114 msleep(10); 1114 1115 } 1115 1116
+1 -1
drivers/net/wireless/rt2x00/rt2800usb.c
··· 413 413 */ 414 414 rt2x00_desc_read(txi, 0, &word); 415 415 rt2x00_set_field32(&word, TXINFO_W0_USB_DMA_TX_PKT_LEN, 416 - skb->len + TXWI_DESC_SIZE); 416 + skb->len - TXINFO_DESC_SIZE); 417 417 rt2x00_set_field32(&word, TXINFO_W0_WIV, 418 418 !test_bit(ENTRY_TXD_ENCRYPT_IV, &txdesc->flags)); 419 419 rt2x00_set_field32(&word, TXINFO_W0_QSEL, 2);
+1 -1
drivers/net/wireless/rt2x00/rt2x00pci.c
··· 206 206 /* 207 207 * Free irq line. 208 208 */ 209 - free_irq(to_pci_dev(rt2x00dev->dev)->irq, rt2x00dev); 209 + free_irq(rt2x00dev->irq, rt2x00dev); 210 210 211 211 /* 212 212 * Free DMA
+4 -3
drivers/net/wireless/rt2x00/rt61pci.c
··· 1689 1689 1690 1690 static int rt61pci_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state) 1691 1691 { 1692 - u32 reg; 1692 + u32 reg, reg2; 1693 1693 unsigned int i; 1694 1694 char put_to_sleep; 1695 1695 ··· 1706 1706 * device has entered the correct state. 1707 1707 */ 1708 1708 for (i = 0; i < REGISTER_BUSY_COUNT; i++) { 1709 - rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg); 1710 - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE); 1709 + rt2x00pci_register_read(rt2x00dev, MAC_CSR12, &reg2); 1710 + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE); 1711 1711 if (state == !put_to_sleep) 1712 1712 return 0; 1713 + rt2x00pci_register_write(rt2x00dev, MAC_CSR12, reg); 1713 1714 msleep(10); 1714 1715 } 1715 1716
+4 -3
drivers/net/wireless/rt2x00/rt73usb.c
··· 1366 1366 1367 1367 static int rt73usb_set_state(struct rt2x00_dev *rt2x00dev, enum dev_state state) 1368 1368 { 1369 - u32 reg; 1369 + u32 reg, reg2; 1370 1370 unsigned int i; 1371 1371 char put_to_sleep; 1372 1372 ··· 1383 1383 * device has entered the correct state. 1384 1384 */ 1385 1385 for (i = 0; i < REGISTER_BUSY_COUNT; i++) { 1386 - rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg); 1387 - state = rt2x00_get_field32(reg, MAC_CSR12_BBP_CURRENT_STATE); 1386 + rt2x00usb_register_read(rt2x00dev, MAC_CSR12, &reg2); 1387 + state = rt2x00_get_field32(reg2, MAC_CSR12_BBP_CURRENT_STATE); 1388 1388 if (state == !put_to_sleep) 1389 1389 return 0; 1390 + rt2x00usb_register_write(rt2x00dev, MAC_CSR12, reg); 1390 1391 msleep(10); 1391 1392 } 1392 1393
+2
drivers/net/wireless/wl12xx/wl1271_rx.c
··· 113 113 wl1271_debug(DEBUG_RX, "rx skb 0x%p: %d B %s", skb, skb->len, 114 114 beacon ? "beacon" : ""); 115 115 116 + skb_trim(skb, skb->len - desc->pad_len); 117 + 116 118 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status)); 117 119 ieee80211_rx_ni(wl->hw, skb); 118 120 }
+3 -1
include/net/mac80211.h
··· 815 815 * encrypted in hardware. 816 816 * @alg: The key algorithm. 817 817 * @flags: key flags, see &enum ieee80211_key_flags. 818 + * @ap_addr: AP's MAC address 818 819 * @keyidx: the key index (0-3) 819 820 * @keylen: key material length 820 821 * @key: key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) ··· 832 831 u8 iv_len; 833 832 u8 hw_key_idx; 834 833 u8 flags; 835 - u8 *ap_addr; 836 834 s8 keyidx; 837 835 u8 keylen; 838 836 u8 key[0]; ··· 1637 1637 * that TX/RX_STOP can pass NULL for this parameter. 1638 1638 * Returns a negative error code on failure. 1639 1639 * The callback must be atomic. 1640 + * 1641 + * @get_survey: Return per-channel survey information 1640 1642 * 1641 1643 * @rfkill_poll: Poll rfkill hardware state. If you need this, you also 1642 1644 * need to set wiphy->rfkill_poll to %true before registration,
-1
net/mac80211/key.c
··· 140 140 struct ieee80211_sub_if_data, 141 141 u.ap); 142 142 143 - key->conf.ap_addr = sdata->dev->dev_addr; 144 143 ret = drv_set_key(key->local, SET_KEY, sdata, sta, &key->conf); 145 144 146 145 if (!ret) {
+1 -1
net/mac80211/sta_info.h
··· 145 145 /** 146 146 * struct sta_ampdu_mlme - STA aggregation information. 147 147 * 148 - * @tid_state_rx: TID's state in Rx session state machine. 148 + * @tid_active_rx: TID's state in Rx session state machine. 149 149 * @tid_rx: aggregation info for Rx per TID 150 150 * @tid_state_tx: TID's state in Tx session state machine. 151 151 * @tid_tx: aggregation info for Tx per TID
+1 -1
net/wireless/chan.c
··· 50 50 struct ieee80211_channel *chan; 51 51 int result; 52 52 53 - if (wdev->iftype == NL80211_IFTYPE_MONITOR) 53 + if (wdev && wdev->iftype == NL80211_IFTYPE_MONITOR) 54 54 wdev = NULL; 55 55 56 56 if (wdev) {
+4 -2
net/wireless/nl80211.c
··· 4443 4443 if (channel_type != NL80211_CHAN_NO_HT && 4444 4444 channel_type != NL80211_CHAN_HT20 && 4445 4445 channel_type != NL80211_CHAN_HT40PLUS && 4446 - channel_type != NL80211_CHAN_HT40MINUS) 4446 + channel_type != NL80211_CHAN_HT40MINUS) { 4447 4447 err = -EINVAL; 4448 4448 goto out; 4449 + } 4449 4450 } 4450 4451 4451 4452 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]); ··· 4718 4717 if (channel_type != NL80211_CHAN_NO_HT && 4719 4718 channel_type != NL80211_CHAN_HT20 && 4720 4719 channel_type != NL80211_CHAN_HT40PLUS && 4721 - channel_type != NL80211_CHAN_HT40MINUS) 4720 + channel_type != NL80211_CHAN_HT40MINUS) { 4722 4721 err = -EINVAL; 4723 4722 goto out; 4723 + } 4724 4724 } 4725 4725 4726 4726 freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
+2 -2
net/wireless/scan.c
··· 515 515 516 516 privsz = wiphy->bss_priv_size; 517 517 518 - if (WARN_ON(wiphy->signal_type == NL80211_BSS_SIGNAL_UNSPEC && 518 + if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && 519 519 (signal < 0 || signal > 100))) 520 520 return NULL; 521 521 ··· 571 571 u.probe_resp.variable); 572 572 size_t privsz = wiphy->bss_priv_size; 573 573 574 - if (WARN_ON(wiphy->signal_type == NL80211_BSS_SIGNAL_UNSPEC && 574 + if (WARN_ON(wiphy->signal_type == CFG80211_SIGNAL_TYPE_UNSPEC && 575 575 (signal < 0 || signal > 100))) 576 576 return NULL; 577 577