Merge branch 'master' into for-davem
authorJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Apr 2012 18:25:14 +0000 (14:25 -0400)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 12 Apr 2012 18:41:59 +0000 (14:41 -0400)
Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c
net/wireless/nl80211.c

1  2 
MAINTAINERS
drivers/net/wireless/ipw2x00/ipw2100.h
drivers/net/wireless/iwlwifi/iwl-testmode.c
drivers/net/wireless/mac80211_hwsim.c
net/wireless/nl80211.c
net/wireless/wext-core.c

diff --cc MAINTAINERS
Simple merge
index a54e20e7b17f6f7dc7da6631ca610d6e95c12b70,d65dac88e1902ec9602bc8ccafa9b64cb89d2fa2..f31a0629c6c672bf2c3c8f5502d2ec18d7299e4a
@@@ -609,10 -605,9 +612,10 @@@ static int iwl_testmode_driver(struct i
                        inst_size = img->sec[IWL_UCODE_SECTION_INST].len;
                        data_size = img->sec[IWL_UCODE_SECTION_DATA].len;
                }
-               if (nla_put_u32(skb, IWL_TM_ATTR_FW_TYPE, priv->shrd->ucode_type) ||
 -              NLA_PUT_U32(skb, IWL_TM_ATTR_FW_TYPE, priv->cur_ucode);
 -              NLA_PUT_U32(skb, IWL_TM_ATTR_FW_INST_SIZE, inst_size);
 -              NLA_PUT_U32(skb, IWL_TM_ATTR_FW_DATA_SIZE, data_size);
++              if (nla_put_u32(skb, IWL_TM_ATTR_FW_TYPE, priv->cur_ucode) ||
 +                  nla_put_u32(skb, IWL_TM_ATTR_FW_INST_SIZE, inst_size) ||
 +                  nla_put_u32(skb, IWL_TM_ATTR_FW_DATA_SIZE, data_size))
 +                      goto nla_put_failure;
                status = cfg80211_testmode_reply(skb);
                if (status < 0)
                        IWL_ERR(priv, "Error sending msg : %d\n", status);
Simple merge
index a4aab1d362852a9c8960f9b290d0bf290b8ad4cc,5e261234d2718fbd452ada23dbab3d41d3be3ed3..ff1a6c7fbe3392d17860d866399606449b9270d4
@@@ -2535,17 -2491,18 +2543,21 @@@ static int nl80211_send_station(struct 
  
                nla_nest_end(msg, bss_param);
        }
 -      if (sinfo->filled & STATION_INFO_STA_FLAGS)
 -              NLA_PUT(msg, NL80211_STA_INFO_STA_FLAGS,
 -                      sizeof(struct nl80211_sta_flag_update),
 -                      &sinfo->sta_flags);
 -      if (sinfo->filled & STATION_INFO_T_OFFSET)
 -              NLA_PUT_U64(msg, NL80211_STA_INFO_T_OFFSET,
 -                          sinfo->t_offset);
 +      if ((sinfo->filled & STATION_INFO_STA_FLAGS) &&
 +          nla_put(msg, NL80211_STA_INFO_STA_FLAGS,
 +                  sizeof(struct nl80211_sta_flag_update),
 +                  &sinfo->sta_flags))
 +              goto nla_put_failure;
++      if ((sinfo->filled & STATION_INFO_T_OFFSET) &&
++              nla_put_u64(msg, NL80211_STA_INFO_T_OFFSET,
++                          sinfo->t_offset))
++              goto nla_put_failure;
        nla_nest_end(msg, sinfoattr);
  
 -      if (sinfo->filled & STATION_INFO_ASSOC_REQ_IES)
 -              NLA_PUT(msg, NL80211_ATTR_IE, sinfo->assoc_req_ies_len,
 -                      sinfo->assoc_req_ies);
 +      if ((sinfo->filled & STATION_INFO_ASSOC_REQ_IES) &&
 +          nla_put(msg, NL80211_ATTR_IE, sinfo->assoc_req_ies_len,
 +                  sinfo->assoc_req_ies))
 +              goto nla_put_failure;
  
        return genlmsg_end(msg, hdr);
  
@@@ -3323,48 -3279,49 +3335,50 @@@ static int nl80211_get_mesh_config(stru
        pinfoattr = nla_nest_start(msg, NL80211_ATTR_MESH_CONFIG);
        if (!pinfoattr)
                goto nla_put_failure;
 -      NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_RETRY_TIMEOUT,
 -                      cur_params.dot11MeshRetryTimeout);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_CONFIRM_TIMEOUT,
 -                      cur_params.dot11MeshConfirmTimeout);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_HOLDING_TIMEOUT,
 -                      cur_params.dot11MeshHoldingTimeout);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
 -                      cur_params.dot11MeshMaxPeerLinks);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_MAX_RETRIES,
 -                      cur_params.dot11MeshMaxRetries);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_TTL,
 -                      cur_params.dot11MeshTTL);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_ELEMENT_TTL,
 -                      cur_params.element_ttl);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
 -                      cur_params.auto_open_plinks);
 -      NLA_PUT_U32(msg, NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
 -                      cur_params.dot11MeshNbrOffsetMaxNeighbor);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
 -                      cur_params.dot11MeshHWMPmaxPREQretries);
 -      NLA_PUT_U32(msg, NL80211_MESHCONF_PATH_REFRESH_TIME,
 -                      cur_params.path_refresh_time);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
 -                      cur_params.min_discovery_timeout);
 -      NLA_PUT_U32(msg, NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
 -                      cur_params.dot11MeshHWMPactivePathTimeout);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
 -                      cur_params.dot11MeshHWMPpreqMinInterval);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
 -                      cur_params.dot11MeshHWMPperrMinInterval);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
 -                      cur_params.dot11MeshHWMPnetDiameterTraversalTime);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_HWMP_ROOTMODE,
 -                      cur_params.dot11MeshHWMPRootMode);
 -      NLA_PUT_U16(msg, NL80211_MESHCONF_HWMP_RANN_INTERVAL,
 -                      cur_params.dot11MeshHWMPRannInterval);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
 -                      cur_params.dot11MeshGateAnnouncementProtocol);
 -      NLA_PUT_U8(msg, NL80211_MESHCONF_FORWARDING,
 -                      cur_params.dot11MeshForwarding);
 -      NLA_PUT_U32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
 -                      cur_params.rssi_threshold);
 +      if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_RETRY_TIMEOUT,
 +                      cur_params.dot11MeshRetryTimeout) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_CONFIRM_TIMEOUT,
 +                      cur_params.dot11MeshConfirmTimeout) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_HOLDING_TIMEOUT,
 +                      cur_params.dot11MeshHoldingTimeout) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_MAX_PEER_LINKS,
 +                      cur_params.dot11MeshMaxPeerLinks) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_MAX_RETRIES,
 +                     cur_params.dot11MeshMaxRetries) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_TTL,
 +                     cur_params.dot11MeshTTL) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_ELEMENT_TTL,
 +                     cur_params.element_ttl) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_AUTO_OPEN_PLINKS,
 +                     cur_params.auto_open_plinks) ||
