]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/phonet/socket.c
mac80211: restrict to AP in outgoing interface heuristic
[linux-2.6-omap-h63xx.git] / net / phonet / socket.c
index c75aa5cdead51cebe9292b1e27a25e4da06621c2..ada2a35bf7a2382f49c49f771403e70d6b5d0359 100644 (file)
@@ -227,7 +227,7 @@ static unsigned int pn_socket_poll(struct file *file, struct socket *sock,
        if (!mask && sk->sk_state == TCP_CLOSE_WAIT)
                return POLLHUP;
 
-       if (sk->sk_state == TCP_ESTABLISHED && pn->tx_credits)
+       if (sk->sk_state == TCP_ESTABLISHED && atomic_read(&pn->tx_credits))
                mask |= POLLOUT | POLLWRNORM | POLLWRBAND;
 
        return mask;