Link instability and channel interference cause significant performance degradation to mobile ad hoc cognitive networks (MACNets). Existing work designs routing and assigns channels separately or does not consider mobility prediction and channel vacation to primary nodes. In this paper, we investigate how to jointly optimize route setup and channel assignment. Firstly, we propose an integrated data transmission cost (IDTC) to quantitatively measure the communication quality of links. This novel routing metric IDTC integratively considers 1) node mobility, 2) co-channel interference among primary and cognitive nodes, 3) relay workload on a specified channel, and 4) distance between the relay and the destination node. We, then, design channel assignment algorithms that completely avoid the interference with primary nodes and minimize the conflict to cognitive nodes. Finally, we propose a joint stable routing and channel assignment (J-SRCA) protocol based on mobility prediction for the network throughput maximization. In our J-SRCA, each link selected hop by hop is simultaneously assigned an interference-avoiding channel during a route setup. NS2-based simulation results demonstrate that our J-SRCA significantly improves various network performance, and the higher interference degree cognitive networks experience, the more improvement our J-SRCA will bring to the networks.