]> Git Repo - linux.git/commitdiff
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
authorJohn W. Linville <[email protected]>
Wed, 9 Nov 2011 19:49:23 +0000 (14:49 -0500)
committerJohn W. Linville <[email protected]>
Wed, 9 Nov 2011 19:49:23 +0000 (14:49 -0500)
1  2 
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/brcm80211/brcmsmac/dma.c
include/net/mac80211.h
net/mac80211/cfg.c
net/mac80211/ieee80211_i.h
net/mac80211/work.c
net/wireless/nl80211.c

index 96b8b9914da1f080b57d4ca69915e1a2d3eff70c,b479160dc26266092f0c2ff23a8db385d8efe5de..27471f80d8b2a15838a2c8e76a33779310a9d916
@@@ -1724,6 -1724,9 +1724,9 @@@ int ath9k_hw_reset(struct ath_hw *ah, s
        if (!ath9k_hw_init_cal(ah, chan))
                return -EIO;
  
+       ath9k_hw_loadnf(ah, chan);
+       ath9k_hw_start_nfcal(ah, true);
        ENABLE_REGWRITE_BUFFER(ah);
  
        ath9k_hw_restore_chainmask(ah);
@@@ -2331,7 -2334,7 +2334,7 @@@ int ath9k_hw_fill_cap_info(struct ath_h
                        ah->enabled_cals |= TX_IQ_ON_AGC_CAL;
        }
        if (AR_SREV_9462(ah))
 -              pCap->hw_caps |= ATH9K_HW_CAP_RTT;
 +              pCap->hw_caps |= ATH9K_HW_CAP_RTT | ATH9K_HW_CAP_MCI;
  
        return 0;
  }
