]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'wireless-next/master'
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 17 Apr 2012 01:53:28 +0000 (11:53 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 17 Apr 2012 01:53:35 +0000 (11:53 +1000)
Conflicts:
drivers/net/wireless/iwlwifi/iwl-testmode.c
include/net/nfc/nfc.h

13 files changed:
1  2 
MAINTAINERS
drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ipw2x00/ipw2100.c
drivers/net/wireless/ipw2x00/ipw2200.c
drivers/net/wireless/iwlwifi/iwl-testmode.c
drivers/net/wireless/mac80211_hwsim.c
drivers/net/wireless/ti/wlcore/testmode.c
include/net/nfc/nfc.h
net/nfc/core.c
net/nfc/netlink.c
net/nfc/nfc.h
net/wireless/nl80211.c
net/wireless/util.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index f31a0629c6c672bf2c3c8f5502d2ec18d7299e4a,c8e89cac7ea32a06e574cc118418accef16dbf0f..bb275098bb108869085b414dccf9b06e9dc96b49
@@@ -543,12 -539,11 +543,12 @@@ static int iwl_testmode_driver(struct i
                                IWL_ERR(priv, "Memory allocation fail\n");
                                return -ENOMEM;
                        }
 -                      NLA_PUT_U32(skb, IWL_TM_ATTR_COMMAND,
 -                              IWL_TM_CMD_DEV2APP_EEPROM_RSP);
 -                      NLA_PUT(skb, IWL_TM_ATTR_EEPROM,
 -                              cfg(priv)->base_params->eeprom_size,
 -                              priv->eeprom);
 +                      if (nla_put_u32(skb, IWL_TM_ATTR_COMMAND,
 +                                      IWL_TM_CMD_DEV2APP_EEPROM_RSP) ||
 +                          nla_put(skb, IWL_TM_ATTR_EEPROM,
 +                                  cfg(priv)->base_params->eeprom_size,
-                                   priv->shrd->eeprom))
++                                  priv->eeprom))
 +                              goto nla_put_failure;
                        status = cfg80211_testmode_reply(skb);
                        if (status < 0)
                                IWL_ERR(priv, "Error sending msg : %d\n",
Simple merge
index 79955a238ccc14f87ae6ce56e873e3e6b86fa1a5,313d00fac2762dbc9ca9815760d26c9842dd3da6..9a2505a5b8de7687aa266f6f631b0b4a7396021e
@@@ -86,7 -90,8 +90,8 @@@ struct nfc_genl_data 
  };
  
  struct nfc_dev {
 -      unsigned idx;
 +      unsigned int idx;
+       u32 target_next_idx;
        struct nfc_target *targets;
        int n_targets;
        int targets_generation;
diff --cc net/nfc/core.c
Simple merge
index 8937664674fae623f4ec8e27fad62e5d2e8c9ec4,ebdb605f8dbd16f40e8028309340d46d18e75bee..af14d6ae2b13a5dee0b70a02baea4cb6423b73b3
@@@ -188,6 -183,36 +188,38 @@@ free_msg
        return -EMSGSIZE;
  }
  
 -      NLA_PUT_STRING(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev));
 -      NLA_PUT_U32(msg, NFC_ATTR_TARGET_INDEX, target_idx);
+ int nfc_genl_target_lost(struct nfc_dev *dev, u32 target_idx)
+ {
+       struct sk_buff *msg;
+       void *hdr;
+       msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL);
+       if (!msg)
+               return -ENOMEM;
+       hdr = genlmsg_put(msg, 0, 0, &nfc_genl_family, 0,
+                         NFC_EVENT_TARGET_LOST);
+       if (!hdr)
+               goto free_msg;
++      if (nla_put_string(msg, NFC_ATTR_DEVICE_NAME, nfc_device_name(dev)))
++              goto nla_put_failure;
++      if (nla_put_u32(msg, NFC_ATTR_TARGET_INDEX, target_idx))
++              goto nla_put_failure;
+       genlmsg_end(msg, hdr);
+       genlmsg_multicast(msg, 0, nfc_genl_event_mcgrp.id, GFP_KERNEL);
+       return 0;
+ nla_put_failure:
+       genlmsg_cancel(msg, hdr);
+ free_msg:
+       nlmsg_free(msg);
+       return -EMSGSIZE;
+ }
  int nfc_genl_device_added(struct nfc_dev *dev)
  {
        struct sk_buff *msg;
diff --cc net/nfc/nfc.h
Simple merge
index ff1a6c7fbe3392d17860d866399606449b9270d4,bcf6f70e518db6654349fcaf852fb33720c76179..acae9d4d9ba343bf63e8e7c97978f09a932911e2
@@@ -1530,16 -1492,28 +1530,30 @@@ static int nl80211_send_iface(struct sk
        if (!hdr)
                return -1;
  
 -      NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex);
 -      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
 -      NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
 -      NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
 -
 -      NLA_PUT_U32(msg, NL80211_ATTR_GENERATION,
 -                  rdev->devlist_generation ^
 -                      (cfg80211_rdev_list_generation << 2));
 +      if (nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
 +          nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
 +          nla_put_string(msg, NL80211_ATTR_IFNAME, dev->name) ||
 +          nla_put_u32(msg, NL80211_ATTR_IFTYPE,
 +                      dev->ieee80211_ptr->iftype) ||
 +          nla_put_u32(msg, NL80211_ATTR_GENERATION,
 +                      rdev->devlist_generation ^
 +                      (cfg80211_rdev_list_generation << 2)))
 +              goto nla_put_failure;
  
 -                      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ,
 -                                  chan->center_freq);
 -                      NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
 -                                  channel_type);
+       if (rdev->ops->get_channel) {
+               struct ieee80211_channel *chan;
+               enum nl80211_channel_type channel_type;
+               chan = rdev->ops->get_channel(&rdev->wiphy, &channel_type);
+               if (chan) {
++                      if (nla_put_u32(msg, NL80211_ATTR_WIPHY_FREQ,
++                                      chan->center_freq) ||
++                          nla_put_u32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE,
++                                      channel_type))
++                              goto nla_put_failure;
+               }
+       }
        return genlmsg_end(msg, hdr);
  
   nla_put_failure:
Simple merge