Not clear how this is useful (or to whom)...firmware developers? Maybe we can reconsider if you intend to open-source the firmware... :-) Signed-off-by: John W. Linville <linville@xxxxxxxxxxxxx> --- drivers/net/wireless/mwifiex/decl.h | 1 - drivers/net/wireless/mwifiex/main.c | 77 ----------------------------------- drivers/net/wireless/mwifiex/main.h | 4 -- drivers/net/wireless/mwifiex/util.c | 4 -- 4 files changed, 0 insertions(+), 86 deletions(-) diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h index a316446..ea27216 100644 --- a/drivers/net/wireless/mwifiex/decl.h +++ b/drivers/net/wireless/mwifiex/decl.h @@ -151,7 +151,6 @@ enum mwifiex_event_id { MWIFIEX_EVENT_ID_DRV_HS_ACTIVATED, MWIFIEX_EVENT_ID_DRV_HS_DEACTIVATED, MWIFIEX_EVENT_ID_DRV_OBSS_SCAN_PARAM, - MWIFIEX_EVENT_ID_DRV_PASSTHU, MWIFIEX_EVENT_ID_DRV_SCAN_REPORT, }; diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c index 7359715..0c0053d 100644 --- a/drivers/net/wireless/mwifiex/main.c +++ b/drivers/net/wireless/mwifiex/main.c @@ -444,11 +444,6 @@ static void mwifiex_free_adapter(struct mwifiex_adapter *adapter) return; } - if ((adapter->nl_sk) && ((adapter->nl_sk)->sk_socket)) { - sock_release((adapter->nl_sk)->sk_socket); - adapter->nl_sk = NULL; - } - mwifiex_unregister(adapter); PRINTM(MINFO, "Free Adapter\n"); @@ -1144,68 +1139,6 @@ mwifiex_alloc_ioctl_req(u32 size) EXPORT_SYMBOL_GPL(mwifiex_alloc_ioctl_req); /* - * This function broadcasts events generated by firmware to - * applications. - * - * It uses the kernel netlink system to send the events from driver - * to applications. Every application listening on the particular netlink - * socket will receive the events. - */ -enum mwifiex_status -mwifiex_broadcast_event(struct mwifiex_private *priv, u8 *payload, u32 len) -{ - enum mwifiex_status ret = MWIFIEX_STATUS_SUCCESS; - struct sk_buff *skb = NULL; - struct nlmsghdr *nlh = NULL; - struct mwifiex_adapter *adapter = priv->adapter; - struct sock *sk = adapter->nl_sk; - - ENTER(); - if (len > NL_MAX_PAYLOAD) { - PRINTM(MERROR, "event size is too big!!! len=%d\n", (int) len); - ret = MWIFIEX_STATUS_FAILURE; - goto done; - } - if (sk) { - /* Allocate skb */ - skb = alloc_skb(NLMSG_SPACE(NL_MAX_PAYLOAD), GFP_ATOMIC); - if (!skb) { - PRINTM(MERROR, "Could not allocate skb \ - for netlink.\n"); - ret = MWIFIEX_STATUS_FAILURE; - goto done; - } - nlh = (struct nlmsghdr *) skb->data; - nlh->nlmsg_len = NLMSG_SPACE(len); - /* From kernel */ - nlh->nlmsg_pid = 0; - nlh->nlmsg_flags = 0; - - /* Data */ - skb_put(skb, nlh->nlmsg_len); - memcpy(NLMSG_DATA(nlh), payload, len); - - /* From Kernel */ - NETLINK_CB(skb).pid = 0; - - /* Multicast group number */ - NETLINK_CB(skb).dst_group = NL_MULTICAST_GROUP; - - /* Send message */ - netlink_broadcast(sk, skb, 0, NL_MULTICAST_GROUP, GFP_ATOMIC); - - ret = MWIFIEX_STATUS_SUCCESS; - } else { - PRINTM(MERROR, "Could not send event through \ - NETLINK. Link down.\n"); - ret = MWIFIEX_STATUS_FAILURE; - } -done: - LEAVE(); - return ret; -} - -/* * This is the main work queue function. * * It handles the main process, which in turn handles the complete @@ -1287,16 +1220,6 @@ mwifiex_add_card(void *card, struct semaphore *sem, adapter->hs_activated = false; init_waitqueue_head(&adapter->hs_activate_wait_q); - adapter->nl_sk = - netlink_kernel_create(&init_net, NETLINK_MARVELL, - NL_MULTICAST_GROUP, NULL, NULL, - THIS_MODULE); - if (adapter->nl_sk == NULL) { - PRINTM(MERROR, "Could not initialize netlink event passing " - "mechanism!\n"); - goto err_kmalloc; - } - /** Create workqueue */ adapter->workqueue = create_workqueue("MWIFIEX_WORK_QUEUE"); if (!adapter->workqueue) diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h index 8972566..8ae2048 100644 --- a/drivers/net/wireless/mwifiex/main.h +++ b/drivers/net/wireless/mwifiex/main.h @@ -75,7 +75,6 @@ struct mwifiex_drv_mode { #define MWIFIEX_TIMER_10S 10000 #define MWIFIEX_TIMER_1S 1000 -#define NETLINK_MARVELL (MAX_LINKS - 1) #define NL_MAX_PAYLOAD 1024 #define NL_MULTICAST_GROUP 1 @@ -563,7 +562,6 @@ struct mwifiex_adapter { atomic_t ioctl_pending; struct workqueue_struct *workqueue; struct work_struct main_work; - struct sock *nl_sk; struct mwifiex_bss_prio_tbl bss_prio_tbl[MWIFIEX_MAX_BSS_NUM]; void *mwifiex_lock; void *main_proc_lock; @@ -1007,8 +1005,6 @@ int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *); enum mwifiex_status mwifiex_remove_card(struct mwifiex_adapter *, struct semaphore *); -enum mwifiex_status mwifiex_broadcast_event(struct mwifiex_private *priv, - u8 *payload, u32 len); void mwifiex_get_version(struct mwifiex_adapter *adapter, char *version, int maxlen); enum mwifiex_status mwifiex_request_set_mac_address(struct mwifiex_private diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c index abb36f1..cc43313 100644 --- a/drivers/net/wireless/mwifiex/util.c +++ b/drivers/net/wireless/mwifiex/util.c @@ -1153,10 +1153,6 @@ mwifiex_process_recv_event(struct mwifiex_adapter *adapter, CUS_EVT_HS_DEACTIVATED); } break; - case MWIFIEX_EVENT_ID_DRV_PASSTHU: - mwifiex_broadcast_event(priv, event->event_buf, - event->event_len); - break; default: break; -- 1.7.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html