staging: wilc1000: WILC_WFI_mgmt_rx: add argument wilc and use it
authorGlen Lee <glen.lee@atmel.com>
Tue, 27 Oct 2015 09:27:51 +0000 (18:27 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:11:23 +0000 (08:11 +0900)
This patch add new argument wilc and use it instead of g_wlan_linux.
Declare the function in wilc_wfi_netdevice.h.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wfi_netdevice.h
drivers/staging/wilc1000/wilc_wlan.c

index c0fac3cd622b14377d4009e7cc8a9b9408bc1f67..412d5a0b20c0353a5110444ee4dd19f9c9ee20a3 100644 (file)
@@ -1611,25 +1611,25 @@ void frmw_to_linux(u8 *buff, u32 size, u32 pkt_offset)
        }
 }
 
-void WILC_WFI_mgmt_rx(u8 *buff, u32 size)
+void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size)
 {
        int i = 0;
        perInterface_wlan_t *nic;
 
        /*Pass the frame on the monitor interface, if any.*/
        /*Otherwise, pass it on p2p0 netdev, if registered on it*/
-       for (i = 0; i < g_linux_wlan->vif_num; i++) {
-               nic = netdev_priv(g_linux_wlan->vif[i].ndev);
+       for (i = 0; i < wilc->vif_num; i++) {
+               nic = netdev_priv(wilc->vif[i].ndev);
                if (nic->monitor_flag) {
                        WILC_WFI_monitor_rx(buff, size);
                        return;
                }
        }
 
-       nic = netdev_priv(g_linux_wlan->vif[1].ndev); /* p2p0 */
+       nic = netdev_priv(wilc->vif[1].ndev); /* p2p0 */
        if ((buff[0] == nic->g_struct_frame_reg[0].frame_type && nic->g_struct_frame_reg[0].reg) ||
            (buff[0] == nic->g_struct_frame_reg[1].frame_type && nic->g_struct_frame_reg[1].reg))
-               WILC_WFI_p2p_rx(g_linux_wlan->vif[1].ndev, buff, size);
+               WILC_WFI_p2p_rx(wilc->vif[1].ndev, buff, size);
 }
 
 void wl_wlan_cleanup(void)
index a828fab301f7e9520c68fd9b6a6493d89fde3b51..8ba69ee67c070a830eb52699163d269c3d196407 100644 (file)
@@ -216,4 +216,5 @@ int linux_wlan_lock_timeout(void *vp, u32 timeout);
 void wl_wlan_cleanup(void);
 int wilc_netdev_init(struct wilc **wilc);
 void wilc1000_wlan_deinit(struct net_device *dev);
+void WILC_WFI_mgmt_rx(struct wilc *wilc, u8 *buff, u32 size);
 #endif
index 63712a2ef9bee839b9b81f8162d879fe3031c5f6..babd941f0effabe66dbee693b674c2cbbd77be8e 100644 (file)
@@ -18,7 +18,6 @@
  ********************************************/
 extern wilc_hif_func_t hif_sdio;
 extern wilc_hif_func_t hif_spi;
-extern void WILC_WFI_mgmt_rx(u8 *buff, u32 size);
 u32 wilc_get_chipid(u8 update);
 u16 Set_machw_change_vir_if(bool bValue);
 
@@ -1178,7 +1177,7 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
                                /* reset mgmt indicator bit, to use pkt_offeset in furthur calculations */
                                pkt_offset &= ~(IS_MANAGMEMENT | IS_MANAGMEMENT_CALLBACK | IS_MGMT_STATUS_SUCCES);
 
-                               WILC_WFI_mgmt_rx(&buffer[offset + HOST_HDR_OFFSET], pkt_len);
+                               WILC_WFI_mgmt_rx(wilc, &buffer[offset + HOST_HDR_OFFSET], pkt_len);
                        }
                        else
                        {
This page took 0.04464 seconds and 5 git commands to generate.