From 306caa660a09295dbe1cc2f4c184a89b38591661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCsch?= Date: Sun, 17 Feb 2008 12:18:33 +0000 Subject: hostapd: use patches to add the nl80211 driver instead of copying the files. SVN-Revision: 10475 --- .../patches/005-use-nl80211-for-get-key.patch | 116 --------------------- 1 file changed, 116 deletions(-) delete mode 100644 package/hostapd/patches/005-use-nl80211-for-get-key.patch (limited to 'package/hostapd/patches/005-use-nl80211-for-get-key.patch') diff --git a/package/hostapd/patches/005-use-nl80211-for-get-key.patch b/package/hostapd/patches/005-use-nl80211-for-get-key.patch deleted file mode 100644 index 142c193..0000000 --- a/package/hostapd/patches/005-use-nl80211-for-get-key.patch +++ /dev/null @@ -1,116 +0,0 @@ ---- - hostapd/driver_devicescape.c | 96 ++++++++++++++++++++++++++++++++++--------- - 1 file changed, 76 insertions(+), 20 deletions(-) - ---- hostap.orig/hostapd/driver_devicescape.c 2007-11-09 13:41:13.000000000 +0100 -+++ hostap/hostapd/driver_devicescape.c 2007-11-09 13:41:14.000000000 +0100 -@@ -228,33 +228,89 @@ static int i802_set_encryption(const cha - return ret; - } - -+static inline int min_int(int a, int b) -+{ -+ if (acmd = PRISM2_GET_ENCRYPTION; -- if (addr == NULL) -- memset(param->sta_addr, 0xff, ETH_ALEN); -- else -- memcpy(param->sta_addr, addr, ETH_ALEN); -- param->u.crypt.idx = idx; -- -- ret = hostapd_ioctl_iface(iface, drv, param, param_len); -- if (ret == 0) { -- memcpy(seq, param->u.crypt.seq_counter, -- HOSTAP_SEQ_COUNTER_SIZE); -- } -- free(param); -+ genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, -+ 0, NL80211_CMD_GET_KEY, 0); -+ -+ if (addr) -+ NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr); -+ NLA_PUT_U8(msg, NL80211_ATTR_KEY_IDX, idx); -+ NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, if_nametoindex(iface)); -+ -+ cb = nl_cb_alloc(NL_CB_CUSTOM); -+ if (!cb) -+ goto out; -+ -+ memset(seq, 0, 6); -+ -+ if (nl_send_auto_complete(drv->nl_handle, msg) < 0) -+ goto out; -+ -+ nl_cb_set(cb, NL_CB_VALID, NL_CB_CUSTOM, get_key_handler, seq); -+ nl_cb_set(cb, NL_CB_ACK, NL_CB_CUSTOM, ack_wait_handler, &finished); -+ -+ err = nl_recvmsgs(drv->nl_handle, cb); -+ -+ if (!finished) -+ err = nl_wait_for_ack(drv->nl_handle); -+ -+ if (err < 0) -+ goto out; -+ -+ ret = 0; -+ -+ out: -+ nl_cb_put(cb); -+ nla_put_failure: -+ nlmsg_free(msg); - return ret; - } - -- cgit v1.1