staging: wilc1000: dynamically add/delete interfaces & cleanup fixes
Subsystems (2)
cover staging: wilc1000: dynamically add/delete interfaces & cleanup fixes
From: Ajay Singh <[email protected]>
This patch series mainly contains the changes to support the add/delete of wlan0/p2p0 network interfaces dynamically. The driver will be loaded with a single default interface and later new interfaces can be added or removed.
Also included few cleanup patches in this series.
Ajay Singh (8):
staging: wilc1000: handle p2p operations in caller context
staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()
staging: wilc1000: added support to dynamically add/remove interfaces
staging: wilc1000: remove use of driver_handler_id & ifc_id
staging: wilc1000: remove unnecessary loop to traverse vif interfaces
staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif'
struct
staging: wilc1000: remove extra argument passing to
wilc_send_config_pkt()
staging: wilc1000: rename 'host_interface' source and header
drivers/staging/wilc1000/Makefile | 2 +-
.../wilc1000/{host_interface.c => wilc_hif.c} | 170 +++----
.../wilc1000/{host_interface.h => wilc_hif.h} | 1 -
drivers/staging/wilc1000/wilc_mon.c | 9 +-
drivers/staging/wilc1000/wilc_netdev.c | 293 ++++-------
drivers/staging/wilc1000/wilc_sdio.c | 7 +-
drivers/staging/wilc1000/wilc_spi.c | 3 +-
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 536 +++++++++++++--------
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 13 +-
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 24 +-
drivers/staging/wilc1000/wilc_wlan.c | 23 +-
drivers/staging/wilc1000/wilc_wlan.h | 8 +-
12 files changed, 560 insertions(+), 529 deletions(-)
rename drivers/staging/wilc1000/{host_interface.c => wilc_hif.c} (91%)
rename drivers/staging/wilc1000/{host_interface.h => wilc_hif.h} (99%)Signature · 1 line
2.7.4
PATCH 1/8 staging: wilc1000: handle p2p operations in caller context
From: Ajay Singh <[email protected]>
Moved the handling of p2p related operation in the caller context instead of using workqueue.
--- drivers/staging/wilc1000/host_interface.c | 46 ++++++++++++------------------- 1 file changed, 17 insertions(+), 29 deletions(-)
drivers/staging/wilc1000/host_interface.c +17 -29
@@ -965,11 +965,8 @@ static int handle_remain_on_chan(struct wilc_vif *vif,return 0 ; } -static void handle_listen_state_expired (struct work_struct *work) +static int wilc_handle_roc_expired (struct wilc_vif *vif,u64 cookie) { - struct host_if_msg *msg = container_of(work, struct host_if_msg, work); -struct wilc_vif *vif = msg->vif; -struct wilc_remain_ch *hif_remain_ch = &msg->body.remain_on_ch;u8 remain_on_chan_flag;struct wid wid;int result;
@@ -981,10 +978,10 @@ static void handle_listen_state_expired(struct work_struct *work) wid.id =WID_REMAIN_ON_CHAN ; wid.type =WID_STR ; wid.size =2 ; - wid.val =kmalloc (wid.size,GFP_KERNEL ); + wid.val =kmalloc (wid.size,GFP_KERNEL );if (!wid.val) - goto free_msg; +return -ENOMEM ; wid.val[0 ] = remain_on_chan_flag; wid.val[1 ] =WILC_FALSE_FRMWR_CHANNEL ;
@@ -994,18 +991,25 @@ static void handle_listen_state_expired(struct work_struct *work)kfree (wid.val);if (result !=0 ) {netdev_err (vif->ndev,"Failed to set remain channel\n" ); - goto free_msg; +return -EINVAL ; }if (hif_drv->remain_on_ch.expired) { hif_drv->remain_on_ch.expired (hif_drv->remain_on_ch.arg, - hif_remain_ch->cookie); + cookie); } }else {netdev_dbg (vif->ndev,"Not in listen state\n" ); } -free_msg: +return 0 ; +} + +static void wilc_handle_listen_state_expired (struct work_struct *work) +{ + struct host_if_msg *msg = container_of(work, struct host_if_msg, work); + +wilc_handle_roc_expired (msg->vif, msg->body.remain_on_ch.cookie);kfree (msg); }
@@ -1019,7 +1023,7 @@ static void listen_timer_cb(struct timer_list *t)del_timer (&vif->hif_drv->remain_on_ch_timer); - msg =wilc_alloc_work (vif, handle_listen_state_expired, false); + msg =wilc_alloc_work (vif, wilc_handle_listen_state_expired, false);if (IS_ERR (msg))return ;
@@ -1841,30 +1845,14 @@ int wilc_remain_on_channel(struct wilc_vif *vif, u64 cookie,int wilc_listen_state_expired (struct wilc_vif *vif,u64 cookie) { -int result; -struct host_if_msg *msg; -struct host_if_drv *hif_drv = vif->hif_drv; - -if (!hif_drv) { +if (!vif->hif_drv) {netdev_err (vif->ndev,"%s: hif driver is NULL" , __func__);return -EFAULT ; } -del_timer (&hif_drv->remain_on_ch_timer); - - msg =wilc_alloc_work (vif, handle_listen_state_expired, false); -if (IS_ERR (msg)) -return PTR_ERR (msg); - - msg->body.remain_on_ch.cookie = cookie; - - result =wilc_enqueue_work (msg); -if (result) { -netdev_err (vif->ndev,"%s: enqueue work failed\n" , __func__); -kfree (msg); - } +del_timer (&vif->hif_drv->remain_on_ch_timer); -return result; +return wilc_handle_roc_expired (vif, cookie); }void wilc_frame_register (struct wilc_vif *vif,u16 frame_type,bool reg)
Signature · 1 line
2.7.4
PATCH 2/8 staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()
In reply to [email protected]From: Ajay Singh <[email protected]>
For the error path in wilc_wlan_initialize(), the resources are not cleanup in the correct order. Reverted the previous changes and use the correct order to free during error condition.
--- drivers/staging/wilc1000/wilc_netdev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/staging/wilc1000/wilc_netdev.c +6 -6
@@ -530,17 +530,17 @@ static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) goto fail_locks; } -if (wl->gpio_irq &&init_irq (dev)) { - ret = -EIO ; - goto fail_locks; - } - ret =wlan_initialize_threads (dev);if (ret <0 ) { ret = -EIO ; goto fail_wilc_wlan; } +if (wl->gpio_irq &&init_irq (dev)) { + ret = -EIO ; + goto fail_threads; + } +if (!wl->dev_irq_num && wl->hif_func->enable_interrupt && wl->hif_func->enable_interrupt (wl)) {
@@ -596,7 +596,7 @@ static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif) fail_irq_init:if (wl->dev_irq_num)deinit_irq (dev); - +fail_threads:wlan_deinitialize_threads (dev); fail_wilc_wlan:wilc_wlan_cleanup (dev);
Signature · 1 line
2.7.4
PATCH 3/8 staging: wilc1000: added support to dynamically add/remove interfaces
In reply to [email protected]From: Ajay Singh <[email protected]>
Removed the use of two hardcoded interfaces and added support to add/remove the network interfaces dynamically.
Now the driver will have single default interface with name 'wlan0' and later other interface can be added from user space application e.g using 'iw add' command.
Also taken care to maintain 'wilc_vif' as part of 'net_device' private data and 'wilc' struct as 'wiphy' private data.
--- drivers/staging/wilc1000/wilc_mon.c | 9 +- drivers/staging/wilc1000/wilc_netdev.c | 269 ++++------- drivers/staging/wilc1000/wilc_sdio.c | 7 +- drivers/staging/wilc1000/wilc_spi.c | 3 +- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 535 ++++++++++++++-------- drivers/staging/wilc1000/wilc_wfi_cfgoperations.h | 13 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 20 +- drivers/staging/wilc1000/wilc_wlan.c | 20 +- drivers/staging/wilc1000/wilc_wlan.h | 6 +- 9 files changed, 492 insertions(+), 390 deletions(-)
drivers/staging/wilc1000/wilc_mon.c +6 -3
@@ -233,6 +233,7 @@ struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl,strncpy (wl->monitor_dev->name, name,IFNAMSIZ ); wl->monitor_dev->name[IFNAMSIZ -1 ] =0 ; wl->monitor_dev->netdev_ops = &wilc_wfi_netdev_ops; + wl->monitor_dev->needs_free_netdev = true;if (register_netdevice (wl->monitor_dev)) {netdev_err (real_dev,"register_netdevice failed\n" );
@@ -247,12 +248,14 @@ struct net_device *wilc_wfi_init_mon_interface(struct wilc *wl,return wl->monitor_dev; } -void wilc_wfi_deinit_mon_interface (struct wilc *wl) +void wilc_wfi_deinit_mon_interface (struct wilc *wl,bool rtnl_locked) {if (!wl->monitor_dev)return ; -unregister_netdev (wl->monitor_dev); -free_netdev (wl->monitor_dev); +if (rtnl_locked) +unregister_netdevice (wl->monitor_dev); +else +unregister_netdev (wl->monitor_dev); wl->monitor_dev =NULL ; }
drivers/staging/wilc1000/wilc_netdev.c +98 -171
428 lines not on this page · raw message
drivers/staging/wilc1000/wilc_sdio.c +3 -4
@@ -8,6 +8,7 @@#include <linux/mmc/host.h> #include "wilc_wfi_netdevice.h" +#include "wilc_wfi_cfgoperations.h" #define SDIO_MODALIAS "wilc1000_sdio"
@@ -139,11 +140,9 @@ static int wilc_sdio_probe(struct sdio_func *func, } } -dev_dbg (&func->dev,"Initializing netdev\n" ); - ret =wilc_netdev_init (&wilc, &func->dev,WILC_HIF_SDIO , - &wilc_hif_sdio); + ret =wilc_cfg80211_init (&wilc, &func->dev,WILC_HIF_SDIO , + &wilc_hif_sdio);if (ret) { -dev_err (&func->dev,"Couldn't initialize netdev\n" );kfree (sdio_priv);return ret; }
drivers/staging/wilc1000/wilc_spi.c +2 -1
@@ -7,6 +7,7 @@#include <linux/spi/spi.h> #include "wilc_wfi_netdevice.h" +#include "wilc_wfi_cfgoperations.h" struct wilc_spi {int crc_off;
@@ -120,7 +121,7 @@ static int wilc_bus_probe(struct spi_device *spi)dev_err (&spi->dev,"failed to get the irq gpio\n" ); } - ret =wilc_netdev_init (&wilc,NULL ,WILC_HIF_SPI , &wilc_hif_spi); + ret =wilc_cfg80211_init (&wilc, &spi->dev,WILC_HIF_SPI , &wilc_hif_spi);if (ret) {kfree (spi_priv);return ret;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +347 -188
929 lines not on this page · raw message
drivers/staging/wilc1000/wilc_wfi_cfgoperations.h +8 -5
@@ -8,17 +8,20 @@#define NM_WFI_CFGOPERATIONS #include "wilc_wfi_netdevice.h" -struct wireless_dev *wilc_create_wiphy (struct net_device *net, -struct device *dev); -void wilc_free_wiphy (struct net_device *net); +struct wiphy *wilc_cfg_alloc (void ); +int wilc_cfg80211_init (struct wilc **wilc,struct device *dev,int io_type, +const struct wilc_hif_func *ops); +struct wilc *wilc_create_wiphy (struct device *dev);void wilc_deinit_host_int (struct net_device *net);int wilc_init_host_int (struct net_device *net);void wilc_wfi_monitor_rx (struct net_device *mon_dev,u8 *buff,u32 size); -void wilc_wfi_deinit_mon_interface (struct wilc *wl); +struct wilc_vif *wilc_netdev_interface (struct wilc *wl,const char *name, +enum nl80211_iftype type); +void wilc_wfi_deinit_mon_interface (struct wilc *wl,bool rtnl_locked);struct net_device *wilc_wfi_init_mon_interface (struct wilc *wl,const char *name,struct net_device *real_dev);void wilc_mgmt_frame_register (struct wiphy *wiphy,struct wireless_dev *wdev,u16 frame_type,bool reg); - +struct wilc_vif *wilc_get_interface (struct wilc *wl);#endif
drivers/staging/wilc1000/wilc_wfi_netdevice.h +12 -8
@@ -129,7 +129,7 @@ static struct ieee80211_rate wilc_bitrates[] = { };struct wilc_priv { -struct wireless_dev *wdev; +struct wireless_dev wdev;struct cfg80211_scan_request *scan_req;struct wilc_wfi_p2p_listen_params remain_on_ch_params;
@@ -156,10 +156,6 @@ struct wilc_priv {int scanned_cnt;struct wilc_p2p_var p2p; -struct ieee80211_channel channels[ARRAY_SIZE (wilc_2ghz_channels)]; -struct ieee80211_rate bitrates[ARRAY_SIZE (wilc_bitrates)]; -struct ieee80211_supported_band band; -u32 cipher_suites[ARRAY_SIZE (wilc_cipher_suites)];u64 inc_roc_cookie; };
@@ -214,9 +210,11 @@ struct wilc_vif {struct rf_info periodic_stat;struct tcp_ack_filter ack_filter;bool connecting; +struct wilc_priv priv; };struct wilc { +struct wiphy *wiphy;const struct wilc_hif_func *hif_func;int io_type;s8 mac_status;
@@ -226,6 +224,8 @@ struct wilc {int close;u8 vif_num;struct wilc_vif *vif[WILC_NUM_CONCURRENT_IFC ]; +/*protect vif list*/ +struct mutex vif_mutex;u8 open_ifcs;/*protect head of transmit queue*/ struct mutex txq_add_to_head_cs;
@@ -275,6 +275,10 @@ struct wilc {struct mutex deinit_lock;u8 sta_ch;u8 op_ch; +struct ieee80211_channel channels[ARRAY_SIZE (wilc_2ghz_channels)]; +struct ieee80211_rate bitrates[ARRAY_SIZE (wilc_bitrates)]; +struct ieee80211_supported_band band; +u32 cipher_suites[ARRAY_SIZE (wilc_cipher_suites)]; };struct wilc_wfi_mon_priv {
@@ -284,9 +288,9 @@ struct wilc_wfi_mon_priv {void wilc_frmw_to_host (struct wilc *wilc,u8 *buff,u32 size,u32 pkt_offset);void wilc_mac_indicate (struct wilc *wilc);void wilc_netdev_cleanup (struct wilc *wilc); -int wilc_netdev_init (struct wilc **wilc,struct device *dev,int io_type, -const struct wilc_hif_func *ops);void wilc_wfi_mgmt_rx (struct wilc *wilc,u8 *buff,u32 size);void wilc_wlan_set_bssid (struct net_device *wilc_netdev,u8 *bssid,u8 mode); - +struct wilc_vif *wilc_netdev_ifc_init (struct wilc *wl,const char *name, +int vif_type,enum nl80211_iftype type, +bool rtnl_locked);#endif
drivers/staging/wilc1000/wilc_wlan.c +13 -7
@@ -6,7 +6,7 @@#include <linux/if_ether.h> #include <linux/ip.h> -#include "wilc_wfi_netdevice.h" +#include "wilc_wfi_cfgoperations.h" #include "wilc_wlan_cfg.h" static inline bool is_wilc1000 (u32 id)
@@ -267,6 +267,7 @@ static int wilc_wlan_txq_add_cfg_pkt(struct wilc_vif *vif, u8 *buffer, tqe->tx_complete_func =NULL ; tqe->priv =NULL ; tqe->ack_idx =NOT_TCP_ACK ; + tqe->vif = vif;wilc_wlan_txq_add_to_head (vif, tqe);
@@ -295,6 +296,7 @@ int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer, tqe->buffer_size = buffer_size; tqe->tx_complete_func = tx_complete_fn; tqe->priv = priv; + tqe->vif = vif; tqe->ack_idx =NOT_TCP_ACK ;if (vif->ack_filter.enabled)
@@ -326,6 +328,7 @@ int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, tqe->tx_complete_func = tx_complete_fn; tqe->priv = priv; tqe->ack_idx =NOT_TCP_ACK ; + tqe->vif = vif;wilc_wlan_txq_add_to_tail (dev, tqe);return 1 ; }
@@ -482,7 +485,7 @@ void host_sleep_notify(struct wilc *wilc) }EXPORT_SYMBOL_GPL (host_sleep_notify); -int wilc_wlan_handle_txq (struct net_device *dev,u32 *txq_count) +int wilc_wlan_handle_txq (struct wilc *wilc,u32 *txq_count) {int i, entries =0 ;u32 sum;
@@ -494,17 +497,20 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)int counter;int timeout;u32 vmm_table[WILC_VMM_TBL_SIZE ]; -struct wilc_vif *vif =netdev_priv (dev); -struct wilc *wilc = vif->wilc;const struct wilc_hif_func *func;u8 *txb = wilc->tx_buffer; +struct net_device *dev; +struct wilc_vif *vif;if (wilc->quit) goto out;mutex_lock (&wilc->txq_add_to_head_cs); -wilc_wlan_txq_filter_dup_tcp_ack (dev); tqe =wilc_wlan_txq_get_first (wilc); +if (!tqe) + goto out; + dev = tqe->vif->ndev; +wilc_wlan_txq_filter_dup_tcp_ack (dev); i =0 ; sum =0 ; do {
@@ -629,6 +635,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if (!tqe)break ; + vif = tqe->vif;if (vmm_table[i] ==0 )break ;
@@ -648,8 +655,7 @@ int wilc_wlan_handle_txq(struct net_device *dev, u32 *txq_count)if (tqe->type ==WILC_CFG_PKT ) { buffer_offset =ETH_CONFIG_PKT_HDR_OFFSET ; }else if (tqe->type ==WILC_NET_PKT ) { - bssid = ((struct tx_complete_data *)(tqe->priv))->bssid; - + bssid = tqe->vif->bssid; buffer_offset =ETH_ETHERNET_HDR_OFFSET ;memcpy (&txb[offset +8 ], bssid,6 ); }else {
drivers/staging/wilc1000/wilc_wlan.h +3 -3
@@ -216,6 +216,7 @@ struct txq_entry_t {int buffer_size;void *priv;int status; +struct wilc_vif *vif;void (*tx_complete_func)(void *priv,int status); };
@@ -253,7 +254,6 @@ struct wilc_hif_func {struct tx_complete_data {int size;void *buff; -u8 *bssid;struct sk_buff *skb; };
@@ -284,7 +284,7 @@ int wilc_wlan_stop(struct wilc *wilc);int wilc_wlan_txq_add_net_pkt (struct net_device *dev,void *priv,u8 *buffer,u32 buffer_size,void (*tx_complete_fn)(void *,int )); -int wilc_wlan_handle_txq (struct net_device *dev,u32 *txq_count); +int wilc_wlan_handle_txq (struct wilc *wl,u32 *txq_count);void wilc_handle_isr (struct wilc *wilc);void wilc_wlan_cleanup (struct net_device *dev); int wilc_wlan_cfg_set(struct wilc_vif *vif, int start, u16 wid, u8 *buffer,
@@ -301,7 +301,7 @@ void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value);int wilc_wlan_get_num_conn_ifcs (struct wilc *wilc);netdev_tx_t wilc_mac_xmit (struct sk_buff *skb,struct net_device *dev); -void wilc_wfi_p2p_rx (struct net_device *dev,u8 *buff,u32 size); +void wilc_wfi_p2p_rx (struct wilc_vif *vif,u8 *buff,u32 size);void host_wakeup_notify (struct wilc *wilc);void host_sleep_notify (struct wilc *wilc);void chip_allow_sleep (struct wilc *wilc);
Signature · 1 line
2.7.4
PATCH 4/8 staging: wilc1000: remove use of driver_handler_id & ifc_id
In reply to [email protected]From: Ajay Singh <[email protected]>
Removed the 'driver_handler_id' & 'ifc_id' elements and used 'idx' to identify the handler.
--- drivers/staging/wilc1000/host_interface.c | 3 +-- drivers/staging/wilc1000/host_interface.h | 1 - drivers/staging/wilc1000/wilc_netdev.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 5 ++--- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 5 files changed, 4 insertions(+), 9 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -2
@@ -1472,7 +1472,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mode, drv.mode = (ifc_id | (mode <<1 )); result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , - hif_drv->driver_handler_id); +wilc_get_vif_idx (vif));if (result)netdev_err (vif->ndev,"Failed to set driver handler\n" );
@@ -1644,7 +1644,6 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)for (i =0 ; i < wilc->vif_num; i++)if (dev == wilc->vif[i]->ndev) { wilc->vif[i]->hif_drv = hif_drv; - hif_drv->driver_handler_id = i +1 ;break ; }
drivers/staging/wilc1000/host_interface.h +0 -1
@@ -166,7 +166,6 @@ struct host_if_drv {struct wilc_vif *remain_on_ch_timer_vif;bool ifc_up; -int driver_handler_id;u8 assoc_resp[WILC_MAX_ASSOC_RESP_FRAME_SIZE ]; };
drivers/staging/wilc1000/wilc_netdev.c +1 -2
@@ -636,7 +636,7 @@ static int wilc_mac_open(struct net_device *ndev)for (i =0 ; i < wl->vif_num; i++) {if (ndev == wl->vif[i]->ndev) {wilc_set_wfi_drv_handler (vif,wilc_get_vif_idx (vif), - vif->iftype, vif->ifc_id); + vif->iftype, vif->idx);wilc_set_operation_mode (vif, vif->iftype);break ; }
@@ -995,7 +995,6 @@ struct wilc_vif *wilc_netdev_ifc_init(struct wilc *wl, const char *name, ndev->needs_free_netdev = true; vif->iftype = vif_type; vif->wilc->vif[wl->vif_num] = vif; - vif->ifc_id = wl->vif_num; vif->idx = wl->vif_num; wl->vif_num +=1 ; vif->mac_opened =0 ;
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +2 -3
@@ -1462,7 +1462,7 @@ static int change_virtual_intf(struct wiphy *wiphy, struct net_device *dev,if (wl->initialized) {wilc_set_wfi_drv_handler (vif,wilc_get_vif_idx (vif), -0 , vif->ifc_id); +0 , vif->idx);wilc_set_operation_mode (vif,WILC_AP_MODE );wilc_set_power_mgmt (vif,0 ,0 ); }
@@ -1693,11 +1693,10 @@ static int del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev) wl->vif[i] =NULL ; }else { vif = wl->vif[i +1 ]; - vif->ifc_id = i; vif->idx = i; wl->vif[i] = vif;wilc_set_wfi_drv_handler (vif,wilc_get_vif_idx (vif), - vif->iftype, vif->ifc_id); + vif->iftype, vif->idx); } } wl->vif_num--;
drivers/staging/wilc1000/wilc_wfi_netdevice.h +0 -1
@@ -203,7 +203,6 @@ struct wilc_vif {struct host_if_drv *hif_drv;struct net_device *ndev;u8 mode; -u8 ifc_id;struct timer_list during_ip_timer;bool obtaining_ip;struct timer_list periodic_rssi;
Signature · 1 line
2.7.4
PATCH 5/8 staging: wilc1000: remove unnecessary loop to traverse vif interfaces
In reply to [email protected]From: Ajay Singh <[email protected]>
Cleanup patch to avoid loop to traverse the interfaces instead make use of vif received from net_device priv data.
--- drivers/staging/wilc1000/host_interface.c | 7 +------ drivers/staging/wilc1000/wilc_netdev.c | 16 +++++----------- 2 files changed, 6 insertions(+), 17 deletions(-)
drivers/staging/wilc1000/host_interface.c +1 -6
@@ -1634,19 +1634,14 @@ int wilc_init(struct net_device *dev, struct host_if_drv **hif_drv_handler)struct host_if_drv *hif_drv;struct wilc_vif *vif =netdev_priv (dev);struct wilc *wilc = vif->wilc; -int i; hif_drv =kzalloc (sizeof (*hif_drv),GFP_KERNEL );if (!hif_drv)return -ENOMEM ; *hif_drv_handler = hif_drv; -for (i =0 ; i < wilc->vif_num; i++) -if (dev == wilc->vif[i]->ndev) { - wilc->vif[i]->hif_drv = hif_drv; -break ; - } + vif->hif_drv = hif_drv; vif->obtaining_ip = false;if (wilc->clients_count ==0 )
drivers/staging/wilc1000/wilc_netdev.c +5 -11
@@ -614,7 +614,6 @@ static int wilc_mac_open(struct net_device *ndev)struct wilc_priv *priv =wdev_priv (vif->ndev->ieee80211_ptr);unsigned char mac_add[ETH_ALEN ] = {0 };int ret =0 ; -int i =0 ;if (!wl || !wl->dev) {netdev_err (ndev,"device not ready\n" );
@@ -633,19 +632,14 @@ static int wilc_mac_open(struct net_device *ndev)return ret; } -for (i =0 ; i < wl->vif_num; i++) { -if (ndev == wl->vif[i]->ndev) { -wilc_set_wfi_drv_handler (vif,wilc_get_vif_idx (vif), - vif->iftype, vif->idx); -wilc_set_operation_mode (vif, vif->iftype); -break ; - } - } +wilc_set_wfi_drv_handler (vif,wilc_get_vif_idx (vif), vif->iftype, + vif->idx); +wilc_set_operation_mode (vif, vif->iftype);wilc_get_mac_address (vif, mac_add);netdev_dbg (ndev,"Mac address: %pM\n" , mac_add); -memcpy (wl->vif[i]->src_addr, mac_add,ETH_ALEN ); -memcpy (ndev->dev_addr, wl->vif[i]->src_addr,ETH_ALEN ); +memcpy (vif->src_addr, mac_add,ETH_ALEN ); +memcpy (ndev->dev_addr, vif->src_addr,ETH_ALEN );if (!is_valid_ether_addr (ndev->dev_addr)) {netdev_err (ndev,"Wrong MAC address\n" );
Signature · 1 line
2.7.4
PATCH 6/8 staging: wilc1000: remove use of 'src_addr' element in 'wilc_vif' struct
In reply to [email protected]From: Ajay Singh <[email protected]>
Remove use of 'src_addr' element in wilc_vif, as the same information already copied to net_device->dev_addr.
--- drivers/staging/wilc1000/wilc_netdev.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- drivers/staging/wilc1000/wilc_wfi_netdevice.h | 1 - 3 files changed, 2 insertions(+), 4 deletions(-)
drivers/staging/wilc1000/wilc_netdev.c +1 -2
@@ -638,8 +638,7 @@ static int wilc_mac_open(struct net_device *ndev)wilc_get_mac_address (vif, mac_add);netdev_dbg (ndev,"Mac address: %pM\n" , mac_add); -memcpy (vif->src_addr, mac_add,ETH_ALEN ); -memcpy (ndev->dev_addr, vif->src_addr,ETH_ALEN ); +ether_addr_copy (ndev->dev_addr, mac_add);if (!is_valid_ether_addr (ndev->dev_addr)) {netdev_err (ndev,"Wrong MAC address\n" );
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +1 -1
@@ -1499,7 +1499,7 @@ static int start_ap(struct wiphy *wiphy, struct net_device *dev,if (ret !=0 )netdev_err (dev,"Error in setting channel\n" ); -wilc_wlan_set_bssid (dev, vif->src_addr,WILC_AP_MODE ); +wilc_wlan_set_bssid (dev, dev->dev_addr,WILC_AP_MODE );wilc_set_power_mgmt (vif,0 ,0 ); return wilc_add_beacon(vif, settings->beacon_interval,
drivers/staging/wilc1000/wilc_wfi_netdevice.h +0 -1
@@ -198,7 +198,6 @@ struct wilc_vif {struct frame_reg frame_reg[NUM_REG_FRAME ];struct net_device_stats netstats;struct wilc *wilc; -u8 src_addr[ETH_ALEN ];u8 bssid[ETH_ALEN ];struct host_if_drv *hif_drv;struct net_device *ndev;
Signature · 1 line
2.7.4
PATCH 7/8 staging: wilc1000: remove extra argument passing to wilc_send_config_pkt()
In reply to [email protected]From: Ajay Singh <[email protected]>
Cleanup patch to remove the passing of driver handler, get the 'idx' value inside the called function.
--- drivers/staging/wilc1000/host_interface.c | 116 ++++++++++-------------------- drivers/staging/wilc1000/wilc_wlan.c | 3 +- drivers/staging/wilc1000/wilc_wlan.h | 2 +- 3 files changed, 40 insertions(+), 81 deletions(-)
drivers/staging/wilc1000/host_interface.c +37 -79
@@ -205,9 +205,7 @@ static int handle_scan_done(struct wilc_vif *vif, enum scan_event evt) wid.val = (s8 *)&abort_running_scan; wid.size =sizeof (char ); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); - + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result) {netdev_err (vif->ndev,"Failed to set abort running\n" ); result = -EFAULT ;
@@ -328,9 +326,7 @@ int wilc_scan(struct wilc_vif *vif, u8 scan_source, u8 scan_type, hif_drv->usr_scan_req.scan_result = scan_result_fn; hif_drv->usr_scan_req.arg = user_arg; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, - index, -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, index);if (result) {netdev_err (vif->ndev,"Failed to send scan parameters\n" ); goto error;
@@ -380,9 +376,7 @@ static int wilc_send_connect_wid(struct wilc_vif *vif) wid_list[wid_cnt].val = (u8 *)bss_param; wid_cnt++; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, - wid_cnt, -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, wid_cnt);if (result) {netdev_err (vif->ndev,"failed to send config packet\n" ); goto error;
@@ -430,8 +424,7 @@ static void handle_connect_timeout(struct work_struct *work) wid.val = (s8 *)&dummy_reason_code; wid.size =sizeof (char ); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send disconnect\n" );
@@ -619,8 +612,7 @@ static void host_int_get_assoc_res_info(struct wilc_vif *vif, wid.val = assoc_resp_info; wid.size = max_assoc_resp_info_len; - result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 );if (result) { *rcvd_assoc_resp_info_len =0 ;netdev_err (vif->ndev,"Failed to send association response\n" );
@@ -783,8 +775,7 @@ int wilc_disconnect(struct wilc_vif *vif) vif->obtaining_ip = false;wilc_set_power_mgmt (vif,0 ,0 ); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result) {netdev_err (vif->ndev,"Failed to send disconnect\n" );return result;
@@ -864,10 +855,7 @@ int wilc_get_statistics(struct wilc_vif *vif, struct rf_info *stats) wid_list[wid_cnt].val = (s8 *)&stats->tx_fail_cnt; wid_cnt++; - result =wilc_send_config_pkt (vif,WILC_GET_CFG , wid_list, - wid_cnt, -wilc_get_vif_idx (vif)); - + result =wilc_send_config_pkt (vif,WILC_GET_CFG , wid_list, wid_cnt);if (result) {netdev_err (vif->ndev,"Failed to send scan parameters\n" );return result;
@@ -950,8 +938,7 @@ static int handle_remain_on_chan(struct wilc_vif *vif, wid.val[0 ] = remain_on_chan_flag; wid.val[1 ] = (s8 )hif_remain_ch->ch; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );kfree (wid.val);if (result)return -EBUSY ;
@@ -986,8 +973,7 @@ static int wilc_handle_roc_expired(struct wilc_vif *vif, u64 cookie) wid.val[0 ] = remain_on_chan_flag; wid.val[1 ] =WILC_FALSE_FRMWR_CHANNEL ; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );kfree (wid.val);if (result !=0 ) {netdev_err (vif->ndev,"Failed to set remain channel\n" );
@@ -1062,8 +1048,7 @@ static void handle_set_mcast_filter(struct work_struct *work)if (set_mc->cnt >0 && set_mc->mc_list)memcpy (cur_byte, set_mc->mc_list, set_mc->cnt *ETH_ALEN ); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send setup multicast\n" );
@@ -1139,8 +1124,7 @@ int wilc_remove_wep_key(struct wilc_vif *vif, u8 index) wid.size =sizeof (char ); wid.val = &index; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send remove wep key config packet\n" );
@@ -1156,8 +1140,7 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index) wid.type =WID_CHAR ; wid.size =sizeof (char ); wid.val = &index; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send wep default key config packet\n" );
@@ -1185,8 +1168,7 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len, wep_key->key_len = len;memcpy (wep_key->key, key, len); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to add wep key config packet\n" );
@@ -1225,8 +1207,7 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const u8 *key, u8 len, wep_key->key_len = len;memcpy (wep_key->key, key, len); result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, -ARRAY_SIZE (wid_list), -wilc_get_vif_idx (vif)); +ARRAY_SIZE (wid_list));if (result)netdev_err (vif->ndev,"Failed to add wep ap key config packet\n" );
@@ -1273,8 +1254,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, wid_list[1 ].size =sizeof (*key_buf) + t_key_len; wid_list[1 ].val = (u8 *)key_buf; result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, -ARRAY_SIZE (wid_list), -wilc_get_vif_idx (vif)); +ARRAY_SIZE (wid_list));kfree (key_buf); }else if (mode ==WILC_STATION_MODE ) {struct wid wid;
@@ -1300,8 +1280,7 @@ int wilc_add_ptk(struct wilc_vif *vif, const u8 *ptk, u8 ptk_key_len, wid.type =WID_STR ; wid.size =sizeof (*key_buf) + t_key_len; wid.val = (s8 *)key_buf; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );kfree (key_buf); }
@@ -1353,8 +1332,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, wid_list[1 ].val = (u8 *)gtk_key; result =wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, -ARRAY_SIZE (wid_list), -wilc_get_vif_idx (vif)); +ARRAY_SIZE (wid_list)); }else if (mode ==WILC_STATION_MODE ) {struct wid wid;
@@ -1362,8 +1340,7 @@ int wilc_add_rx_gtk(struct wilc_vif *vif, const u8 *rx_gtk, u8 gtk_key_len, wid.type =WID_STR ; wid.size =sizeof (*gtk_key) + t_key_len; wid.val = (u8 *)gtk_key; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 ); }kfree (gtk_key);
@@ -1379,8 +1356,7 @@ int wilc_set_pmkid_info(struct wilc_vif *vif, struct wilc_pmkid_attr *pmkid) wid.size = (pmkid->numpmkid *sizeof (struct wilc_pmkid )) +1 ; wid.val = (u8 *)pmkid; -return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); +return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 ); }int wilc_get_mac_address (struct wilc_vif *vif,u8 *mac_addr)
@@ -1393,8 +1369,7 @@ int wilc_get_mac_address(struct wilc_vif *vif, u8 *mac_addr) wid.size =ETH_ALEN ; wid.val = mac_addr; - result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to get mac address\n" );
@@ -1444,8 +1419,7 @@ int wilc_set_mac_chnl_num(struct wilc_vif *vif, u8 channel) wid.size =sizeof (char ); wid.val = &channel; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to set channel\n" );
@@ -1471,8 +1445,7 @@ int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index, u8 mode, drv.handler =cpu_to_le32 (index); drv.mode = (ifc_id | (mode <<1 )); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to set driver handler\n" );
@@ -1492,8 +1465,7 @@ int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode) op_mode.mode =cpu_to_le32 (mode); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to set operation mode\n" );
@@ -1513,8 +1485,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac, u32 *out_val)return -ENOMEM ;ether_addr_copy (wid.val, mac); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );kfree (wid.val);if (result) {netdev_err (vif->ndev,"Failed to set inactive mac\n" );
@@ -1525,8 +1496,7 @@ s32 wilc_get_inactive_time(struct wilc_vif *vif, const u8 *mac, u32 *out_val) wid.type =WID_INT ; wid.val = (s8 *)out_val; wid.size =sizeof (u32); - result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to get inactive time\n" );
@@ -1547,8 +1517,7 @@ int wilc_get_rssi(struct wilc_vif *vif, s8 *rssi_level) wid.type =WID_CHAR ; wid.size =sizeof (char ); wid.val = rssi_level; - result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to get RSSI value\n" );
@@ -1610,8 +1579,7 @@ int wilc_hif_set_cfg(struct wilc_vif *vif, struct cfg_param_attr *param) i++; } -return wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, - i,wilc_get_vif_idx (vif)); +return wilc_send_config_pkt (vif,WILC_SET_CFG , wid_list, i); }static void get_periodic_rssi (struct timer_list *t)
@@ -1876,8 +1844,7 @@ void wilc_frame_register(struct wilc_vif *vif, u16 frame_type, bool reg)break ; } reg_frame.frame_type =cpu_to_le16 (frame_type); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to frame register\n" ); }
@@ -1914,8 +1881,7 @@ int wilc_add_beacon(struct wilc_vif *vif, u32 interval, u32 dtim_period,if (params->tail_len >0 )memcpy (cur_byte, params->tail, params->tail_len); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send add beacon\n" );
@@ -1935,8 +1901,7 @@ int wilc_del_beacon(struct wilc_vif *vif) wid.size =sizeof (char ); wid.val = &del_beacon; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send delete beacon\n" );
@@ -1960,8 +1925,7 @@ int wilc_add_station(struct wilc_vif *vif, const u8 *mac, cur_byte = wid.val;wilc_hif_pack_sta_param (cur_byte, mac, params); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result !=0 )netdev_err (vif->ndev,"Failed to send add station\n" );
@@ -1987,8 +1951,7 @@ int wilc_del_station(struct wilc_vif *vif, const u8 *mac_addr)else ether_addr_copy (wid.val, mac_addr); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to del station\n" );
@@ -2023,8 +1986,7 @@ int wilc_del_allstation(struct wilc_vif *vif, u8 mac_addr[][ETH_ALEN]) wid.size = (assoc_sta *ETH_ALEN ) +1 ; wid.val = (u8 *)&del_sta; - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send delete all station\n" );
@@ -2048,8 +2010,7 @@ int wilc_edit_station(struct wilc_vif *vif, const u8 *mac, cur_byte = wid.val;wilc_hif_pack_sta_param (cur_byte, mac, params); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send edit station\n" );
@@ -2074,8 +2035,7 @@ int wilc_set_power_mgmt(struct wilc_vif *vif, bool enabled, u32 timeout) wid.id =WID_POWER_MANAGEMENT ; wid.val = &power_mode; wid.size =sizeof (char ); - result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); + result =wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 );if (result)netdev_err (vif->ndev,"Failed to send power management\n" );
@@ -2113,8 +2073,7 @@ int wilc_set_tx_power(struct wilc_vif *vif, u8 tx_power) wid.val = &tx_power; wid.size =sizeof (char ); -return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); +return wilc_send_config_pkt (vif,WILC_SET_CFG , &wid,1 ); }int wilc_get_tx_power (struct wilc_vif *vif,u8 *tx_power)
@@ -2126,6 +2085,5 @@ int wilc_get_tx_power(struct wilc_vif *vif, u8 *tx_power) wid.val = tx_power; wid.size =sizeof (char ); -return wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 , -wilc_get_vif_idx (vif)); +return wilc_send_config_pkt (vif,WILC_GET_CFG , &wid,1 ); }
drivers/staging/wilc1000/wilc_wlan.c +2 -1
@@ -1202,10 +1202,11 @@ int wilc_wlan_cfg_get_val(struct wilc *wl, u16 wid, u8 *buffer, u32 buffer_size) }int wilc_send_config_pkt (struct wilc_vif *vif,u8 mode,struct wid *wids, -u32 count,u32 drv) +u32 count) {int i;int ret =0 ; +u32 drv =wilc_get_vif_idx (vif);if (mode ==WILC_GET_CFG ) {for (i =0 ; i < count; i++) {
drivers/staging/wilc1000/wilc_wlan.h +1 -1
@@ -307,7 +307,7 @@ void host_sleep_notify(struct wilc *wilc);void chip_allow_sleep (struct wilc *wilc);void chip_wakeup (struct wilc *wilc);int wilc_send_config_pkt (struct wilc_vif *vif,u8 mode,struct wid *wids, -u32 count,u32 drv); +u32 count);int wilc_wlan_init (struct net_device *dev);u32 wilc_get_chipid (struct wilc *wilc,bool update);#endif
Signature · 1 line
2.7.4
PATCH 8/8 staging: wilc1000: rename 'host_interface' source and header
In reply to [email protected]From: Ajay Singh <[email protected]>
Rename 'host_interface' source and header file to include the 'wilc_' prefix in its name.
---
drivers/staging/wilc1000/Makefile | 2 +-
drivers/staging/wilc1000/{host_interface.c => wilc_hif.c} | 0
drivers/staging/wilc1000/{host_interface.h => wilc_hif.h} | 0
drivers/staging/wilc1000/wilc_wfi_netdevice.h | 2 +-
4 files changed, 2 insertions(+), 2 deletions(-)
rename drivers/staging/wilc1000/{host_interface.c => wilc_hif.c} (100%)
rename drivers/staging/wilc1000/{host_interface.h => wilc_hif.h} (100%)drivers/staging/wilc1000/Makefile +1 -1
@@ -5,7 +5,7 @@ ccflags-y += -DFIRMWARE_1002=\"atmel/wilc1002_firmware.bin\" \ -DFIRMWARE_1003=\"atmel/wilc1003_firmware.bin\" wilc1000-objs := wilc_wfi_cfgoperations.o wilc_netdev.o wilc_mon.o \ - host_interface.o wilc_wlan_cfg.o wilc_wlan.o + wilc_hif.o wilc_wlan_cfg.o wilc_wlan.o obj-$(CONFIG_WILC1000_SDIO) += wilc1000-sdio.o wilc1000-sdio-objs += wilc_sdio.o
drivers/staging/wilc1000/wilc_hif.c renamed from drivers/staging/wilc1000/host_interface.c +0 -0
drivers/staging/wilc1000/wilc_hif.h renamed from drivers/staging/wilc1000/host_interface.h +0 -0
drivers/staging/wilc1000/wilc_wfi_netdevice.h +1 -1
@@ -14,7 +14,7 @@#include <linux/if_arp.h> #include <linux/gpio/consumer.h> -#include "host_interface.h" +#include "wilc_hif.h" #include "wilc_wlan.h" #include "wilc_wlan_cfg.h"
Signature · 1 line
2.7.4