On Fri, 2013-09-13 at 16:36 -0700, Chun-Yeow Yeoh wrote: > + skb = dev_alloc_skb(local->tx_headroom + len); > + if (!skb) > + return -1; -ENOMEM ? > + skb_reserve(skb, local->tx_headroom); > + mgmt_fwd = (struct ieee80211_mgmt *) skb_put(skb, len); > + > + /* offset_ttl is based on whether the secondary channel > + * offset is available or not. Substract 1 from the mesh TTL > + * and disable the initiator flag before forwarding. > + */ > + offset_ttl = (len < 42) ? 7 : 10; > + *(pos + offset_ttl) -= 1; > + *(pos + offset_ttl + 1) &= ~WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR; That's somewhat ugly, is there no better way to express that? Maybe with different structs or something? I guess I can live with it, just asking though. > + /* forward or re-broadcast the CSA frame */ > + if (fwd_csa) { > + if (mesh_fwd_csa_frame(sdata, mgmt, len) < 0) > + mcsa_dbg(sdata, "Failed to forward the CSA frame"); > + } > + > + /* block the Tx only after fowarding the CSA frame if required */ typo: forwarding > + block_tx = !!(elems.mesh_chansw_params_ie->mesh_flags > + & WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT); No need for !! with bool variables johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html