]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/net/wireless/rt2x00/rt2500usb.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[karo-tx-linux.git] / drivers / net / wireless / rt2x00 / rt2500usb.c
index 8722464944f5852e4184d64e824b2b910a274a0e..db64df4267d8b77a7619374a341c40178f6f72fc 100644 (file)
@@ -1196,6 +1196,14 @@ static int rt2500usb_get_tx_data_len(struct queue_entry *entry)
        return length;
 }
 
+static void rt2500usb_kill_tx_queue(struct data_queue *queue)
+{
+       if (queue->qid == QID_BEACON)
+               rt2500usb_register_write(queue->rt2x00dev, TXRX_CSR19, 0);
+
+       rt2x00usb_kill_tx_queue(queue);
+}
+
 /*
  * RX control handlers
  */
@@ -1699,19 +1707,23 @@ static int rt2500usb_probe_hw_mode(struct rt2x00_dev *rt2x00dev)
        /*
         * Create channel information array
         */
-       info = kzalloc(spec->num_channels * sizeof(*info), GFP_KERNEL);
+       info = kcalloc(spec->num_channels, sizeof(*info), GFP_KERNEL);
        if (!info)
                return -ENOMEM;
 
        spec->channels_info = info;
 
        tx_power = rt2x00_eeprom_addr(rt2x00dev, EEPROM_TXPOWER_START);
-       for (i = 0; i < 14; i++)
-               info[i].tx_power1 = TXPOWER_FROM_DEV(tx_power[i]);
+       for (i = 0; i < 14; i++) {
+               info[i].max_power = MAX_TXPOWER;
+               info[i].default_power1 = TXPOWER_FROM_DEV(tx_power[i]);
+       }
 
        if (spec->num_channels > 14) {
-               for (i = 14; i < spec->num_channels; i++)
-                       info[i].tx_power1 = DEFAULT_TXPOWER;
+               for (i = 14; i < spec->num_channels; i++) {
+                       info[i].max_power = MAX_TXPOWER;
+                       info[i].default_power1 = DEFAULT_TXPOWER;
+               }
        }
 
        return 0;
@@ -1790,7 +1802,7 @@ static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = {
        .write_beacon           = rt2500usb_write_beacon,
        .get_tx_data_len        = rt2500usb_get_tx_data_len,
        .kick_tx_queue          = rt2x00usb_kick_tx_queue,
-       .kill_tx_queue          = rt2x00usb_kill_tx_queue,
+       .kill_tx_queue          = rt2500usb_kill_tx_queue,
        .fill_rxdone            = rt2500usb_fill_rxdone,
        .config_shared_key      = rt2500usb_config_key,
        .config_pairwise_key    = rt2500usb_config_key,