Stellar coronal magnetic fields and star-planet interaction