@@@ -2579,7 -2582,7 +2582,7 @@@ void ath9k_hw_set_txpowerlimit(struct a
        struct ath9k_channel *chan = ah->curchan;
        struct ieee80211_channel *channel = chan->chan;
  
 -      reg->power_limit = min_t(int, limit, MAX_RATE_POWER);
 +      reg->power_limit = min_t(u32, limit, MAX_RATE_POWER);
        if (test)
                channel->max_power = MAX_RATE_POWER / 2;
  
index ae541fbb4475fe0deb1cef6ebdc27d4ff15132d9,6ebec8f42846977439c07844cba9a6f7e429801c..e286fb4d48135eab824546b420be9439c232d5a9
@@@ -14,6 -14,7 +14,6 @@@
   * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
   */
  #include <linux/slab.h>
 -#include <linux/skbuff.h>
  #include <linux/delay.h>
  #include <linux/pci.h>
  
@@@ -21,7 -22,6 +21,7 @@@
  #include <aiutils.h>
  #include "types.h"
  #include "dma.h"
 +#include "soc.h"
  
  /*
   * DMA hardware requires each descriptor ring to be 8kB aligned, and fit within
@@@ -358,13 -358,14 +358,14 @@@ static uint nrxdactive(struct dma_info 
  
  static uint _dma_ctrlflags(struct dma_info *di, uint mask, uint flags)
  {
-       uint dmactrlflags = di->dma.dmactrlflags;
+       uint dmactrlflags;
  
        if (di == NULL) {
-               DMA_ERROR(("%s: _dma_ctrlflags: NULL dma handle\n", di->name));
+               DMA_ERROR(("_dma_ctrlflags: NULL dma handle\n"));
                return 0;
        }
  
+       dmactrlflags = di->dma.dmactrlflags;
        dmactrlflags &= ~mask;
        dmactrlflags |= flags;
  
@@@ -900,7 -901,7 +901,7 @@@ static struct sk_buff *_dma_getnextrxp(
  
  /*
   * !! rx entry routine
 - * returns a pointer to the next frame received, or NULL if there are no more
 + * returns the number packages in the next frame, or 0 if there are no more
   *   if DMA_CTRL_RXMULTI is defined, DMA scattering(multiple buffers) is
   *   supported with pkts chain
   *   otherwise, it's treated as giant pkt and will be tossed.
   *   buffer data. After it reaches the max size of buffer, the data continues
   *   in next DMA descriptor buffer WITHOUT DMA header
   */
 -struct sk_buff *dma_rx(struct dma_pub *pub)
 +int dma_rx(struct dma_pub *pub, struct sk_buff_head *skb_list)
  {
        struct dma_info *di = (struct dma_info *)pub;
 -      struct sk_buff *p, *head, *tail;
 +      struct sk_buff_head dma_frames;
 +      struct sk_buff *p, *next;
        uint len;
        uint pkt_len;
        int resid = 0;
 +      int pktcnt = 1;
  
 +      skb_queue_head_init(&dma_frames);
   next_frame:
 -      head = _dma_getnextrxp(di, false);
 -      if (head == NULL)
 -              return NULL;
 +      p = _dma_getnextrxp(di, false);
 +      if (p == NULL)
 +              return 0;
  
 -      len = le16_to_cpu(*(__le16 *) (head->data));
 +      len = le16_to_cpu(*(__le16 *) (p->data));
        DMA_TRACE(("%s: dma_rx len %d\n", di->name, len));
 -      dma_spin_for_len(len, head);
 +      dma_spin_for_len(len, p);
  
        /* set actual length */
        pkt_len = min((di->rxoffset + len), di->rxbufsize);
 -      __skb_trim(head, pkt_len);
 +      __skb_trim(p, pkt_len);
 +      skb_queue_tail(&dma_frames, p);
        resid = len - (di->rxbufsize - di->rxoffset);
  
        /* check for single or multi-buffer rx */
        if (resid > 0) {
 -              tail = head;
                while ((resid > 0) && (p = _dma_getnextrxp(di, false))) {
 -                      tail->next = p;
                        pkt_len = min_t(uint, resid, di->rxbufsize);
                        __skb_trim(p, pkt_len);
 -
 -                      tail = p;
 +                      skb_queue_tail(&dma_frames, p);
                        resid -= di->rxbufsize;
 +                      pktcnt++;
                }
  
  #ifdef BCMDBG
                if ((di->dma.dmactrlflags & DMA_CTRL_RXMULTI) == 0) {
                        DMA_ERROR(("%s: dma_rx: bad frame length (%d)\n",
                                   di->name, len));
 -                      brcmu_pkt_buf_free_skb(head);
 +                      skb_queue_walk_safe(&dma_frames, p, next) {
 +                              skb_unlink(p, &dma_frames);
 +                              brcmu_pkt_buf_free_skb(p);
 +                      }
                        di->dma.rxgiants++;
 +                      pktcnt = 1;
                        goto next_frame;
                }
        }
  
 -      return head;
 +      skb_queue_splice_tail(&dma_frames, skb_list);
 +      return pktcnt;
  }
  
  static bool dma64_rxidle(struct dma_info *di)
diff --combined include/net/mac80211.h
index f4e0ab49db202c5144e53953bca14850ef8e51a1,72eddd1b410b9c8418216c17d74910585fdec975..eddf49202c50f6eb1956ed78f2256185b801bc60
@@@ -901,10 -901,6 +901,10 @@@ static inline bool ieee80211_vif_is_mes
   * @IEEE80211_KEY_FLAG_SW_MGMT: This flag should be set by the driver for a
   *    CCMP key if it requires CCMP encryption of management frames (MFP) to
   *    be done in software.
 + * @IEEE80211_KEY_FLAG_PUT_IV_SPACE: This flag should be set by the driver
 + *    for a CCMP key if space should be prepared for the IV, but the IV
 + *    itself should not be generated. Do not set together with
 + *    @IEEE80211_KEY_FLAG_GENERATE_IV on the same key.
   */
  enum ieee80211_key_flags {
        IEEE80211_KEY_FLAG_WMM_STA      = 1<<0,
        IEEE80211_KEY_FLAG_GENERATE_MMIC= 1<<2,
        IEEE80211_KEY_FLAG_PAIRWISE     = 1<<3,
        IEEE80211_KEY_FLAG_SW_MGMT      = 1<<4,
 +      IEEE80211_KEY_FLAG_PUT_IV_SPACE = 1<<5,
  };
  
  /**
@@@ -3572,8 -3567,9 +3572,9 @@@ rate_lowest_index(struct ieee80211_supp
                        return i;
  
        /* warn when we cannot find a rate. */
-       WARN_ON(1);
+       WARN_ON_ONCE(1);
  
+       /* and return 0 (the lowest index) */
        return 0;
  }
  
