u16 peer_mss = ntohs(req->tcpopt.mss);
        int iptype;
        unsigned short hdrs;
-       u8 tos = PASS_OPEN_TOS_G(ntohl(req->tos_stid));
+       u8 tos;
 
        parent_ep = (struct c4iw_ep *)get_ep_from_stid(dev, stid);
        if (!parent_ep) {
                goto reject;
        }
 
+       if (parent_ep->com.cm_id->tos_set)
+               tos = parent_ep->com.cm_id->tos;
+       else
+               tos = PASS_OPEN_TOS_G(ntohl(req->tos_stid));
+
        cxgb_get_4tuple(req, parent_ep->com.dev->rdev.lldi.adapter_type,
                        &iptype, local_ip, peer_ip, &local_port, &peer_port);
 
                         ntohs(peer_port), peer_mss);
                dst = cxgb_find_route6(&dev->rdev.lldi, get_real_dev,
                                local_ip, peer_ip, local_port, peer_port,
-                               PASS_OPEN_TOS_G(ntohl(req->tos_stid)),
+                               tos,
                                ((struct sockaddr_in6 *)
                                 &parent_ep->com.local_addr)->sin6_scope_id);
        }