++          nla_put_u32(msg, NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
++                      cur_params.dot11MeshNbrOffsetMaxNeighbor) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_HWMP_MAX_PREQ_RETRIES,
 +                     cur_params.dot11MeshHWMPmaxPREQretries) ||
 +          nla_put_u32(msg, NL80211_MESHCONF_PATH_REFRESH_TIME,
 +                      cur_params.path_refresh_time) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_MIN_DISCOVERY_TIMEOUT,
 +                      cur_params.min_discovery_timeout) ||
 +          nla_put_u32(msg, NL80211_MESHCONF_HWMP_ACTIVE_PATH_TIMEOUT,
 +                      cur_params.dot11MeshHWMPactivePathTimeout) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_HWMP_PREQ_MIN_INTERVAL,
 +                      cur_params.dot11MeshHWMPpreqMinInterval) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
 +                      cur_params.dot11MeshHWMPperrMinInterval) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_HWMP_NET_DIAM_TRVS_TIME,
 +                      cur_params.dot11MeshHWMPnetDiameterTraversalTime) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_HWMP_ROOTMODE,
 +                     cur_params.dot11MeshHWMPRootMode) ||
 +          nla_put_u16(msg, NL80211_MESHCONF_HWMP_RANN_INTERVAL,
 +                      cur_params.dot11MeshHWMPRannInterval) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
 +                     cur_params.dot11MeshGateAnnouncementProtocol) ||
 +          nla_put_u8(msg, NL80211_MESHCONF_FORWARDING,
 +                     cur_params.dot11MeshForwarding) ||
 +          nla_put_u32(msg, NL80211_MESHCONF_RSSI_THRESHOLD,
 +                      cur_params.rssi_threshold))
 +              goto nla_put_failure;
        nla_nest_end(msg, pinfoattr);
        genlmsg_end(msg, hdr);
        return genlmsg_reply(msg, info);
@@@ -8012,6 -7927,38 +8041,39 @@@ void nl80211_pmksa_candidate_notify(str
        nlmsg_free(msg);
  }
  
 -      NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
 -      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
 -      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, type);
+ void nl80211_ch_switch_notify(struct cfg80211_registered_device *rdev,
+                             struct net_device *netdev, int freq,
+                             enum nl80211_channel_type type, gfp_t gfp)
+ {
+       struct sk_buff *msg;
+       void *hdr;
+       msg = nlmsg_new(NLMSG_GOODSIZE, gfp);
+       if (!msg)
+               return;
+       hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_CH_SWITCH_NOTIFY);
+       if (!hdr) {
+               nlmsg_free(msg);
+               return;
+       }
++      if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) ||
++          nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ, freq) ||
++          nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, type))
++              goto nla_put_failure;
+       genlmsg_end(msg, hdr);
+       genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
+                               nl80211_mlme_mcgrp.id, gfp);
+       return;
+  nla_put_failure:
+       genlmsg_cancel(msg, hdr);
+       nlmsg_free(msg);
+ }
  void
  nl80211_send_cqm_pktloss_notify(struct cfg80211_registered_device *rdev,
                                struct net_device *netdev, const u8 *peer,
Simple merge