We introduce scaling parameters for the spin-polarization dependent gradient correction to the local correlation in the van der Waals density functional, which enable us to tune the magnetic interaction between atoms and molecules. We have applied the method to solid oxygen and found that by using an optimal choice of the parameters, the structural parameters are significantly improved over the ones obtained in the previous work. We discuss the generic features of the proposed approach.