From: Dan Williams <dcbw@redhat.com>
To: Holger Schurig <hs4233@mail.mn-solutions.de>
Cc: libertas-dev@lists.infradead.org, linux-wireless@vger.kernel.org,
"John W. Linville" <linville@tuxdriver.com>
Subject: Re: [PATCH] libertas: remove lbs_get_data_rate()
Date: Wed, 14 May 2008 10:42:29 -0400 [thread overview]
Message-ID: <1210776149.22992.7.camel@localhost.localdomain> (raw)
In-Reply-To: <200805141627.18368.hs4233@mail.mn-solutions.de>
On Wed, 2008-05-14 at 16:27 +0200, Holger Schurig wrote:
> lbs_get_data_rate() get's called, but no-one uses it's result.
>
> Signed-off-by: Holger Schurig <hs4233@mail.mn-solutions.de>
Acked-by: Dan Williams <dcbw@redhat.com>
We currently get the iwconfig current rate from the last received packet
when the rate is 'auto'; I guess if we care about the TX data rate at
some future time we can use a combination of DATA_RATE (< 5.1 firmware)
and TX_RATEQUERY (>= 5.1 firmware) to get it.
> Index: wireless-testing/drivers/net/wireless/libertas/cmd.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/cmd.c 2008-05-14 14:58:06.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/cmd.c 2008-05-14 14:58:15.000000000 +0200
> @@ -697,38 +697,6 @@ static int lbs_cmd_802_11_rate_adapt_rat
> }
>
> /**
> - * @brief Get the current data rate
> - *
> - * @param priv A pointer to struct lbs_private structure
> - *
> - * @return The data rate on success, error on failure
> - */
> -int lbs_get_data_rate(struct lbs_private *priv)
> -{
> - struct cmd_ds_802_11_data_rate cmd;
> - int ret = -1;
> -
> - lbs_deb_enter(LBS_DEB_CMD);
> -
> - memset(&cmd, 0, sizeof(cmd));
> - cmd.hdr.size = cpu_to_le16(sizeof(cmd));
> - cmd.action = cpu_to_le16(CMD_ACT_GET_TX_RATE);
> -
> - ret = lbs_cmd_with_response(priv, CMD_802_11_DATA_RATE, &cmd);
> - if (ret)
> - goto out;
> -
> - lbs_deb_hex(LBS_DEB_CMD, "DATA_RATE_RESP", (u8 *) &cmd, sizeof (cmd));
> -
> - ret = (int) lbs_fw_index_to_data_rate(cmd.rates[0]);
> - lbs_deb_cmd("DATA_RATE: current rate 0x%02x\n", ret);
> -
> -out:
> - lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
> - return ret;
> -}
> -
> -/**
> * @brief Set the data rate
> *
> * @param priv A pointer to struct lbs_private structure
> Index: wireless-testing/drivers/net/wireless/libertas/cmd.h
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/cmd.h 2008-05-14 14:59:07.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/cmd.h 2008-05-14 14:59:11.000000000 +0200
> @@ -34,7 +34,6 @@ int lbs_update_hw_spec(struct lbs_privat
> int lbs_mesh_access(struct lbs_private *priv, uint16_t cmd_action,
> struct cmd_ds_mesh_access *cmd);
>
> -int lbs_get_data_rate(struct lbs_private *priv);
> int lbs_set_data_rate(struct lbs_private *priv, u8 rate);
>
> int lbs_get_channel(struct lbs_private *priv);
> Index: wireless-testing/drivers/net/wireless/libertas/main.c
> ===================================================================
> --- wireless-testing.orig/drivers/net/wireless/libertas/main.c 2008-05-14 14:58:28.000000000 +0200
> +++ wireless-testing/drivers/net/wireless/libertas/main.c 2008-05-14 15:04:14.000000000 +0200
> @@ -928,20 +928,10 @@ static int lbs_setup_firmware(struct lbs
> */
> memset(priv->current_addr, 0xff, ETH_ALEN);
> ret = lbs_update_hw_spec(priv);
> - if (ret) {
> - ret = -1;
> + if (ret)
> goto done;
> - }
>
> lbs_set_mac_control(priv);
> -
> - ret = lbs_get_data_rate(priv);
> - if (ret < 0) {
> - ret = -1;
> - goto done;
> - }
> -
> - ret = 0;
> done:
> lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret);
> return ret;
next prev parent reply other threads:[~2008-05-14 14:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-14 14:27 [PATCH] libertas: remove lbs_get_data_rate() Holger Schurig
2008-05-14 14:42 ` Dan Williams [this message]
2008-05-14 14:53 ` Holger Schurig
2008-05-14 16:57 ` Pavel Roskin
2008-05-20 22:08 ` David Woodhouse
2008-05-20 21:31 ` John W. Linville
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=1210776149.22992.7.camel@localhost.localdomain \
--to=dcbw@redhat.com \
--cc=hs4233@mail.mn-solutions.de \
--cc=libertas-dev@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.