]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/char/pcmcia/ipwireless/network.c
ipwireless: Remove unused defines
[mv-sheeva.git] / drivers / char / pcmcia / ipwireless / network.c
index ff35230058d36e7fd235b73b8884f2bb799f497c..cf12eb400f93ae8271dcd7d4cb6e2bb6b5bbd116 100644 (file)
@@ -29,7 +29,6 @@
 #include "main.h"
 #include "tty.h"
 
-#define MAX_OUTGOING_PACKETS_QUEUED   ipwireless_out_queue
 #define MAX_ASSOCIATED_TTYS 2
 
 #define SC_RCV_BITS     (SC_RCV_B7_1|SC_RCV_B7_0|SC_RCV_ODDP|SC_RCV_EVNP)
@@ -63,21 +62,6 @@ struct ipw_network {
        struct work_struct work_go_offline;
 };
 
-
-#ifdef IPWIRELESS_STATE_DEBUG
-int ipwireless_dump_network_state(char *p, size_t limit,
-                                 struct ipw_network *network)
-{
-       return snprintf(p, limit,
-                       "debug: ppp_blocked=%d\n"
-                       "debug: outgoing_packets_queued=%d\n"
-                       "debug: network.shutting_down=%d\n",
-                       network->ppp_blocked,
-                       network->outgoing_packets_queued,
-                       network->shutting_down);
-}
-#endif
-
 static void notify_packet_sent(void *callback_data, unsigned int packet_length)
 {
        struct ipw_network *network = callback_data;
@@ -109,7 +93,7 @@ static int ipwireless_ppp_start_xmit(struct ppp_channel *ppp_channel,
        unsigned long flags;
 
        spin_lock_irqsave(&network->spinlock, flags);
-       if (network->outgoing_packets_queued < MAX_OUTGOING_PACKETS_QUEUED) {
+       if (network->outgoing_packets_queued < ipwireless_out_queue) {
                unsigned char *buf;
                static unsigned char header[] = {
                        PPP_ALLSTATIONS, /* 0xff */
@@ -377,13 +361,16 @@ void ipwireless_network_packet_received(struct ipw_network *network,
        for (i = 0; i < MAX_ASSOCIATED_TTYS; i++) {
                struct ipw_tty *tty = network->associated_ttys[channel_idx][i];
 
+               if (!tty)
+                       continue;
+
                /*
                 * If it's associated with a tty (other than the RAS channel
                 * when we're online), then send the data to that tty.  The RAS
                 * channel's data is handled above - it always goes through
                 * ppp_generic.
                 */
-               if (tty && channel_idx == IPW_CHANNEL_RAS
+               if (channel_idx == IPW_CHANNEL_RAS
                                && (network->ras_control_lines &
                                        IPW_CONTROL_LINE_DCD) != 0
                                && ipwireless_tty_is_modem(tty)) {