aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas/main.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2008-08-19 15:15:35 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-08-29 16:24:06 -0400
commit87c8c72d532f96257162f978d5945dcf7f0df19e (patch)
tree71f270c1844e74ba41a6fe347e53f035db923e7d /drivers/net/wireless/libertas/main.c
parent095f695cbb07281682462da0618fffabb499d0be (diff)
libertas: convert CMD_802_11_RF_TX_POWER to a direct command
And while we're at it, grab min/max TX power from the firmware and use that to validate incoming TX power requests from WEXT. Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/libertas/main.c')
-rw-r--r--drivers/net/wireless/libertas/main.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index bd32ac0b4e07..3c13619ffa15 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -956,17 +956,24 @@ EXPORT_SYMBOL_GPL(lbs_resume);
956static int lbs_setup_firmware(struct lbs_private *priv) 956static int lbs_setup_firmware(struct lbs_private *priv)
957{ 957{
958 int ret = -1; 958 int ret = -1;
959 s16 curlevel = 0, minlevel = 0, maxlevel = 0;
959 960
960 lbs_deb_enter(LBS_DEB_FW); 961 lbs_deb_enter(LBS_DEB_FW);
961 962
962 /* 963 /* Read MAC address from firmware */
963 * Read MAC address from HW
964 */
965 memset(priv->current_addr, 0xff, ETH_ALEN); 964 memset(priv->current_addr, 0xff, ETH_ALEN);
966 ret = lbs_update_hw_spec(priv); 965 ret = lbs_update_hw_spec(priv);
967 if (ret) 966 if (ret)
968 goto done; 967 goto done;
969 968
969 /* Read power levels if available */
970 ret = lbs_get_tx_power(priv, &curlevel, &minlevel, &maxlevel);
971 if (ret == 0) {
972 priv->txpower_cur = curlevel;
973 priv->txpower_min = minlevel;
974 priv->txpower_max = maxlevel;
975 }
976
970 lbs_set_mac_control(priv); 977 lbs_set_mac_control(priv);
971done: 978done:
972 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret); 979 lbs_deb_leave_args(LBS_DEB_FW, "ret %d", ret);