The scarcity of unlicensed spectrum has triggered great interest in cognitive radio (CR) technology as a means to improve spectrum utilization. An important challenge in this domain is how to enable nodes in a CR network (CRN) to access the medium opportunistically. Multi-channel MAC protocols for typical ad hoc networks assume that frequency channels are adjacent and that there are no strict constraints on the transmission power. However, a CRN may occupy a wide range of frequencies. In addition, a power mask is often enforced on the transmission power of a CR user to avoid corrupting the transmissions of spectrum-licensed primary-radio (PR) users. Obviously, CR users operating in different licensed bands will be subject to different PR-to-CR interference conditions. To avoid unnecessary blocking of CR transmissions under these constraints, we propose a novel distance-dependent MAC protocol for CRNs (DDMAC) that attempts to maximize the CRN throughput. DDMAC introduces a novel suboptimal probabilistic channel assignment algorithm that exploits the dependence between the signal's attenuation model and the transmission distance while considering the traffic profile. The protocol allows a pair of CR users to communicate on a channel that may not be optimal from one user's perspective, but that allows more transmissions to take place simultaneously, especially under moderate to high traffic loads. Simulation results indicate that compared to typical multi-channel CSMA-based protocols, DDMAC decreases the connection blocking rate of CR transmission requests by up to 30%, which improves the network throughput at no additional cost in energy consumption. On the whole, our protocol is simple yet effective. It can be incorporated into existing multi-channel systems with little extra processing overhead.