From: Greg KH <gregkh@linuxfoundation.org>
To: Glen Lee <glen.lee@atmel.com>
Cc: devel@driverdev.osuosl.org, austin.shin@atmel.com,
linux-wireless@vger.kernel.org, Nicolas.FERRE@atmel.com,
adel.noureldin@atmel.com, tony.cho@atmel.com, leo.kim@atmel.com,
adham.abozaeid@atmel.com
Subject: Re: [PATCH V2 03/17] staging: wilc1000: wilc_wlan_cfg_get: add argument struct net_device
Date: Wed, 4 Nov 2015 12:45:44 -0800 [thread overview]
Message-ID: <20151104204544.GB23896@kroah.com> (raw)
In-Reply-To: <1446198443-6623-3-git-send-email-glen.lee@atmel.com>
On Fri, Oct 30, 2015 at 06:47:09PM +0900, Glen Lee wrote:
> Adds argument struct net_device and use netdev private data member wilc
> instead of g_linux_wlan, pass dev to the functions as well.
>
> Signed-off-by: Glen Lee <glen.lee@atmel.com>
> ---
> drivers/staging/wilc1000/coreconfigurator.c | 3 ++-
> drivers/staging/wilc1000/linux_wlan.c | 2 +-
> drivers/staging/wilc1000/wilc_wlan.c | 8 ++++++--
> drivers/staging/wilc1000/wilc_wlan.h | 3 ++-
> 4 files changed, 11 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> index 3b4a950..530d64a 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -595,7 +595,8 @@ s32 send_config_pkt(struct net_device *dev, u8 mode, struct wid *wids,
> for (counter = 0; counter < count; counter++) {
> PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
> (counter == count - 1));
> - if (!wilc_wlan_cfg_get(!counter,
> + if (!wilc_wlan_cfg_get(dev,
> + !counter,
> wids[counter].id,
> (counter == count - 1),
> drv)) {
> diff --git a/drivers/staging/wilc1000/linux_wlan.c b/drivers/staging/wilc1000/linux_wlan.c
> index d0161cd..4ed324c 100644
> --- a/drivers/staging/wilc1000/linux_wlan.c
> +++ b/drivers/staging/wilc1000/linux_wlan.c
> @@ -1153,7 +1153,7 @@ int wilc1000_wlan_init(struct net_device *dev, perInterface_wlan_t *p_nic)
>
> wilc_bus_set_max_speed();
>
> - if (wilc_wlan_cfg_get(1, WID_FIRMWARE_VERSION, 1, 0)) {
> + if (wilc_wlan_cfg_get(dev, 1, WID_FIRMWARE_VERSION, 1, 0)) {
> int size;
> char Firmware_ver[20];
>
> diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
> index 16224ce..768fd30 100644
> --- a/drivers/staging/wilc1000/wilc_wlan.c
> +++ b/drivers/staging/wilc1000/wilc_wlan.c
> @@ -1809,12 +1809,16 @@ int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
>
> return ret_size;
> }
> -int wilc_wlan_cfg_get(int start, u32 wid, int commit, u32 drvHandler)
> +int wilc_wlan_cfg_get(struct net_device *dev, int start, u32 wid, int commit,
> + u32 drvHandler)
> {
> wilc_wlan_dev_t *p = &g_wlan;
> u32 offset;
> int ret_size;
> + perInterface_wlan_t *nic = netdev_priv(dev);
> + struct wilc *wilc;
>
> + wilc = nic->wilc;
As you really want 'wilc', why not just pass that instead of a struct
net_device *? You don't have to make it this complex :)
thanks,
greg k-h
next prev parent reply other threads:[~2015-11-04 20:45 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-30 9:47 [PATCH V2 01/17] staging: wilc1000: define wiphy private data priv in struct host_if_drv Glen Lee
2015-10-30 9:47 ` [PATCH V2 02/17] staging: wilc1000: send_config_pkt: add argument struct net_device Glen Lee
2015-11-04 20:44 ` Greg KH
2015-10-30 9:47 ` [PATCH V2 03/17] staging: wilc1000: wilc_wlan_cfg_get: " Glen Lee
2015-11-04 20:45 ` Greg KH [this message]
2015-10-30 9:47 ` [PATCH V2 04/17] staging: wilc1000: wilc_wlan_cfg_set: " Glen Lee
2015-11-04 20:46 ` Greg KH
2015-11-05 1:39 ` glen lee
2015-11-05 2:09 ` Greg KH
2015-10-30 9:47 ` [PATCH V2 05/17] staging: wilc1000: wilc_wlan_cfg_commit: " Glen Lee
2015-10-30 9:47 ` [PATCH V2 06/17] staging: wilc1000: wilc_wlan_txq_add_cfg_pkt: add argument net_device Glen Lee
2015-10-30 9:47 ` [PATCH V2 07/17] staging: wilc1000: wilc_wlan_txq_add_to_head: add new " Glen Lee
2015-10-30 9:47 ` [PATCH V2 08/17] staging: wilc1000: remove unused function remove_TCP_related Glen Lee
2015-10-30 9:47 ` [PATCH V2 09/17] staging: wilc1000: wilc_wlan_stop: add argument struct net_device Glen Lee
2015-10-30 9:47 ` [PATCH V2 10/17] staging: wilc1000: remove unused function wilc_wlan_global_reset Glen Lee
2015-10-30 9:47 ` [PATCH V2 11/17] staging: wilc1000: wilc_wlan_firmware_download: add argument net_device Glen Lee
2015-10-30 9:47 ` [PATCH V2 12/17] staging: wilc1000: chip_sleep_manually: add argument struct net_device Glen Lee
2015-10-30 9:47 ` [PATCH V2 13/17] staging: wilc1000: wilc_wlan_start: " Glen Lee
2015-10-30 9:47 ` [PATCH V2 14/17] staging: wilc1000: acquire_bus: add new argument struct wilc Glen Lee
2015-10-30 9:47 ` [PATCH V2 15/17] staging: wilc1000: release_bus: add " Glen Lee
2015-10-30 9:47 ` [PATCH V2 16/17] staging: wilc1000: linux_wlan_get_num_conn_ifcs: add argument net_device Glen Lee
2015-10-30 9:47 ` [PATCH V2 17/17] staging: wilc1000: wilc_netdev_init: use wilc instead of g_linux_wlan Glen Lee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151104204544.GB23896@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Nicolas.FERRE@atmel.com \
--cc=adel.noureldin@atmel.com \
--cc=adham.abozaeid@atmel.com \
--cc=austin.shin@atmel.com \
--cc=devel@driverdev.osuosl.org \
--cc=glen.lee@atmel.com \
--cc=leo.kim@atmel.com \
--cc=linux-wireless@vger.kernel.org \
--cc=tony.cho@atmel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).