diff --combined net/mac80211/cfg.c
index 000a8ba987cdbd104a02f84e3c04088c57f33650,d06c65fa5526a88739a647b809067f37fd64fc24..65b72ae2b4e0cc8df20213a11be3e439383e403d
@@@ -832,6 -832,12 +832,12 @@@ static int ieee80211_add_station(struc
        if (is_multicast_ether_addr(mac))
                return -EINVAL;
  
+       /* Only TDLS-supporting stations can add TDLS peers */
+       if ((params->sta_flags_set & BIT(NL80211_STA_FLAG_TDLS_PEER)) &&
+           !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
+             sdata->vif.type == NL80211_IFTYPE_STATION))
+               return -ENOTSUPP;
        sta = sta_info_alloc(sdata, mac, GFP_KERNEL);
        if (!sta)
                return -ENOMEM;
  
        sta_apply_parameters(local, sta, params);
  
-       /* Only TDLS-supporting stations can add TDLS peers */
-       if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) &&
-           !((wiphy->flags & WIPHY_FLAG_SUPPORTS_TDLS) &&
-             sdata->vif.type == NL80211_IFTYPE_STATION))
-               return -ENOTSUPP;
        rate_control_rate_init(sta);
  
        layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
@@@ -1394,7 -1394,7 +1394,7 @@@ static int ieee80211_set_channel(struc
            (old_oper_type != local->_oper_channel_type))
                ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
  
 -      if ((sdata && sdata->vif.type != NL80211_IFTYPE_MONITOR) &&
 +      if (sdata && sdata->vif.type != NL80211_IFTYPE_MONITOR &&
            old_vif_oper_type != sdata->vif.bss_conf.channel_type)
                ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_HT);
  
index 30fc9e7c5c532ff627d02df526e4cd08965838ff,ea10a51babda9fa113c84ee000d46c62b86e69c6..e2447096c94a9617b447a5c3fb7a268c37aac68d
@@@ -389,6 -389,7 +389,7 @@@ struct ieee80211_if_managed 
  
        unsigned long timers_running; /* used for quiesce/restart */
        bool powersave; /* powersave requested for this iface */
+       bool broken_ap; /* AP is broken -- turn off powersave */
        enum ieee80211_smps_mode req_smps, /* requested smps mode */
                                 ap_smps, /* smps mode AP thinks we're in */
                                 driver_smps_mode; /* smps mode request */
