compat-drivers: fix netlink portid patch for nl80211
authorJohannes Berg <johannes.berg@intel.com>
Thu, 7 Mar 2013 20:16:10 +0000 (12:16 -0800)
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>
Thu, 7 Mar 2013 20:16:10 +0000 (12:16 -0800)
This required a manual fix for one hunk on nl80211.c

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
patches/collateral-evolutions/network/0005-netlink-portid.patch

index e5a1ec18f5bc0ea3288bc9b86c3a4e19da2cfcd3..85efcd8d0c68d6e7c995d1cfee0e8750e66a3091 100644 (file)
@@ -66,16 +66,16 @@ this one should other drivers / subsystem need this change.
                wmediumd_portid = 0;
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -1338,7 +1338,7 @@ static int nl80211_dump_wiphy(struct sk_
+@@ -1317,7 +1317,7 @@ static int nl80211_dump_wiphy(struct sk_
                        continue;
                if (++idx <= start)
                        continue;
--              if (nl80211_send_wiphy(skb, NETLINK_CB(cb->skb).portid,
-+              if (nl80211_send_wiphy(skb, NETLINK_CB_PORTID(skb),
-                                      cb->nlh->nlmsg_seq, NLM_F_MULTI,
-                                      dev) < 0) {
-                       idx--;
-@@ -1361,7 +1361,7 @@ static int nl80211_get_wiphy(struct sk_b
+-              ret = nl80211_send_wiphy(skb, NETLINK_CB(cb->skb).portid,
++              ret = nl80211_send_wiphy(skb, NETLINK_CB_PORTID(skb),
+                                        cb->nlh->nlmsg_seq, NLM_F_MULTI,
+                                        dev);
+               if (ret < 0) {
+@@ -1360,7 +1360,7 @@ static int nl80211_get_wiphy(struct sk_b
        if (!msg)
                return -ENOMEM;
  
@@ -84,7 +84,7 @@ this one should other drivers / subsystem need this change.
                nlmsg_free(msg);
                return -ENOBUFS;
        }
-@@ -1940,7 +1940,7 @@ static int nl80211_dump_interface(struct
+@@ -1939,7 +1939,7 @@ static int nl80211_dump_interface(struct
                                if_idx++;
                                continue;
                        }
@@ -93,7 +93,7 @@ this one should other drivers / subsystem need this change.
                                               cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                               rdev, wdev) < 0) {
                                mutex_unlock(&rdev->devlist_mtx);
-@@ -1971,7 +1971,7 @@ static int nl80211_get_interface(struct
+@@ -1970,7 +1970,7 @@ static int nl80211_get_interface(struct
        if (!msg)
                return -ENOMEM;
  
@@ -102,7 +102,7 @@ this one should other drivers / subsystem need this change.
                               dev, wdev) < 0) {
                nlmsg_free(msg);
                return -ENOBUFS;
-@@ -2196,7 +2196,7 @@ static int nl80211_new_interface(struct
+@@ -2195,7 +2195,7 @@ static int nl80211_new_interface(struct
                break;
        }
  
@@ -111,7 +111,7 @@ this one should other drivers / subsystem need this change.
                               rdev, wdev) < 0) {
                nlmsg_free(msg);
                return -ENOBUFS;
-@@ -2331,7 +2331,7 @@ static int nl80211_get_key(struct sk_buf
+@@ -2330,7 +2330,7 @@ static int nl80211_get_key(struct sk_buf
        if (!msg)
                return -ENOMEM;
  
@@ -120,7 +120,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_NEW_KEY);
        if (IS_ERR(hdr))
                return PTR_ERR(hdr);
-@@ -3266,7 +3266,7 @@ static int nl80211_dump_station(struct s
+@@ -3265,7 +3265,7 @@ static int nl80211_dump_station(struct s
                        goto out_err;
  
                if (nl80211_send_station(skb,
@@ -129,7 +129,7 @@ this one should other drivers / subsystem need this change.
                                cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                dev, netdev, mac_addr,
                                &sinfo) < 0)
-@@ -3312,7 +3312,7 @@ static int nl80211_get_station(struct sk
+@@ -3311,7 +3311,7 @@ static int nl80211_get_station(struct sk
        if (!msg)
                return -ENOMEM;
  
@@ -138,7 +138,7 @@ this one should other drivers / subsystem need this change.
                                 rdev, dev, mac_addr, &sinfo) < 0) {
                nlmsg_free(msg);
                return -ENOBUFS;
-@@ -3858,7 +3858,7 @@ static int nl80211_dump_mpath(struct sk_
+@@ -3857,7 +3857,7 @@ static int nl80211_dump_mpath(struct sk_
                if (err)
                        goto out_err;
  
@@ -147,7 +147,7 @@ this one should other drivers / subsystem need this change.
                                       cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                       netdev, dst, next_hop,
                                       &pinfo) < 0)
-@@ -3907,7 +3907,7 @@ static int nl80211_get_mpath(struct sk_b
+@@ -3906,7 +3906,7 @@ static int nl80211_get_mpath(struct sk_b
        if (!msg)
                return -ENOMEM;
  
@@ -156,7 +156,7 @@ this one should other drivers / subsystem need this change.
                                 dev, dst, next_hop, &pinfo) < 0) {
                nlmsg_free(msg);
                return -ENOBUFS;
-@@ -4171,7 +4171,7 @@ static int nl80211_get_mesh_config(struc
+@@ -4170,7 +4170,7 @@ static int nl80211_get_mesh_config(struc
        msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
        if (!msg)
                return -ENOMEM;
@@ -165,7 +165,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_GET_MESH_CONFIG);
        if (!hdr)
                goto out;
-@@ -4513,7 +4513,7 @@ static int nl80211_get_reg(struct sk_buf
+@@ -4512,7 +4512,7 @@ static int nl80211_get_reg(struct sk_buf
                goto out;
        }
  
@@ -174,7 +174,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_GET_REG);
        if (!hdr)
                goto put_failure;
-@@ -5200,7 +5200,7 @@ static int nl80211_send_bss(struct sk_bu
+@@ -5199,7 +5199,7 @@ static int nl80211_send_bss(struct sk_bu
  
        ASSERT_WDEV_LOCK(wdev);
  
@@ -183,7 +183,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_NEW_SCAN_RESULTS);
        if (!hdr)
                return -1;
-@@ -5431,7 +5431,7 @@ static int nl80211_dump_survey(struct sk
+@@ -5430,7 +5430,7 @@ static int nl80211_dump_survey(struct sk
                }
  
                if (nl80211_send_survey(skb,
@@ -192,7 +192,7 @@ this one should other drivers / subsystem need this change.
                                cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                netdev,
                                &survey) < 0)
-@@ -6077,7 +6077,7 @@ static int nl80211_testmode_dump(struct
+@@ -6076,7 +6076,7 @@ static int nl80211_testmode_dump(struct
        }
  
        while (1) {
@@ -201,7 +201,7 @@ this one should other drivers / subsystem need this change.
                                           cb->nlh->nlmsg_seq, NLM_F_MULTI,
                                           NL80211_CMD_TESTMODE);
                struct nlattr *tmdata;
-@@ -6156,7 +6156,7 @@ struct sk_buff *cfg80211_testmode_alloc_
+@@ -6155,7 +6155,7 @@ struct sk_buff *cfg80211_testmode_alloc_
                return NULL;
  
        return __cfg80211_testmode_alloc_skb(rdev, approxlen,
@@ -210,7 +210,7 @@ this one should other drivers / subsystem need this change.
                                rdev->testmode_info->snd_seq,
                                GFP_KERNEL);
  }
-@@ -6498,7 +6498,7 @@ static int nl80211_remain_on_channel(str
+@@ -6497,7 +6497,7 @@ static int nl80211_remain_on_channel(str
        if (!msg)
                return -ENOMEM;
  
@@ -219,7 +219,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_REMAIN_ON_CHANNEL);
  
        if (IS_ERR(hdr)) {
-@@ -6717,7 +6717,7 @@ static int nl80211_register_mgmt(struct
+@@ -6716,7 +6716,7 @@ static int nl80211_register_mgmt(struct
        if (!rdev->ops->mgmt_tx)
                return -EOPNOTSUPP;
  
@@ -228,7 +228,7 @@ this one should other drivers / subsystem need this change.
                        nla_data(info->attrs[NL80211_ATTR_FRAME_MATCH]),
                        nla_len(info->attrs[NL80211_ATTR_FRAME_MATCH]));
  }
-@@ -6787,7 +6787,7 @@ static int nl80211_tx_mgmt(struct sk_buf
+@@ -6786,7 +6786,7 @@ static int nl80211_tx_mgmt(struct sk_buf
                if (!msg)
                        return -ENOMEM;
  
@@ -237,7 +237,7 @@ this one should other drivers / subsystem need this change.
                                     NL80211_CMD_FRAME);
  
                if (IS_ERR(hdr)) {
-@@ -6902,7 +6902,7 @@ static int nl80211_get_power_save(struct
+@@ -6901,7 +6901,7 @@ static int nl80211_get_power_save(struct
        if (!msg)
                return -ENOMEM;
  
@@ -246,7 +246,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_GET_POWER_SAVE);
        if (!hdr) {
                err = -ENOBUFS;
-@@ -7191,7 +7191,7 @@ static int nl80211_get_wowlan(struct sk_
+@@ -7190,7 +7190,7 @@ static int nl80211_get_wowlan(struct sk_
        if (!msg)
                return -ENOMEM;
  
@@ -255,7 +255,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_GET_WOWLAN);
        if (!hdr)
                goto nla_put_failure;
-@@ -7614,7 +7614,7 @@ static int nl80211_register_unexpected_f
+@@ -7613,7 +7613,7 @@ static int nl80211_register_unexpected_f
        if (wdev->ap_unexpected_nlportid)
                return -EBUSY;
  
@@ -264,7 +264,7 @@ this one should other drivers / subsystem need this change.
        return 0;
  }
  
-@@ -7644,7 +7644,7 @@ static int nl80211_probe_client(struct s
+@@ -7643,7 +7643,7 @@ static int nl80211_probe_client(struct s
        if (!msg)
                return -ENOMEM;
  
@@ -273,7 +273,7 @@ this one should other drivers / subsystem need this change.
                             NL80211_CMD_PROBE_CLIENT);
  
        if (IS_ERR(hdr)) {
-@@ -7688,13 +7688,13 @@ static int nl80211_register_beacons(stru
+@@ -7687,13 +7687,13 @@ static int nl80211_register_beacons(stru
        /* First, check if already registered. */
        spin_lock_bh(&rdev->beacon_registrations_lock);
        list_for_each_entry(reg, &rdev->beacon_registrations, list) {
@@ -289,7 +289,7 @@ this one should other drivers / subsystem need this change.
        list_add(&nreg->list, &rdev->beacon_registrations);
  
        spin_unlock_bh(&rdev->beacon_registrations_lock);
-@@ -9997,12 +9997,12 @@ static int nl80211_netlink_notify(struct
+@@ -9996,12 +9996,12 @@ static int nl80211_netlink_notify(struct
  
        list_for_each_entry_rcu(rdev, &cfg80211_rdev_list, list) {
                list_for_each_entry_rcu(wdev, &rdev->wdev_list, list)