Maximization of the weighted sum-rate of secondary users (SUs) possibly equipped with multi-antenna transmitters and receivers is considered in the context of cognitive radio (CR) networks with coexisting primary user(s) (PU). Total interference power received at the primary receiver is constrained to maintain reliable communication for the PU. An interference channel configuration is considered for ad hoc networking, where the receivers treat the interference from undesired transmitters as noise. Without the CR constraint, a distributed algorithm is developed to obtain (at least) a locally optimal solution. With the CR constraint, a semi-distributed algorithm is also introduced along with an alternative centralized algorithm based on geometric programming and network duality.