libertas: remove priv->capability
authorHolger Schurig <holgerschurig@googlemail.com>
Wed, 2 Dec 2009 14:26:03 +0000 (15:26 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 22 Dec 2009 18:44:03 +0000 (13:44 -0500)
This variable was once set to WLAN_CAPABILITY_SHORT_PREAMBLE and
there's no code that could change the variable to something else.
Therefore it seems this is not necessary :-)

Signed-off-by: Holger Schurig <holgerschurig@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/assoc.c
drivers/net/wireless/libertas/cmd.c
drivers/net/wireless/libertas/dev.h
drivers/net/wireless/libertas/main.c

index 751067369ba84ec8506bbe7b087f3691ab3fd0cc..5f58ae33405b1767db2b67e60e27c83f7a7bf043 100644 (file)
@@ -807,8 +807,7 @@ static int lbs_try_associate(struct lbs_private *priv,
        }
 
        /* Use short preamble only when both the BSS and firmware support it */
-       if ((priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) &&
-           (assoc_req->bss.capability & WLAN_CAPABILITY_SHORT_PREAMBLE))
+       if (assoc_req->bss.capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
                preamble = RADIO_PREAMBLE_SHORT;
 
        ret = lbs_set_radio(priv, preamble, 1);
@@ -939,8 +938,7 @@ static int lbs_adhoc_join(struct lbs_private *priv,
        }
 
        /* Use short preamble only when both the BSS and firmware support it */
-       if ((priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) &&
-           (bss->capability & WLAN_CAPABILITY_SHORT_PREAMBLE)) {
+       if (bss->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) {
                lbs_deb_join("AdhocJoin: Short preamble\n");
                preamble = RADIO_PREAMBLE_SHORT;
        }
@@ -1049,7 +1047,7 @@ static int lbs_adhoc_start(struct lbs_private *priv,
        struct assoc_request *assoc_req)
 {
        struct cmd_ds_802_11_ad_hoc_start cmd;
-       u8 preamble = RADIO_PREAMBLE_LONG;
+       u8 preamble = RADIO_PREAMBLE_SHORT;
        size_t ratesize = 0;
        u16 tmpcap = 0;
        int ret = 0;
@@ -1057,11 +1055,6 @@ static int lbs_adhoc_start(struct lbs_private *priv,
 
        lbs_deb_enter(LBS_DEB_ASSOC);
 
-       if (priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE) {
-               lbs_deb_join("ADHOC_START: Will use short preamble\n");
-               preamble = RADIO_PREAMBLE_SHORT;
-       }
-
        ret = lbs_set_radio(priv, preamble, 1);
        if (ret)
                goto out;
index 4a0d8f4188ca354eea1d7f6ea68127a1303a686c..42051f7cad6df61794ec711dc09d5c297cb3c845 100644 (file)
@@ -842,9 +842,6 @@ int lbs_set_radio(struct lbs_private *priv, u8 preamble, u8 radio_on)
        if (priv->fwrelease < 0x09000000) {
                switch (preamble) {
                case RADIO_PREAMBLE_SHORT:
-                       if (!(priv->capability & WLAN_CAPABILITY_SHORT_PREAMBLE))
-                               goto out;
-                       /* Fall through */
                case RADIO_PREAMBLE_AUTO:
                case RADIO_PREAMBLE_LONG:
                        cmd.control = cpu_to_le16(preamble);
index 7330ab8521cc8da1136a95025fcef1d7d1203ba0..cf47cf53458fc1225c5a6c19022d67b2fc5e52f9 100644 (file)
@@ -175,7 +175,6 @@ struct lbs_private {
        struct bss_descriptor *networks;
        struct assoc_request * pending_assoc_req;
        struct assoc_request * in_progress_assoc_req;
-       u16 capability;
        uint16_t enablehwauto;
        uint16_t ratebitmap;
 
index 64b327d4548bba5f5f3e8a7cfac6e4e4505e5cbf..f9f195f7b17cb6145310641f9c0f738fd1ea036f 100644 (file)
@@ -839,7 +839,6 @@ static int lbs_init_adapter(struct lbs_private *priv)
        priv->mac_control = CMD_ACT_MAC_RX_ON | CMD_ACT_MAC_TX_ON;
        priv->radio_on = 1;
        priv->enablehwauto = 1;
-       priv->capability = WLAN_CAPABILITY_SHORT_PREAMBLE;
        priv->psmode = LBS802_11POWERMODECAM;
        priv->psstate = PS_STATE_FULL_POWER;
        priv->is_deep_sleep = 0;