Commit c6479d62 authored by David S. Miller's avatar David S. Miller

Merge tag 'mac80211-for-davem-2017-12-19' of...

Merge tag 'mac80211-for-davem-2017-12-19' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211

Johannes Berg says:

====================
A few more fixes:
 * hwsim:
   - set To-DS bit in some frames missing it
   - fix sleeping in atomic
 * nl80211:
   - doc cleanup
   - fix locking in an error path
 * build:
   - don't append to created certs C files
   - ship certificate pre-hexdumped
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ab144360 04a7279f
...@@ -684,6 +684,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac, ...@@ -684,6 +684,7 @@ static void hwsim_send_nullfunc(struct mac80211_hwsim_data *data, u8 *mac,
hdr = skb_put(skb, sizeof(*hdr) - ETH_ALEN); hdr = skb_put(skb, sizeof(*hdr) - ETH_ALEN);
hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA | hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_DATA |
IEEE80211_STYPE_NULLFUNC | IEEE80211_STYPE_NULLFUNC |
IEEE80211_FCTL_TODS |
(ps ? IEEE80211_FCTL_PM : 0)); (ps ? IEEE80211_FCTL_PM : 0));
hdr->duration_id = cpu_to_le16(0); hdr->duration_id = cpu_to_le16(0);
memcpy(hdr->addr1, vp->bssid, ETH_ALEN); memcpy(hdr->addr1, vp->bssid, ETH_ALEN);
...@@ -3215,7 +3216,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info) ...@@ -3215,7 +3216,7 @@ static int hwsim_get_radio_nl(struct sk_buff *msg, struct genl_info *info)
if (!net_eq(wiphy_net(data->hw->wiphy), genl_info_net(info))) if (!net_eq(wiphy_net(data->hw->wiphy), genl_info_net(info)))
continue; continue;
skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL); skb = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_ATOMIC);
if (!skb) { if (!skb) {
res = -ENOMEM; res = -ENOMEM;
goto out_err; goto out_err;
......
...@@ -3226,7 +3226,6 @@ struct cfg80211_ops { ...@@ -3226,7 +3226,6 @@ struct cfg80211_ops {
* @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN. * @WIPHY_FLAG_IBSS_RSN: The device supports IBSS RSN.
* @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing * @WIPHY_FLAG_MESH_AUTH: The device supports mesh authentication by routing
* auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH. * auth frames to userspace. See @NL80211_MESH_SETUP_USERSPACE_AUTH.
* @WIPHY_FLAG_SUPPORTS_SCHED_SCAN: The device supports scheduled scans.
* @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the * @WIPHY_FLAG_SUPPORTS_FW_ROAM: The device supports roaming feature in the
* firmware. * firmware.
* @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP. * @WIPHY_FLAG_AP_UAPSD: The device supports uapsd on AP.
......
...@@ -23,27 +23,14 @@ ifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),) ...@@ -23,27 +23,14 @@ ifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),)
cfg80211-y += extra-certs.o cfg80211-y += extra-certs.o
endif endif
$(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.x509) $(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.hex)
@$(kecho) " GEN $@" @$(kecho) " GEN $@"
@(set -e; \ @(echo '#include "reg.h"'; \
allf=""; \ echo 'const u8 shipped_regdb_certs[] = {'; \
for f in $^ ; do \ cat $^ ; \
# similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \ echo '};'; \
thisf=$$(od -An -v -tx1 < $$f | \ echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
sed -e 's/ /\n/g' | \ ) > $@
sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \
sed -e 's/^/0x/;s/$$/,/'); \
# file should not be empty - maybe command substitution failed? \
test ! -z "$$thisf";\
allf=$$allf$$thisf;\
done; \
( \
echo '#include "reg.h"'; \
echo 'const u8 shipped_regdb_certs[] = {'; \
echo "$$allf"; \
echo '};'; \
echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
) >> $@)
$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \ $(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
$(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509) $(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)
...@@ -66,4 +53,6 @@ $(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \ ...@@ -66,4 +53,6 @@ $(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
echo "$$allf"; \ echo "$$allf"; \
echo '};'; \ echo '};'; \
echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \ echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \
) >> $@) ) > $@)
clean-files += shipped-certs.c extra-certs.c
/* Seth Forshee's regdb certificate */
0x30, 0x82, 0x02, 0xa4, 0x30, 0x82, 0x01, 0x8c,
0x02, 0x09, 0x00, 0xb2, 0x8d, 0xdf, 0x47, 0xae,
0xf9, 0xce, 0xa7, 0x30, 0x0d, 0x06, 0x09, 0x2a,
0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x0b,
0x05, 0x00, 0x30, 0x13, 0x31, 0x11, 0x30, 0x0f,
0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x08, 0x73,
0x66, 0x6f, 0x72, 0x73, 0x68, 0x65, 0x65, 0x30,
0x20, 0x17, 0x0d, 0x31, 0x37, 0x31, 0x30, 0x30,
0x36, 0x31, 0x39, 0x34, 0x30, 0x33, 0x35, 0x5a,
0x18, 0x0f, 0x32, 0x31, 0x31, 0x37, 0x30, 0x39,
0x31, 0x32, 0x31, 0x39, 0x34, 0x30, 0x33, 0x35,
0x5a, 0x30, 0x13, 0x31, 0x11, 0x30, 0x0f, 0x06,
0x03, 0x55, 0x04, 0x03, 0x0c, 0x08, 0x73, 0x66,
0x6f, 0x72, 0x73, 0x68, 0x65, 0x65, 0x30, 0x82,
0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86,
0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05,
0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82,
0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb5,
0x40, 0xe3, 0x9c, 0x28, 0x84, 0x39, 0x03, 0xf2,
0x39, 0xd7, 0x66, 0x2c, 0x41, 0x38, 0x15, 0xac,
0x7e, 0xa5, 0x83, 0x71, 0x25, 0x7e, 0x90, 0x7c,
0x68, 0xdd, 0x6f, 0x3f, 0xd9, 0xd7, 0x59, 0x38,
0x9f, 0x7c, 0x6a, 0x52, 0xc2, 0x03, 0x2a, 0x2d,
0x7e, 0x66, 0xf4, 0x1e, 0xb3, 0x12, 0x70, 0x20,
0x5b, 0xd4, 0x97, 0x32, 0x3d, 0x71, 0x8b, 0x3b,
0x1b, 0x08, 0x17, 0x14, 0x6b, 0x61, 0xc4, 0x57,
0x8b, 0x96, 0x16, 0x1c, 0xfd, 0x24, 0xd5, 0x0b,
0x09, 0xf9, 0x68, 0x11, 0x84, 0xfb, 0xca, 0x51,
0x0c, 0xd1, 0x45, 0x19, 0xda, 0x10, 0x44, 0x8a,
0xd9, 0xfe, 0x76, 0xa9, 0xfd, 0x60, 0x2d, 0x18,
0x0b, 0x28, 0x95, 0xb2, 0x2d, 0xea, 0x88, 0x98,
0xb8, 0xd1, 0x56, 0x21, 0xf0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,
0xb3, 0x69, 0x34, 0xe1, 0x80, 0x80, 0xbb, 0xe2,
0xaf, 0xb9, 0xd6, 0x30, 0xf1, 0x1d, 0x54, 0x87,
0x23, 0x99, 0x9f, 0x51, 0x03, 0x4c, 0x45, 0x7d,
0x02, 0x65, 0x73, 0xab, 0xfd, 0xcf, 0x94, 0xcc,
0x0d, 0x3a, 0x60, 0xfd, 0x3c, 0x14, 0x2f, 0x16,
0x33, 0xa9, 0x21, 0x1f, 0xcb, 0x50, 0xb1, 0x8f,
0x03, 0xee, 0xa0, 0x66, 0xa9, 0x16, 0x79, 0x14,
...@@ -2610,7 +2610,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag ...@@ -2610,7 +2610,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
case NL80211_IFTYPE_AP: case NL80211_IFTYPE_AP:
if (wdev->ssid_len && if (wdev->ssid_len &&
nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid)) nla_put(msg, NL80211_ATTR_SSID, wdev->ssid_len, wdev->ssid))
goto nla_put_failure; goto nla_put_failure_locked;
break; break;
case NL80211_IFTYPE_STATION: case NL80211_IFTYPE_STATION:
case NL80211_IFTYPE_P2P_CLIENT: case NL80211_IFTYPE_P2P_CLIENT:
...@@ -2623,7 +2623,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag ...@@ -2623,7 +2623,7 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
if (!ssid_ie) if (!ssid_ie)
break; break;
if (nla_put(msg, NL80211_ATTR_SSID, ssid_ie[1], ssid_ie + 2)) if (nla_put(msg, NL80211_ATTR_SSID, ssid_ie[1], ssid_ie + 2))
goto nla_put_failure; goto nla_put_failure_locked;
break; break;
} }
default: default:
...@@ -2635,6 +2635,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag ...@@ -2635,6 +2635,8 @@ static int nl80211_send_iface(struct sk_buff *msg, u32 portid, u32 seq, int flag
genlmsg_end(msg, hdr); genlmsg_end(msg, hdr);
return 0; return 0;
nla_put_failure_locked:
wdev_unlock(wdev);
nla_put_failure: nla_put_failure:
genlmsg_cancel(msg, hdr); genlmsg_cancel(msg, hdr);
return -EMSGSIZE; return -EMSGSIZE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment