diff options
author | Alexey Shvetsov <alexxy@gentoo.org> | 2011-02-23 11:19:04 +0000 |
---|---|---|
committer | Alexey Shvetsov <alexxy@gentoo.org> | 2011-02-23 11:19:04 +0000 |
commit | 62ae6e2ec4c1c7677d36ff8cd55b7462e1ed5924 (patch) | |
tree | d0b5e45a9fac0e4940414aabf2a07b2d9ae4a6d9 /net-wireless | |
parent | [net-wireless/wimax] Add updates from git. Also fix bug #356121 (diff) | |
download | gentoo-2-62ae6e2ec4c1c7677d36ff8cd55b7462e1ed5924.tar.gz gentoo-2-62ae6e2ec4c1c7677d36ff8cd55b7462e1ed5924.tar.bz2 gentoo-2-62ae6e2ec4c1c7677d36ff8cd55b7462e1ed5924.zip |
[net-wireless/wimax-tools] Add updates from git
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
Diffstat (limited to 'net-wireless')
3 files changed, 334 insertions, 2 deletions
diff --git a/net-wireless/wimax-tools/ChangeLog b/net-wireless/wimax-tools/ChangeLog index 5d50c0add048..584db9e9608a 100644 --- a/net-wireless/wimax-tools/ChangeLog +++ b/net-wireless/wimax-tools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-wireless/wimax-tools -# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/wimax-tools/ChangeLog,v 1.4 2010/11/08 17:45:26 alexxy Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wimax-tools/ChangeLog,v 1.5 2011/02/23 11:19:04 alexxy Exp $ + +*wimax-tools-1.4.4-r1 (23 Feb 2011) + + 23 Feb 2011; Alexey Shvetsov <alexxy@gentoo.org> + +files/updates/0001-wimaxll_cb_ctx-move-to-internal.h-to-wimaxll.h-fixin.patch, + +wimax-tools-1.4.4-r1.ebuild: + Add updates from git *wimax-tools-1.4.4 (08 Nov 2010) diff --git a/net-wireless/wimax-tools/files/updates/0001-wimaxll_cb_ctx-move-to-internal.h-to-wimaxll.h-fixin.patch b/net-wireless/wimax-tools/files/updates/0001-wimaxll_cb_ctx-move-to-internal.h-to-wimaxll.h-fixin.patch new file mode 100644 index 000000000000..da8b1894a913 --- /dev/null +++ b/net-wireless/wimax-tools/files/updates/0001-wimaxll_cb_ctx-move-to-internal.h-to-wimaxll.h-fixin.patch @@ -0,0 +1,293 @@ +From 26da46f5756cdcdae963ea504fef27efcb63ba8b Mon Sep 17 00:00:00 2001 +From: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> +Date: Fri, 28 Jan 2011 12:11:35 -0800 +Subject: [PATCH] wimaxll_cb_ctx: move to internal.h to wimaxll.h (fixing bug #20) + +The context declaration and macros are needed by client programs; they +were misplaced. + +Reported-by: Mathieu Peresse <mathieu.peresse@gmail.com> +Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> +--- + include/wimaxll.h | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++ + lib/internal.h | 126 ---------------------------------------------------- + 2 files changed, 127 insertions(+), 126 deletions(-) + +diff --git a/include/wimaxll.h b/include/wimaxll.h +index c9dde3f..3149bf2 100644 +--- a/include/wimaxll.h ++++ b/include/wimaxll.h +@@ -307,6 +307,133 @@ typedef int (*wimaxll_state_change_cb_f)( + enum wimax_st old_state, enum wimax_st new_state); + + ++ ++/** ++ * General structure for storing callback context ++ * ++ * \ingroup callbacks ++ * ++ * Callbacks set by the user receive a user-set pointer to a context ++ * structure. The user can wrap this struct in a bigger context struct ++ * and use wimaxll_container_of() during the callback to obtain its ++ * pointer. ++ * ++ * Usage: ++ * ++ * \code ++ * ... ++ * struct wimaxll_handle *wmx; ++ * ... ++ * struct my_context { ++ * struct wimaxll_cb_ctx ctx; ++ * <my data> ++ * } my_ctx = { ++ * .ctx = WIMAXLL_CB_CTX_INIT(wmx), ++ * <my data initialization> ++ * }; ++ * ... ++ * wimaxll_set_cb_SOMECALLBACK(wmx, my_callback, &my_ctx.ctx); ++ * ... ++ * result = wimaxll_pipe_read(wmx); ++ * ... ++ * ++ * // When my_callback() is called ++ * my_callback(wmx, ctx, ...) ++ * { ++ * struct my_context *my_ctx = wimaxll_container_of( ++ * ctx, struct my_callback, ctx); ++ * ... ++ * // do stuff with my_ctx ++ * } ++ * \endcode ++ * ++ * \param wmx WiMAX handle this context refers to (for usage by the ++ * callback). ++ * \param result Result of the handling of the message. For usage by ++ * the callback. Should not be set to -EINPROGRESS, as this will ++ * be interpreted by the message handler as no processing was done ++ * on the message. ++ * ++ * \internal ++ * ++ * \param msg_done This is used internally to mark when the acks (or ++ * errors) for a message have been received and the message ++ * receiving loop can be considered done. ++ */ ++struct wimaxll_cb_ctx { ++ struct wimaxll_handle *wmx; ++ ssize_t result; ++ unsigned msg_done:1; /* internal */ ++}; ++ ++ ++/** ++ * Initialize a definition of struct wimaxll_cb_ctx ++ * ++ * \param _wmx pointer to the WiMAX device handle this will be ++ * associated to ++ * ++ * Use as: ++ * ++ * \code ++ * struct wimaxll_handle *wmx; ++ * ... ++ * struct wimaxll_cb_ctx my_context = WIMAXLL_CB_CTX_INIT(wmx); ++ * \endcode ++ * ++ * \ingroup callbacks ++ */ ++#define WIMAXLL_CB_CTX_INIT(_wmx) { \ ++ .wmx = (_wmx), \ ++ .result = -EINPROGRESS, \ ++} ++ ++ ++static inline // ugly workaround for doxygen ++/** ++ * Initialize a struct wimaxll_cb_ctx ++ * ++ * \param ctx Pointer to the struct wimaxll_cb_ctx. ++ * \param wmx pointer to the WiMAX device handle this will be ++ * associated to ++ * ++ * Use as: ++ * ++ * \code ++ * struct wimaxll_handle *wmx; ++ * ... ++ * struct wimaxll_cb_ctx my_context; ++ * ... ++ * wimaxll_cb_ctx(&my_context, wmx); ++ * \endcode ++ * ++ * \ingroup callbacks ++ * \fn static void wimaxll_cb_ctx_init(struct wimaxll_cb_ctx *ctx, struct wimaxll_handle *wmx) ++ */ ++void wimaxll_cb_ctx_init(struct wimaxll_cb_ctx *ctx, struct wimaxll_handle *wmx) ++{ ++ ctx->wmx = wmx; ++ ctx->result = -EINPROGRESS; ++} ++ ++ ++static inline // ugly workaround for doxygen ++/** ++ * Set the result value in a callback context ++ * ++ * \param ctx Context where to set -- if NULL, no action will be taken ++ * \param val value to set for \a result ++ * ++ * \ingroup callbacks ++ * \fn static void wimaxll_cb_maybe_set_result(struct wimaxll_cb_ctx *ctx, int val) ++ */ ++void wimaxll_cb_maybe_set_result(struct wimaxll_cb_ctx *ctx, int val) ++{ ++ if (ctx != NULL && ctx->result == -EINPROGRESS) ++ ctx->result = val; ++} ++ ++ + /* Basic handle management */ + struct wimaxll_handle *wimaxll_open(const char *device_name); + void *wimaxll_priv_get(struct wimaxll_handle *); +diff --git a/lib/internal.h b/lib/internal.h +index a5cd272..178ac1e 100644 +--- a/lib/internal.h ++++ b/lib/internal.h +@@ -54,132 +54,6 @@ enum { + + + /** +- * General structure for storing callback context +- * +- * \ingroup callbacks +- * +- * Callbacks set by the user receive a user-set pointer to a context +- * structure. The user can wrap this struct in a bigger context struct +- * and use wimaxll_container_of() during the callback to obtain its +- * pointer. +- * +- * Usage: +- * +- * \code +- * ... +- * struct wimaxll_handle *wmx; +- * ... +- * struct my_context { +- * struct wimaxll_cb_ctx ctx; +- * <my data> +- * } my_ctx = { +- * .ctx = WIMAXLL_CB_CTX_INIT(wmx), +- * <my data initialization> +- * }; +- * ... +- * wimaxll_set_cb_SOMECALLBACK(wmx, my_callback, &my_ctx.ctx); +- * ... +- * result = wimaxll_pipe_read(wmx); +- * ... +- * +- * // When my_callback() is called +- * my_callback(wmx, ctx, ...) +- * { +- * struct my_context *my_ctx = wimaxll_container_of( +- * ctx, struct my_callback, ctx); +- * ... +- * // do stuff with my_ctx +- * } +- * \endcode +- * +- * \param wmx WiMAX handle this context refers to (for usage by the +- * callback). +- * \param result Result of the handling of the message. For usage by +- * the callback. Should not be set to -EINPROGRESS, as this will +- * be interpreted by the message handler as no processing was done +- * on the message. +- * +- * \internal +- * +- * \param msg_done This is used internally to mark when the acks (or +- * errors) for a message have been received and the message +- * receiving loop can be considered done. +- */ +-struct wimaxll_cb_ctx { +- struct wimaxll_handle *wmx; +- ssize_t result; +- unsigned msg_done:1; /* internal */ +-}; +- +- +-/** +- * Initialize a definition of struct wimaxll_cb_ctx +- * +- * \param _wmx pointer to the WiMAX device handle this will be +- * associated to +- * +- * Use as: +- * +- * \code +- * struct wimaxll_handle *wmx; +- * ... +- * struct wimaxll_cb_ctx my_context = WIMAXLL_CB_CTX_INIT(wmx); +- * \endcode +- * +- * \ingroup callbacks +- */ +-#define WIMAXLL_CB_CTX_INIT(_wmx) { \ +- .wmx = (_wmx), \ +- .result = -EINPROGRESS, \ +-} +- +- +-static inline // ugly workaround for doxygen +-/** +- * Initialize a struct wimaxll_cb_ctx +- * +- * \param ctx Pointer to the struct wimaxll_cb_ctx. +- * \param wmx pointer to the WiMAX device handle this will be +- * associated to +- * +- * Use as: +- * +- * \code +- * struct wimaxll_handle *wmx; +- * ... +- * struct wimaxll_cb_ctx my_context; +- * ... +- * wimaxll_cb_ctx(&my_context, wmx); +- * \endcode +- * +- * \ingroup callbacks +- * \fn static void wimaxll_cb_ctx_init(struct wimaxll_cb_ctx *ctx, struct wimaxll_handle *wmx) +- */ +-void wimaxll_cb_ctx_init(struct wimaxll_cb_ctx *ctx, struct wimaxll_handle *wmx) +-{ +- ctx->wmx = wmx; +- ctx->result = -EINPROGRESS; +-} +- +- +-static inline // ugly workaround for doxygen +-/** +- * Set the result value in a callback context +- * +- * \param ctx Context where to set -- if NULL, no action will be taken +- * \param val value to set for \a result +- * +- * \ingroup callbacks +- * \fn static void wimaxll_cb_maybe_set_result(struct wimaxll_cb_ctx *ctx, int val) +- */ +-void wimaxll_cb_maybe_set_result(struct wimaxll_cb_ctx *ctx, int val) +-{ +- if (ctx != NULL && ctx->result == -EINPROGRESS) +- ctx->result = val; +-} +- +- +-/** + * A WiMax control pipe handle + * + * This type is opaque to the user +-- +1.7.4.1 + diff --git a/net-wireless/wimax-tools/wimax-tools-1.4.4-r1.ebuild b/net-wireless/wimax-tools/wimax-tools-1.4.4-r1.ebuild new file mode 100644 index 000000000000..7861fdbe02d1 --- /dev/null +++ b/net-wireless/wimax-tools/wimax-tools-1.4.4-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-wireless/wimax-tools/wimax-tools-1.4.4-r1.ebuild,v 1.1 2011/02/23 11:19:04 alexxy Exp $ + +EAPI="3" + +inherit linux-info base + +DESCRIPTION="Tools to use Intel's WiMax cards" +HOMEPAGE="http://www.linuxwimax.org" +SRC_URI="http://linuxwimax.org/Download?action=AttachFile&do=get&target=${P}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=sys-kernel/linux-headers-2.6.34 + >=dev-libs/libnl-1.0" +RDEPEND="" + +PATCHES=( + "${FILESDIR}/updates/0001-wimaxll_cb_ctx-move-to-internal.h-to-wimaxll.h-fixin.patch" +) + +pkg_setup() { + linux-info_pkg_setup +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" +} |