aboutsummaryrefslogtreecommitdiff
path: root/include/net/iw_handler.h
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2017-05-02 11:02:41 +0200
committerJiri Kosina <jkosina@suse.cz>2017-05-02 11:02:41 +0200
commit4d6ca227c768b50b05cf183974b40abe444e9d0c (patch)
treebf953d8e895281053548b9967a2c4b58d641df00 /include/net/iw_handler.h
parent800f3eef8ebc1264e9c135bfa892c8ae41fa4792 (diff)
parentaf22a610bc38508d5ea760507d31be6b6983dfa8 (diff)
Merge branch 'for-4.12/asus' into for-linus
Diffstat (limited to 'include/net/iw_handler.h')
-rw-r--r--include/net/iw_handler.h66
1 files changed, 7 insertions, 59 deletions
diff --git a/include/net/iw_handler.h b/include/net/iw_handler.h
index e0f4109e64c6..2509728650bd 100644
--- a/include/net/iw_handler.h
+++ b/include/net/iw_handler.h
@@ -505,25 +505,8 @@ static inline int iwe_stream_event_len_adjust(struct iw_request_info *info,
/*
* Wrapper to add an Wireless Event to a stream of events.
*/
-static inline char *
-iwe_stream_add_event(struct iw_request_info *info, char *stream, char *ends,
- struct iw_event *iwe, int event_len)
-{
- int lcp_len = iwe_stream_lcp_len(info);
-
- event_len = iwe_stream_event_len_adjust(info, event_len);
-
- /* Check if it's possible */
- if(likely((stream + event_len) < ends)) {
- iwe->len = event_len;
- /* Beware of alignement issues on 64 bits */
- memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
- memcpy(stream + lcp_len, &iwe->u,
- event_len - lcp_len);
- stream += event_len;
- }
- return stream;
-}
+char *iwe_stream_add_event(struct iw_request_info *info, char *stream,
+ char *ends, struct iw_event *iwe, int event_len);
static inline char *
iwe_stream_add_event_check(struct iw_request_info *info, char *stream,
@@ -541,26 +524,8 @@ iwe_stream_add_event_check(struct iw_request_info *info, char *stream,
* Wrapper to add an short Wireless Event containing a pointer to a
* stream of events.
*/
-static inline char *
-iwe_stream_add_point(struct iw_request_info *info, char *stream, char *ends,
- struct iw_event *iwe, char *extra)
-{
- int event_len = iwe_stream_point_len(info) + iwe->u.data.length;
- int point_len = iwe_stream_point_len(info);
- int lcp_len = iwe_stream_lcp_len(info);
-
- /* Check if it's possible */
- if(likely((stream + event_len) < ends)) {
- iwe->len = event_len;
- memcpy(stream, (char *) iwe, IW_EV_LCP_PK_LEN);
- memcpy(stream + lcp_len,
- ((char *) &iwe->u) + IW_EV_POINT_OFF,
- IW_EV_POINT_PK_LEN - IW_EV_LCP_PK_LEN);
- memcpy(stream + point_len, extra, iwe->u.data.length);
- stream += event_len;
- }
- return stream;
-}
+char *iwe_stream_add_point(struct iw_request_info *info, char *stream,
+ char *ends, struct iw_event *iwe, char *extra);
static inline char *
iwe_stream_add_point_check(struct iw_request_info *info, char *stream,
@@ -579,25 +544,8 @@ iwe_stream_add_point_check(struct iw_request_info *info, char *stream,
* Be careful, this one is tricky to use properly :
* At the first run, you need to have (value = event + IW_EV_LCP_LEN).
*/
-static inline char *
-iwe_stream_add_value(struct iw_request_info *info, char *event, char *value,
- char *ends, struct iw_event *iwe, int event_len)
-{
- int lcp_len = iwe_stream_lcp_len(info);
-
- /* Don't duplicate LCP */
- event_len -= IW_EV_LCP_LEN;
-
- /* Check if it's possible */
- if(likely((value + event_len) < ends)) {
- /* Add new value */
- memcpy(value, &iwe->u, event_len);
- value += event_len;
- /* Patch LCP */
- iwe->len = value - event;
- memcpy(event, (char *) iwe, lcp_len);
- }
- return value;
-}
+char *iwe_stream_add_value(struct iw_request_info *info, char *event,
+ char *value, char *ends, struct iw_event *iwe,
+ int event_len);
#endif /* _IW_HANDLER_H */