p54: disable PS by default
[pandora-kernel.git] / drivers / net / wireless / p54 / main.c
index a0d0e72..77203e3 100644 (file)
@@ -288,6 +288,11 @@ static int p54_config(struct ieee80211_hw *dev, u32 changed)
                if (ret)
                        goto out;
        }
+       if (changed & IEEE80211_CONF_CHANGE_IDLE) {
+               ret = p54_setup_mac(priv);
+               if (ret)
+                       goto out;
+       }
 
 out:
        mutex_unlock(&priv->conf_mutex);
@@ -317,7 +322,7 @@ static int p54_conf_tx(struct ieee80211_hw *dev, u16 queue,
        int ret;
 
        mutex_lock(&priv->conf_mutex);
-       if ((params) && !(queue > 4)) {
+       if (queue < dev->queues) {
                P54_SET_QUEUE(priv->qos_params[queue], params->aifs,
                        params->cw_min, params->cw_max, params->txop);
                ret = p54_set_edcf(priv);
@@ -570,6 +575,12 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
        dev->extra_tx_headroom = sizeof(struct p54_hdr) + 4 +
                                 sizeof(struct p54_tx_data);
 
+       /*
+        * For now, disable PS by default because it affects
+        * link stability significantly.
+        */
+       dev->wiphy->ps_default = false;
+
        mutex_init(&priv->conf_mutex);
        mutex_init(&priv->eeprom_mutex);
        init_completion(&priv->eeprom_comp);