@@@ -1333,12 -1334,6 +1334,12 @@@ void ieee80211_recalc_smps(struct ieee8
  size_t ieee80211_ie_split(const u8 *ies, size_t ielen,
                          const u8 *ids, int n_ids, size_t offset);
  size_t ieee80211_ie_split_vendor(const u8 *ies, size_t ielen, size_t offset);
 +u8 *ieee80211_ie_build_ht_cap(u8 *pos, struct ieee80211_supported_band *sband,
 +                            u16 cap);
 +u8 *ieee80211_ie_build_ht_info(u8 *pos,
 +                              struct ieee80211_sta_ht_cap *ht_cap,
 +                              struct ieee80211_channel *channel,
 +                              enum nl80211_channel_type channel_type);
  
  /* internal work items */
  void ieee80211_work_init(struct ieee80211_local *local);
@@@ -1367,8 -1362,6 +1368,8 @@@ ieee80211_get_channel_mode(struct ieee8
  bool ieee80211_set_channel_type(struct ieee80211_local *local,
                                struct ieee80211_sub_if_data *sdata,
                                enum nl80211_channel_type chantype);
 +enum nl80211_channel_type
 +ieee80211_ht_info_to_channel_type(struct ieee80211_ht_info *ht_info);
  
  #ifdef CONFIG_MAC80211_NOINLINE
  #define debug_noinline noinline
diff --combined net/mac80211/work.c
index fab5092e3788afa2f50b3d13266af9fbb46d61a9,6c53b6d1002b5a2046837fe2ec60d7687bd0c973..30da4e3f19f7febbb9cb049769171bffa9c3393d
@@@ -103,6 -103,7 +103,6 @@@ static void ieee80211_add_ht_ie(struct 
        u8 *pos;
        u32 flags = channel->flags;
        u16 cap = sband->ht_cap.cap;
 -      __le16 tmp;
  
        if (!sband->ht_cap.ht_supported)
                return;
        }
  
        /* reserve and fill IE */
 -
        pos = skb_put(skb, sizeof(struct ieee80211_ht_cap) + 2);
 -      *pos++ = WLAN_EID_HT_CAPABILITY;
 -      *pos++ = sizeof(struct ieee80211_ht_cap);
 -      memset(pos, 0, sizeof(struct ieee80211_ht_cap));
 -
 -      /* capability flags */
 -      tmp = cpu_to_le16(cap);
 -      memcpy(pos, &tmp, sizeof(u16));
 -      pos += sizeof(u16);
 -
 -      /* AMPDU parameters */
 -      *pos++ = sband->ht_cap.ampdu_factor |
 -               (sband->ht_cap.ampdu_density <<
 -                      IEEE80211_HT_AMPDU_PARM_DENSITY_SHIFT);
 -
 -      /* MCS set */
 -      memcpy(pos, &sband->ht_cap.mcs, sizeof(sband->ht_cap.mcs));
 -      pos += sizeof(sband->ht_cap.mcs);
 -
 -      /* extended capabilities */
 -      pos += sizeof(__le16);
 -
 -      /* BF capabilities */
 -      pos += sizeof(__le32);
 -
 -      /* antenna selection */
 -      pos += sizeof(u8);
 +      ieee80211_ie_build_ht_cap(pos, sband, cap);
  }
  
  static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata,
@@@ -1057,14 -1084,13 +1057,13 @@@ static void ieee80211_work_work(struct 
                        continue;
                if (wk->chan != local->tmp_channel)
                        continue;
-               if (ieee80211_work_ct_coexists(wk->chan_type,
-                                              local->tmp_channel_type))
+               if (!ieee80211_work_ct_coexists(wk->chan_type,
+                                               local->tmp_channel_type))
                        continue;
                remain_off_channel = true;
        }
  
        if (!remain_off_channel && local->tmp_channel) {
-               bool on_oper_chan = ieee80211_cfg_on_oper_channel(local);
                local->tmp_channel = NULL;
                /* If tmp_channel wasn't operating channel, then
                 * we need to go back on-channel.
                 * we still need to do a hardware config.  Currently,
                 * we cannot be here while scanning, however.
                 */
-               if (ieee80211_cfg_on_oper_channel(local) && !on_oper_chan)
+               if (!ieee80211_cfg_on_oper_channel(local))
                        ieee80211_hw_config(local, 0);
  
                /* At the least, we need to disable offchannel_ps,
diff --combined net/wireless/nl80211.c
index 337be50aef3bbe0384d8cf9a3dd9313ea95fcf3f,b3a476fe82725f738f5215b32cdf2296970451d2..e97827ba8a581f97609577b1f3d4da741aec1f3f
@@@ -132,8 -132,7 +132,7 @@@ static const struct nla_policy nl80211_
        [NL80211_ATTR_MESH_CONFIG] = { .type = NLA_NESTED },
        [NL80211_ATTR_SUPPORT_MESH_AUTH] = { .type = NLA_FLAG },
  
-       [NL80211_ATTR_HT_CAPABILITY] = { .type = NLA_BINARY,
-                                        .len = NL80211_HT_CAPABILITY_LEN },
+       [NL80211_ATTR_HT_CAPABILITY] = { .len = NL80211_HT_CAPABILITY_LEN },
  
        [NL80211_ATTR_MGMT_SUBTYPE] = { .type = NLA_U8 },
        [NL80211_ATTR_IE] = { .type = NLA_BINARY,
@@@ -1253,6 -1252,12 +1252,12 @@@ static int nl80211_set_wiphy(struct sk_
                        goto bad_res;
                }
  
+               if (netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
+                   netdev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO) {
+                       result = -EINVAL;
+                       goto bad_res;
+               }
                nla_for_each_nested(nl_txq_params,
                                    info->attrs[NL80211_ATTR_WIPHY_TXQ_PARAMS],
                                    rem_txq_params) {
@@@ -6634,7 -6639,10 +6639,7 @@@ void nl80211_send_reg_change_event(stru
        if (wiphy_idx_valid(request->wiphy_idx))
                NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, request->wiphy_idx);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        rcu_read_lock();
        genlmsg_multicast_allns(msg, 0, nl80211_regulatory_mcgrp.id,
@@@ -6670,7 -6678,10 +6675,7 @@@ static void nl80211_send_mlme_event(str
        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
        NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6751,7 -6762,10 +6756,7 @@@ static void nl80211_send_mlme_timeout(s
        NLA_PUT_FLAG(msg, NL80211_ATTR_TIMED_OUT);
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6807,7 -6821,10 +6812,7 @@@ void nl80211_send_connect_result(struc
        if (resp_ie)
                NLA_PUT(msg, NL80211_ATTR_RESP_IE, resp_ie_len, resp_ie);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6845,7 -6862,10 +6850,7 @@@ void nl80211_send_roamed(struct cfg8021
        if (resp_ie)
                NLA_PUT(msg, NL80211_ATTR_RESP_IE, resp_ie_len, resp_ie);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6883,7 -6903,10 +6888,7 @@@ void nl80211_send_disconnected(struct c
        if (ie)
                NLA_PUT(msg, NL80211_ATTR_IE, ie_len, ie);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, GFP_KERNEL);
@@@ -6916,7 -6939,10 +6921,7 @@@ void nl80211_send_ibss_bssid(struct cfg
        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6951,7 -6977,10 +6956,7 @@@ void nl80211_send_new_peer_candidate(st
        if (ie_len && ie)
                NLA_PUT(msg, NL80211_ATTR_IE, ie_len , ie);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -6990,7 -7019,10 +6995,7 @@@ void nl80211_michael_mic_failure(struc
        if (tsc)
                NLA_PUT(msg, NL80211_ATTR_KEY_SEQ, 6, tsc);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7041,7 -7073,10 +7046,7 @@@ void nl80211_send_beacon_hint_event(str
                goto nla_put_failure;
        nla_nest_end(msg, nl_freq);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        rcu_read_lock();
        genlmsg_multicast_allns(msg, 0, nl80211_regulatory_mcgrp.id,
@@@ -7084,7 -7119,10 +7089,7 @@@ static void nl80211_send_remain_on_chan
        if (cmd == NL80211_CMD_REMAIN_ON_CHANNEL)
                NLA_PUT_U32(msg, NL80211_ATTR_DURATION, duration);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7155,7 -7193,10 +7160,7 @@@ void nl80211_send_sta_del_event(struct 
        NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex);
        NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7172,6 -7213,7 +7177,6 @@@ int nl80211_send_mgmt(struct cfg80211_r
  {
        struct sk_buff *msg;
        void *hdr;
 -      int err;
  
        msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
        if (!msg)
        NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
        NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
  
 -      err = genlmsg_end(msg, hdr);
 -      if (err < 0) {
 -              nlmsg_free(msg);
 -              return err;
 -      }
 +      genlmsg_end(msg, hdr);
  
 -      err = genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlpid);
 -      if (err < 0)
 -              return err;
 -      return 0;
 +      return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlpid);
  
   nla_put_failure:
        genlmsg_cancel(msg, hdr);
@@@ -7223,7 -7272,10 +7228,7 @@@ void nl80211_send_mgmt_tx_status(struc
        if (ack)
                NLA_PUT_FLAG(msg, NL80211_ATTR_ACK);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
        return;
@@@ -7265,7 -7317,10 +7270,7 @@@ nl80211_send_cqm_rssi_notify(struct cfg
  
        nla_nest_end(msg, pinfoattr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7307,7 -7362,10 +7312,7 @@@ void nl80211_gtk_rekey_notify(struct cf
  
        nla_nest_end(msg, rekey_attr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7350,7 -7408,10 +7355,7 @@@ void nl80211_pmksa_candidate_notify(str
  
        nla_nest_end(msg, attr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
@@@ -7392,7 -7453,10 +7397,7 @@@ nl80211_send_cqm_pktloss_notify(struct 
  
        nla_nest_end(msg, pinfoattr);
  
 -      if (genlmsg_end(msg, hdr) < 0) {
 -              nlmsg_free(msg);
 -              return;
 -      }
 +      genlmsg_end(msg, hdr);
  
        genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
                                nl80211_mlme_mcgrp.id, gfp);
This page took 0.122438 seconds and 4 git commands to generate.